@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,350 @@
|
|
|
1
|
+
import type { CanonicalJsonObject, CanonicalJsonValue } from "../data-boundary/canonical-json.ts";
|
|
2
|
+
import type { InheritableCheckCollection } from "./inherited-collection.ts";
|
|
3
|
+
export { inherit, isInheritedCheckCollection, snapshotInheritedCheckCollection } from "./inherited-collection.ts";
|
|
4
|
+
export type { InheritCheckCollectionInput, InheritableCheckCollection, InheritedCheckCollection } from "./inherited-collection.ts";
|
|
5
|
+
/** Check 无法给出 final data 时返回的受控 reason code。 */
|
|
6
|
+
export type CheckReason = Readonly<{
|
|
7
|
+
/** 由 owning Check 定义、供调用方诊断的稳定 code。 */
|
|
8
|
+
readonly code: string;
|
|
9
|
+
}>;
|
|
10
|
+
/** `not-applicable` Check result 的可选 reason。 */
|
|
11
|
+
export type CheckNotApplicableReason = CheckReason;
|
|
12
|
+
/** author callback 明确返回 `unavailable` 时必须提供的 reason。 */
|
|
13
|
+
export type CheckDeclaredUnavailableReason = CheckReason;
|
|
14
|
+
/** `unavailable` Check outcome 的 reason;可列出导致当前 Check 不可用的上游 Check。 */
|
|
15
|
+
export type CheckUnavailableReason = Readonly<{
|
|
16
|
+
/** 由当前 Check 或 Product 边界给出的受控原因。 */
|
|
17
|
+
readonly code: string;
|
|
18
|
+
/** 仅在上游关系有助于定位时给出的相关 Check IDs。 */
|
|
19
|
+
readonly checkIds?: readonly string[];
|
|
20
|
+
}>;
|
|
21
|
+
/** 终端 Check message 的 presentation severity。 */
|
|
22
|
+
export type CheckMessageLevel = "info" | "warning" | "error";
|
|
23
|
+
/** 由 Check author 附加到 terminal result 的补充消息。 */
|
|
24
|
+
export interface CheckMessage {
|
|
25
|
+
/** 人读 presentation 使用的 severity。 */
|
|
26
|
+
readonly level: CheckMessageLevel;
|
|
27
|
+
/** owning Check namespace 内的稳定 message code。 */
|
|
28
|
+
readonly code: string;
|
|
29
|
+
/** 非空消息正文;Product 保留 author 提供的字符串。 */
|
|
30
|
+
readonly message: string;
|
|
31
|
+
}
|
|
32
|
+
/** 可附加到每个 {@link CheckResult} branch 的有序 terminal messages。 */
|
|
33
|
+
export interface CheckResultMessages {
|
|
34
|
+
/** 省略、`undefined` 或空数组都表示没有 supplemental messages。 */
|
|
35
|
+
readonly messages?: readonly CheckMessage[];
|
|
36
|
+
}
|
|
37
|
+
/** 已结算 Check 在人读 progress 中的可见性。 */
|
|
38
|
+
export type CheckVisibility = "always" | "attention";
|
|
39
|
+
/**
|
|
40
|
+
* Check callback 的 terminal result。
|
|
41
|
+
*
|
|
42
|
+
* @typeParam FinalData - `passed` 或 `failed` 时保留为 canonical final data 的业务对象。
|
|
43
|
+
* @remarks `not-applicable` 与 `unavailable` 不携带 final data;普通 callback、Record 或取消失败由
|
|
44
|
+
* Product 转换为 `unavailable`,而不是抛出为 Run 的成功结果。
|
|
45
|
+
*/
|
|
46
|
+
export type CheckResult<FinalData extends object = object> = Readonly<({
|
|
47
|
+
/** Check 已产生通过的 final data。 */
|
|
48
|
+
readonly status: "passed";
|
|
49
|
+
/** 此 Check 的主要终态事实。 */
|
|
50
|
+
readonly data: FinalData;
|
|
51
|
+
} | {
|
|
52
|
+
/** Check 已产生失败的 final data。 */
|
|
53
|
+
readonly status: "failed";
|
|
54
|
+
/** 此 Check 的主要终态事实。 */
|
|
55
|
+
readonly data: FinalData;
|
|
56
|
+
} | {
|
|
57
|
+
/** Check 在当前 invocation 中不适用。 */
|
|
58
|
+
readonly status: "not-applicable";
|
|
59
|
+
/** 不适用的可选受控原因。 */
|
|
60
|
+
readonly reason?: CheckNotApplicableReason;
|
|
61
|
+
} | {
|
|
62
|
+
/** Check 不能提供 terminal data。 */
|
|
63
|
+
readonly status: "unavailable";
|
|
64
|
+
/** 不可用的受控原因。 */
|
|
65
|
+
readonly reason: CheckDeclaredUnavailableReason;
|
|
66
|
+
}) & CheckResultMessages>;
|
|
67
|
+
/** 已 materialize 到 Core snapshot 的 Check terminal outcome。 */
|
|
68
|
+
export type CheckOutcome = Readonly<{
|
|
69
|
+
/** 已 materialize 的通过 outcome。 */
|
|
70
|
+
readonly status: "passed";
|
|
71
|
+
/** 已 canonicalize 的 primary final fact。 */
|
|
72
|
+
readonly data: CanonicalJsonObject;
|
|
73
|
+
} | {
|
|
74
|
+
/** 已 materialize 的失败 outcome。 */
|
|
75
|
+
readonly status: "failed";
|
|
76
|
+
/** 已 canonicalize 的 primary final fact。 */
|
|
77
|
+
readonly data: CanonicalJsonObject;
|
|
78
|
+
} | {
|
|
79
|
+
/** 已 materialize 的不适用 outcome。 */
|
|
80
|
+
readonly status: "not-applicable";
|
|
81
|
+
/** 不适用的可选受控原因。 */
|
|
82
|
+
readonly reason?: CheckNotApplicableReason;
|
|
83
|
+
} | {
|
|
84
|
+
/** 已 materialize 的不可用 outcome。 */
|
|
85
|
+
readonly status: "unavailable";
|
|
86
|
+
/** 包含相关 upstream Check IDs 的受控原因。 */
|
|
87
|
+
readonly reason: CheckUnavailableReason;
|
|
88
|
+
}>;
|
|
89
|
+
/** 将 callback options 转为不可变观察值的递归 utility type。 */
|
|
90
|
+
export type DeepReadonly<T> = T extends string | number | boolean | null ? T : T extends readonly (infer Item)[] ? readonly DeepReadonly<Item>[] : T extends object ? {
|
|
91
|
+
readonly [Key in keyof T]: DeepReadonly<T[Key]>;
|
|
92
|
+
} : never;
|
|
93
|
+
/** callback 写入 supplemental Record 时的 Check-local identity。 */
|
|
94
|
+
interface RecordIdentityInput {
|
|
95
|
+
/** 在当前 Check 内唯一的 Record ID。 */
|
|
96
|
+
readonly id: string;
|
|
97
|
+
}
|
|
98
|
+
/** callback 写入 supplemental Records 的 Product-owned reporter。 */
|
|
99
|
+
interface CheckRecordReporter {
|
|
100
|
+
/** 记录一个补充事实;它不决定 Check 的 terminal status。 */
|
|
101
|
+
report(identity: RecordIdentityInput, data: object): void;
|
|
102
|
+
}
|
|
103
|
+
/** 读取已声明 dependency final data 时的失败原因。 */
|
|
104
|
+
export type DependencyReadError = Readonly<{
|
|
105
|
+
/** 当前 Check 未声明所请求的 dependency ID。 */
|
|
106
|
+
readonly code: "dependency-not-declared";
|
|
107
|
+
/** 被拒绝的 dependency ID。 */
|
|
108
|
+
readonly checkId: string;
|
|
109
|
+
} | {
|
|
110
|
+
/** 已声明 upstream 没有可读取的 final data。 */
|
|
111
|
+
readonly code: "upstream-data-unavailable";
|
|
112
|
+
/** 没有 final data 的 direct dependency ID。 */
|
|
113
|
+
readonly checkId: string;
|
|
114
|
+
/** 阻止 readback 的 upstream terminal status。 */
|
|
115
|
+
readonly status: "not-applicable" | "unavailable";
|
|
116
|
+
}>;
|
|
117
|
+
/** {@link CheckDependencies.get} 的受控 readback 结果。 */
|
|
118
|
+
export type DependencyReadResult = Readonly<{
|
|
119
|
+
/** 成功读取 direct dependency final data。 */
|
|
120
|
+
readonly ok: true;
|
|
121
|
+
/** 被读取的 direct dependency ID。 */
|
|
122
|
+
readonly checkId: string;
|
|
123
|
+
/** upstream 已结算为 `passed` 或 `failed` 的 status。 */
|
|
124
|
+
readonly status: "passed" | "failed";
|
|
125
|
+
/** 已与原对象脱离的上游依赖终态数据。 */
|
|
126
|
+
readonly data: CanonicalJsonObject;
|
|
127
|
+
} | {
|
|
128
|
+
/** dependency data 不可读取。 */
|
|
129
|
+
readonly ok: false;
|
|
130
|
+
/** 失败的授权或 upstream-data reason。 */
|
|
131
|
+
readonly error: DependencyReadError;
|
|
132
|
+
}>;
|
|
133
|
+
/** 当前 Check 的已规范化直接 dependencies 的 data reader。 */
|
|
134
|
+
export interface CheckDependencies {
|
|
135
|
+
/**
|
|
136
|
+
* 读取一个直接 dependency 的 canonical final data。
|
|
137
|
+
*
|
|
138
|
+
* @returns 已声明且为 `passed`/`failed` 的 dependency 返回其 data;未声明或没有 final data 时返回
|
|
139
|
+
* `ok: false`,不会授权 transitive dependency。
|
|
140
|
+
*/
|
|
141
|
+
get(checkId: string): DependencyReadResult;
|
|
142
|
+
}
|
|
143
|
+
/** callback 可读取的、由 Product 规范化的项目上下文。 */
|
|
144
|
+
export interface CheckProjectContext {
|
|
145
|
+
/** 本次 Run 使用的绝对项目根目录。 */
|
|
146
|
+
readonly root: string;
|
|
147
|
+
/** 已去重、排序的 caller-supplied flags。 */
|
|
148
|
+
readonly flags: readonly string[];
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Check callback 收到的 Product-owned execution context。
|
|
152
|
+
*
|
|
153
|
+
* @typeParam Options - 此 Check preflight 后传给 execution 的 options shape。
|
|
154
|
+
*/
|
|
155
|
+
export interface CheckExecutionContext<Options extends object> {
|
|
156
|
+
/** 读取当前 Check 的已声明 direct dependencies。 */
|
|
157
|
+
readonly dependencies: CheckDependencies;
|
|
158
|
+
/** 深度只读、canonical 的 invocation-local prepared Check options。 */
|
|
159
|
+
readonly options: DeepReadonly<Options>;
|
|
160
|
+
/** 已规范化的项目根与 flags。 */
|
|
161
|
+
readonly project: CheckProjectContext;
|
|
162
|
+
/** 写入 supplemental Records 的 reporter。 */
|
|
163
|
+
readonly records: CheckRecordReporter;
|
|
164
|
+
/** 本次 invocation 的 cancellation signal。 */
|
|
165
|
+
readonly signal: AbortSignal;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* 一个 Check 的 callback signature。
|
|
169
|
+
*
|
|
170
|
+
* @typeParam Options - callback 从 context 读取的 prepared options shape。
|
|
171
|
+
* @returns terminal Check result 或其 Promise。
|
|
172
|
+
*/
|
|
173
|
+
export type CheckExecution<Options extends object = object> = (this: void, context: CheckExecutionContext<Options>) => CheckResult | Promise<CheckResult>;
|
|
174
|
+
/**
|
|
175
|
+
* 在 Check execution 前,可选地为本次 invocation 准备 options。
|
|
176
|
+
*
|
|
177
|
+
* @remarks `signal` 与同一次 callback execution 使用同一个 cancellation signal;实现应在可等待工作中
|
|
178
|
+
* 协作退出,而不是留下悬挂 work。bivariant callback 保持具体 options Check 可进入普通递归 Check
|
|
179
|
+
* collection;Product 仍只会用该 Check 自己的 authored options 调用它。精确结果见
|
|
180
|
+
* {@link CheckPreflightResult}。
|
|
181
|
+
*/
|
|
182
|
+
export type CheckPreflight<AuthoredOptions extends object = object, PreparedOptions extends object = AuthoredOptions> = {
|
|
183
|
+
bivarianceHack(this: void, options: DeepReadonly<AuthoredOptions>, signal: AbortSignal): CheckPreflightResult<PreparedOptions> | Promise<CheckPreflightResult<PreparedOptions>>;
|
|
184
|
+
}["bivarianceHack"];
|
|
185
|
+
/**
|
|
186
|
+
* Check-owned preflight 的判别结果。
|
|
187
|
+
*
|
|
188
|
+
* `failure/block` 不允许 fallback,直接以 owning reason 结算为 unavailable;`failure/continue` 必须给出
|
|
189
|
+
* fallback 并继续 execution。两种进入 execution 的值都只属于本次 invocation,Product canonicalize/freeze
|
|
190
|
+
* 后传递,不会改写 Definition 中 authored options。两个 failure 分支都必须给出 reason;continue reason
|
|
191
|
+
* 是 Check-owned diagnostic identity,当前不会单独 materialize 为 outcome,调用方通过 messages 与后续
|
|
192
|
+
* outcome 观察结果;block 物理上不含 fallback 字段。
|
|
193
|
+
*/
|
|
194
|
+
export type CheckPreflightResult<PreparedOptions extends object = object> = Readonly<{
|
|
195
|
+
readonly status: "success";
|
|
196
|
+
readonly preparedOptions: PreparedOptions;
|
|
197
|
+
readonly messages?: readonly CheckMessage[];
|
|
198
|
+
} | {
|
|
199
|
+
readonly status: "failure";
|
|
200
|
+
readonly action: "block";
|
|
201
|
+
readonly reason: CheckDeclaredUnavailableReason;
|
|
202
|
+
readonly messages?: readonly CheckMessage[];
|
|
203
|
+
} | {
|
|
204
|
+
readonly status: "failure";
|
|
205
|
+
readonly action: "continue";
|
|
206
|
+
readonly fallback: PreparedOptions;
|
|
207
|
+
readonly reason: CheckReason;
|
|
208
|
+
readonly messages?: readonly CheckMessage[];
|
|
209
|
+
}>;
|
|
210
|
+
/**
|
|
211
|
+
* 普通递归 Check authoring value 的共享字段。
|
|
212
|
+
*
|
|
213
|
+
* @typeParam AuthoredOptions - Definition 中的 declarative options shape。
|
|
214
|
+
* @typeParam PreparedOptions - preflight 后 callback 接收的 invocation-local options shape。
|
|
215
|
+
* @remarks 该值可以同时有 `execution` 和 `checks`;只有 executable node 产生 final Check fact。
|
|
216
|
+
*/
|
|
217
|
+
interface CheckBase<AuthoredOptions extends object, PreparedOptions extends object> {
|
|
218
|
+
/** 在 Definition 内唯一的 stable Check ID。 */
|
|
219
|
+
readonly checkId: string;
|
|
220
|
+
/** 人读 progress 与 output 使用的非空名称。 */
|
|
221
|
+
readonly displayName: string;
|
|
222
|
+
/** Check-owned declarative options;默认 Check 的嵌套 branch 以普通对象组合替换。 */
|
|
223
|
+
readonly options?: AuthoredOptions;
|
|
224
|
+
/** 可执行节点的 callback;省略时此节点只承载递归 children。 */
|
|
225
|
+
execution?(this: void, context: CheckExecutionContext<PreparedOptions>): CheckResult | Promise<CheckResult>;
|
|
226
|
+
/** 继承 scheduling context 的 child Checks,不会单独形成 container result。 */
|
|
227
|
+
readonly checks?: readonly Check[];
|
|
228
|
+
/** 直接 prerequisite Check IDs,或对父 dependency collection 的显式 edit。 */
|
|
229
|
+
readonly dependsOn?: InheritableCheckCollection<string>;
|
|
230
|
+
/** 此 Check 及其 descendants 的最大并行预算。 */
|
|
231
|
+
readonly maxParallel?: number;
|
|
232
|
+
/** 共享资源名称,或对父 mutex collection 的显式 edit。 */
|
|
233
|
+
readonly mutex?: InheritableCheckCollection<string>;
|
|
234
|
+
/** 已结算 Check 的人读可见性;可执行节点默认 `always`。 */
|
|
235
|
+
readonly visibility?: CheckVisibility;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* 判断两个 options shape 是否互相可赋值;互相可赋值时 execution 不需要 preparation 转换。
|
|
239
|
+
*/
|
|
240
|
+
type HasSameOptionsShape<AuthoredOptions extends object, PreparedOptions extends object> = [
|
|
241
|
+
AuthoredOptions
|
|
242
|
+
] extends [PreparedOptions] ? [PreparedOptions] extends [AuthoredOptions] ? true : false : false;
|
|
243
|
+
/** Prepared shape 不同时,preflight 是建立安全转换的必填边界。 */
|
|
244
|
+
type CheckPreflightField<AuthoredOptions extends object, PreparedOptions extends object> = HasSameOptionsShape<AuthoredOptions, PreparedOptions> extends true ? Readonly<{
|
|
245
|
+
readonly preflight?: CheckPreflight<AuthoredOptions, PreparedOptions>;
|
|
246
|
+
}> : Readonly<{
|
|
247
|
+
readonly preflight: CheckPreflight<AuthoredOptions, PreparedOptions>;
|
|
248
|
+
}>;
|
|
249
|
+
/**
|
|
250
|
+
* Project Definition 中的普通递归 Check authoring value。
|
|
251
|
+
*
|
|
252
|
+
* @typeParam AuthoredOptions - Definition 中的 declarative options shape。
|
|
253
|
+
* @typeParam PreparedOptions - preflight 后 callback 接收的 invocation-local options shape。
|
|
254
|
+
* @remarks Definition 只闭合 authored JSON options;preflight 在同一 Run 的所有 execution 前作为全局
|
|
255
|
+
* barrier 执行。`PreparedOptions` 与 `AuthoredOptions` 不同时必须提供 preflight;同形时可以省略。它不进入
|
|
256
|
+
* declarative fingerprint 或 machine output。
|
|
257
|
+
*/
|
|
258
|
+
export type Check<AuthoredOptions extends object = object, PreparedOptions extends object = AuthoredOptions> = CheckBase<AuthoredOptions, PreparedOptions> & CheckPreflightField<AuthoredOptions, PreparedOptions>;
|
|
259
|
+
export type EmptyCheckOptions = Readonly<Record<never, never>>;
|
|
260
|
+
/**
|
|
261
|
+
* 防止宽泛的 parser 标注擦除 `PromiseLike`。canonical `then` field 可以保存 JSON data,
|
|
262
|
+
* 但不能保存使该值成为 thenable 的 callable。
|
|
263
|
+
*/
|
|
264
|
+
type NonThenableData = Readonly<{
|
|
265
|
+
readonly then?: CanonicalJsonValue;
|
|
266
|
+
}>;
|
|
267
|
+
/**
|
|
268
|
+
* 将 canonical dependency data 还原为 provider final-data shape 的同步 parser。
|
|
269
|
+
*
|
|
270
|
+
* @typeParam FinalData - provider 在 `passed`/`failed` result 中声明的 final-data shape。
|
|
271
|
+
* @remarks Product 不调用此 parser;provider 负责不受信任或跨版本 data 的业务验证。
|
|
272
|
+
*/
|
|
273
|
+
export type CheckDataParser<FinalData extends object = object> = (this: void, data: CanonicalJsonObject) => FinalData & NonThenableData;
|
|
274
|
+
type CheckAuthoringBase<Id extends string, AuthoredOptions extends object, PreparedOptions extends object> = Omit<CheckBase<AuthoredOptions, PreparedOptions>, "checkId" | "execution" | "options"> & CheckPreflightField<AuthoredOptions, PreparedOptions> & Readonly<{
|
|
275
|
+
readonly checkId: Id;
|
|
276
|
+
}>;
|
|
277
|
+
interface OrdinaryCheckFields<PreparedOptions extends object> {
|
|
278
|
+
execution?(this: void, context: CheckExecutionContext<PreparedOptions>): CheckResult | Promise<CheckResult>;
|
|
279
|
+
readonly parseData?: never;
|
|
280
|
+
}
|
|
281
|
+
export type CheckWithOptions<Id extends string, AuthoredOptions extends object, PreparedOptions extends object = AuthoredOptions> = CheckAuthoringBase<Id, AuthoredOptions, PreparedOptions> & OrdinaryCheckFields<PreparedOptions> & Readonly<{
|
|
282
|
+
readonly options: AuthoredOptions;
|
|
283
|
+
}>;
|
|
284
|
+
export type CheckWithoutOptions<Id extends string> = CheckAuthoringBase<Id, EmptyCheckOptions, EmptyCheckOptions> & OrdinaryCheckFields<EmptyCheckOptions> & Readonly<{
|
|
285
|
+
readonly options?: never;
|
|
286
|
+
}>;
|
|
287
|
+
interface TypedCheckFields<PreparedOptions extends object, Parser extends CheckDataParser> {
|
|
288
|
+
/**
|
|
289
|
+
* 将 canonical runtime data 还原为 provider data。
|
|
290
|
+
*
|
|
291
|
+
* 启发式边界:同版本且受信任的 provider 若由测试保证 data shape,可仅将它实现为
|
|
292
|
+
* identity/type anchor。这不验证 JavaScript 或基于 cast 的 producer、历史或跨版本 artifact,
|
|
293
|
+
* 也不验证不受信任输入。
|
|
294
|
+
*/
|
|
295
|
+
readonly parseData: Parser;
|
|
296
|
+
execution(this: void, context: CheckExecutionContext<PreparedOptions>): CheckResult<NoInfer<ReturnType<Parser>>> | Promise<CheckResult<NoInfer<ReturnType<Parser>>>>;
|
|
297
|
+
}
|
|
298
|
+
export type TypedCheckWithOptions<Id extends string, AuthoredOptions extends object, Parser extends CheckDataParser, PreparedOptions extends object = AuthoredOptions> = CheckAuthoringBase<Id, AuthoredOptions, PreparedOptions> & TypedCheckFields<PreparedOptions, Parser> & Readonly<{
|
|
299
|
+
readonly options: AuthoredOptions;
|
|
300
|
+
}>;
|
|
301
|
+
export type TypedCheckWithoutOptions<Id extends string, Parser extends CheckDataParser> = CheckAuthoringBase<Id, EmptyCheckOptions, EmptyCheckOptions> & TypedCheckFields<EmptyCheckOptions, Parser> & Readonly<{
|
|
302
|
+
readonly options?: never;
|
|
303
|
+
}>;
|
|
304
|
+
/**
|
|
305
|
+
* 定义一个 Check,同时保留 literal `checkId`、options 与 typed-provider parser 的 inference。
|
|
306
|
+
*
|
|
307
|
+
* @remarks 此函数负责 authoring inference;{@link run} 负责 Project Definition validation。
|
|
308
|
+
* @example 定义带 options、Records 与 messages 的自定义 Check
|
|
309
|
+
* ```ts
|
|
310
|
+
* function hasValidLicensePolicyOptions(options: object): boolean {
|
|
311
|
+
* const denied: unknown = Reflect.get(options, "denied");
|
|
312
|
+
* return (
|
|
313
|
+
* Object.keys(options).length === 1 &&
|
|
314
|
+
* Object.hasOwn(options, "denied") &&
|
|
315
|
+
* Array.isArray(denied) &&
|
|
316
|
+
* denied.every((license) => typeof license === "string")
|
|
317
|
+
* );
|
|
318
|
+
* }
|
|
319
|
+
*
|
|
320
|
+
* const licensePolicy = defineCheck({
|
|
321
|
+
* checkId: "license-policy",
|
|
322
|
+
* displayName: "License policy",
|
|
323
|
+
* options: { denied: ["GPL-3.0-only"] },
|
|
324
|
+
* preflight(options) {
|
|
325
|
+
* return hasValidLicensePolicyOptions(options)
|
|
326
|
+
* ? { status: "success", preparedOptions: options }
|
|
327
|
+
* : { status: "failure", action: "block", reason: { code: "invalid-options" } };
|
|
328
|
+
* },
|
|
329
|
+
* visibility: "attention",
|
|
330
|
+
* execution({ options, records, signal }) {
|
|
331
|
+
* if (signal.aborted) return { status: "unavailable", reason: { code: "cancelled" } };
|
|
332
|
+
*
|
|
333
|
+
* const deniedCount = options.denied.length;
|
|
334
|
+
* if (deniedCount > 0) {
|
|
335
|
+
* records.report({ id: "denied-license" }, { count: deniedCount });
|
|
336
|
+
* return {
|
|
337
|
+
* status: "failed",
|
|
338
|
+
* data: { deniedCount },
|
|
339
|
+
* messages: [{ level: "warning", code: "denied-license", message: "Denied licenses found." }]
|
|
340
|
+
* };
|
|
341
|
+
* }
|
|
342
|
+
* return { status: "passed", data: { deniedCount: 0 } };
|
|
343
|
+
* }
|
|
344
|
+
* });
|
|
345
|
+
* ```
|
|
346
|
+
*/
|
|
347
|
+
export declare function defineCheck<const Id extends string, AuthoredOptions extends object, PreparedOptions extends object = AuthoredOptions>(value: CheckWithOptions<Id, AuthoredOptions, PreparedOptions>): CheckWithOptions<Id, AuthoredOptions, PreparedOptions>;
|
|
348
|
+
export declare function defineCheck<const Id extends string>(value: CheckWithoutOptions<Id>): CheckWithoutOptions<Id>;
|
|
349
|
+
export declare function defineCheck<const Id extends string, AuthoredOptions extends object, const Parser extends CheckDataParser, PreparedOptions extends object = AuthoredOptions>(value: TypedCheckWithOptions<Id, AuthoredOptions, Parser, PreparedOptions>): TypedCheckWithOptions<Id, AuthoredOptions, Parser, PreparedOptions>;
|
|
350
|
+
export declare function defineCheck<const Id extends string, const Parser extends CheckDataParser>(value: TypedCheckWithoutOptions<Id, Parser>): TypedCheckWithoutOptions<Id, Parser>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CheckDescriptor } from "./descriptor.ts";
|
|
2
|
+
export interface CheckDescriptorValidationIssue {
|
|
3
|
+
readonly path: string;
|
|
4
|
+
readonly code: "invalid-value";
|
|
5
|
+
readonly message: string;
|
|
6
|
+
}
|
|
7
|
+
export type CheckDescriptorValidationResult = Readonly<{
|
|
8
|
+
readonly ok: true;
|
|
9
|
+
readonly value: CheckDescriptor;
|
|
10
|
+
} | {
|
|
11
|
+
readonly ok: false;
|
|
12
|
+
readonly issues: readonly [
|
|
13
|
+
CheckDescriptorValidationIssue,
|
|
14
|
+
...CheckDescriptorValidationIssue[]
|
|
15
|
+
];
|
|
16
|
+
}>;
|
|
17
|
+
/** Validates the minimal Check identity shared by Definition authoring and final facts. */
|
|
18
|
+
export declare function validateCheckDescriptor(value: unknown): CheckDescriptorValidationResult;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare const INHERITED_CHECK_COLLECTION: unique symbol;
|
|
2
|
+
/** 使用 {@link inherit} 对父 Check 的 string collection 做显式增删的输入。 */
|
|
3
|
+
export type InheritCheckCollectionInput<T> = Readonly<{
|
|
4
|
+
readonly add: readonly T[];
|
|
5
|
+
readonly remove?: readonly T[];
|
|
6
|
+
} | {
|
|
7
|
+
readonly add?: readonly T[];
|
|
8
|
+
readonly remove: readonly T[];
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* 由 {@link inherit} 创建、带有不可伪造 marker 的 collection edit。
|
|
12
|
+
*
|
|
13
|
+
* @remarks Definition validation 不接受看起来相同的 plain object。
|
|
14
|
+
*/
|
|
15
|
+
export type InheritedCheckCollection<T> = InheritCheckCollectionInput<T> & Readonly<{
|
|
16
|
+
readonly [INHERITED_CHECK_COLLECTION]: true;
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* 可以直接替换父 collection 的数组,或由 {@link inherit} 表示的显式 edit。
|
|
20
|
+
*
|
|
21
|
+
* @typeParam T - collection item 类型。
|
|
22
|
+
*/
|
|
23
|
+
export type InheritableCheckCollection<T> = readonly T[] | InheritedCheckCollection<T>;
|
|
24
|
+
/**
|
|
25
|
+
* 创建可用于 `dependsOn` 或 `mutex` 的受信任继承编辑。
|
|
26
|
+
*
|
|
27
|
+
* @typeParam T - 要添加或移除的 collection item 类型。
|
|
28
|
+
* @param value - 至少提供 `add` 或 `remove` 的 edit;空数组可显式表示不添加或不移除。
|
|
29
|
+
* @returns 只有此函数创建的值会被 Definition validation 识别为 inherited collection。
|
|
30
|
+
*/
|
|
31
|
+
export declare function inherit<T>(value: InheritCheckCollectionInput<T>): InheritedCheckCollection<T>;
|
|
32
|
+
export declare function isInheritedCheckCollection(value: unknown): value is InheritedCheckCollection<unknown>;
|
|
33
|
+
/** Copies the trusted marker while preserving the authoring data's closed shape. */
|
|
34
|
+
export declare function snapshotInheritedCheckCollection(value: InheritedCheckCollection<unknown>): Readonly<Record<string, unknown>> | undefined;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CoreSnapshot } from "./facts.ts";
|
|
2
|
+
export interface ValidationIssue {
|
|
3
|
+
readonly path: string;
|
|
4
|
+
readonly code: "duplicate" | "identity-mismatch" | "invalid-value" | "missing-field" | "unknown-field";
|
|
5
|
+
readonly message: string;
|
|
6
|
+
}
|
|
7
|
+
export type ValidationResult<T> = Readonly<{
|
|
8
|
+
readonly ok: true;
|
|
9
|
+
readonly value: T;
|
|
10
|
+
} | {
|
|
11
|
+
readonly ok: false;
|
|
12
|
+
readonly issues: readonly [ValidationIssue, ...ValidationIssue[]];
|
|
13
|
+
}>;
|
|
14
|
+
export declare function validateCoreSnapshot(value: unknown): ValidationResult<CoreSnapshot>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CheckDescriptor } from "../check/descriptor.ts";
|
|
2
|
+
import type { CheckOutcome } from "../check/check.ts";
|
|
3
|
+
export type { CanonicalJsonObject, CanonicalJsonPrimitive, CanonicalJsonValue } from "../data-boundary/canonical-data.ts";
|
|
4
|
+
export type { CheckDescriptor, CheckOutcome };
|
|
5
|
+
/** A Core Check has exactly one terminal outcome and no execution bookkeeping. */
|
|
6
|
+
export interface CoreCheck extends CheckDescriptor {
|
|
7
|
+
readonly outcome: CheckOutcome;
|
|
8
|
+
}
|
|
9
|
+
/** A supplemental Record is owned by its structural `{ checkId, id }` identity. */
|
|
10
|
+
export interface CoreRecord {
|
|
11
|
+
readonly checkId: string;
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly data: import("../data-boundary/canonical-data.ts").CanonicalJsonObject;
|
|
14
|
+
}
|
|
15
|
+
/** The complete Product entity projection. Invocation metadata belongs to Run, not Core. */
|
|
16
|
+
export interface CoreSnapshot {
|
|
17
|
+
readonly checks: readonly CoreCheck[];
|
|
18
|
+
readonly records: readonly CoreRecord[];
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CheckOutcome } from "../check/check.ts";
|
|
2
|
+
interface OutcomeNormalizationInput {
|
|
3
|
+
readonly knownCheckIds: ReadonlySet<string>;
|
|
4
|
+
readonly productOutcome: boolean;
|
|
5
|
+
readonly value: unknown;
|
|
6
|
+
}
|
|
7
|
+
/** Normalizes one live Check terminal value before the settlement session commits it. */
|
|
8
|
+
export declare function normalizeCheckOutcome(input: OutcomeNormalizationInput): CheckOutcome | undefined;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CoreRecord } from "./facts.ts";
|
|
2
|
+
export type RecordSubmissionResult = "committed" | "rejected";
|
|
3
|
+
export type RecordDiagnostic = "record-conflict" | "record-invalid";
|
|
4
|
+
export interface CoreRecordSlot {
|
|
5
|
+
readonly checkId: string;
|
|
6
|
+
readonly diagnostics: Set<RecordDiagnostic>;
|
|
7
|
+
readonly recordIds: Set<string>;
|
|
8
|
+
}
|
|
9
|
+
/** Holds one Check's minimal Records without inventing a composite string identity. */
|
|
10
|
+
export declare class CoreRecordStore {
|
|
11
|
+
#private;
|
|
12
|
+
report(slot: CoreRecordSlot, rawIdentity: unknown, rawData: unknown): RecordSubmissionResult;
|
|
13
|
+
recordsInCanonicalOrder(): readonly CoreRecord[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { CheckDescriptor } from "../check/descriptor.ts";
|
|
2
|
+
import type { CheckOutcome } from "../check/check.ts";
|
|
3
|
+
import { type RecordSubmissionResult } from "./record-store.ts";
|
|
4
|
+
import type { CoreSnapshot } from "./facts.ts";
|
|
5
|
+
export type { RecordSubmissionResult } from "./record-store.ts";
|
|
6
|
+
export interface CoreCheckRegistration {
|
|
7
|
+
readonly definition: CheckDescriptor;
|
|
8
|
+
}
|
|
9
|
+
/** Internal Record port bound to one currently executing Check. */
|
|
10
|
+
export interface RecordSink {
|
|
11
|
+
report(identity: unknown, data: unknown): RecordSubmissionResult;
|
|
12
|
+
}
|
|
13
|
+
/** Only the Product Task adapter receives this Core lifecycle capability. */
|
|
14
|
+
export interface TrustedCheckScope {
|
|
15
|
+
readonly records: RecordSink;
|
|
16
|
+
/** Core is the only author-result validation/canonicalization boundary. */
|
|
17
|
+
readonly settle: (outcome: unknown) => AuthorCheckSettlement;
|
|
18
|
+
/** Private Product lifecycle outcomes may include contained prerequisite IDs. */
|
|
19
|
+
readonly settleProduct: (outcome: CheckOutcome) => CheckOutcome;
|
|
20
|
+
}
|
|
21
|
+
/** Core's private marker for an author result that survived every settlement guard. */
|
|
22
|
+
export interface AuthorCheckSettlement {
|
|
23
|
+
readonly authorResultAccepted: boolean;
|
|
24
|
+
readonly outcome: CheckOutcome;
|
|
25
|
+
}
|
|
26
|
+
export interface CoreCheckSession {
|
|
27
|
+
openCheckScope(checkId: string): TrustedCheckScope;
|
|
28
|
+
readSettledCheckOutcome(checkId: string): CheckOutcome;
|
|
29
|
+
closeUnresolvedAsCancelled(): readonly CancelledCheckClosure[];
|
|
30
|
+
freeze(): CoreSnapshot;
|
|
31
|
+
}
|
|
32
|
+
/** Product-private cancellation facts emitted at the exact Core closure boundary. */
|
|
33
|
+
export interface CancelledCheckClosure {
|
|
34
|
+
readonly checkId: string;
|
|
35
|
+
readonly outcome: CheckOutcome;
|
|
36
|
+
}
|
|
37
|
+
/** A trusted integration bug is fatal to the invocation, not a Check outcome. */
|
|
38
|
+
export declare class CoreInvariantFailure extends Error {
|
|
39
|
+
constructor(message: string);
|
|
40
|
+
}
|
|
41
|
+
export declare function createCoreCheckSession(registrations: readonly CoreCheckRegistration[]): CoreCheckSession;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CanonicalJsonObject, CanonicalJsonValue } from "./canonical-json.ts";
|
|
2
|
+
export type { CanonicalJsonObject, CanonicalJsonPrimitive, CanonicalJsonValue } from "./canonical-json.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Materializes arbitrary author data without property reads or JSON hooks.
|
|
5
|
+
* The returned graph is detached, prototype-safe, and deeply frozen before it
|
|
6
|
+
* becomes a Core fact. Canonical text order is applied explicitly at serialization.
|
|
7
|
+
*/
|
|
8
|
+
export declare function canonicalizeJsonObject(value: unknown): CanonicalJsonObject | undefined;
|
|
9
|
+
export declare function canonicalizeJsonValue(value: unknown): CanonicalJsonValue | undefined;
|
|
10
|
+
/** Serializes detached canonical JSON with explicit lexical object-key ordering. */
|
|
11
|
+
export declare function canonicalJsonText(value: unknown): string;
|
|
12
|
+
/** Emits canonical UTF-8 JSON without invoking author getters or `toJSON`. */
|
|
13
|
+
export declare function canonicalJsonBytes(value: unknown): Uint8Array;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Package-private static shape for Product's detached canonical JSON facts. */
|
|
2
|
+
export type CanonicalJsonPrimitive = boolean | null | number | string;
|
|
3
|
+
export type CanonicalJsonValue = CanonicalJsonPrimitive | readonly CanonicalJsonValue[] | CanonicalJsonObject;
|
|
4
|
+
export interface CanonicalJsonObject {
|
|
5
|
+
readonly [key: string]: CanonicalJsonValue;
|
|
6
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function snapshotPlainRecord(value: unknown): Readonly<Record<string, unknown>> | undefined;
|
|
2
|
+
export declare function snapshotClosedRecord(value: unknown): Readonly<Record<string, unknown>> | undefined;
|
|
3
|
+
export declare function snapshotClosedArray(value: unknown): readonly unknown[] | undefined;
|
|
4
|
+
export declare function hasExactPlainRecordKeys(value: Readonly<Record<string, unknown>>, keys: readonly string[]): boolean;
|
|
5
|
+
export declare function hasRequiredAndOptionalRecordKeys(value: Readonly<Record<string, unknown>>, keys: Readonly<{
|
|
6
|
+
readonly optional: readonly string[];
|
|
7
|
+
readonly required: readonly string[];
|
|
8
|
+
}>): boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
2
|
+
export declare function isNonArrayRecord(value: unknown): value is Record<string, unknown>;
|
|
3
|
+
export declare function isUnknownArray(value: unknown): value is unknown[];
|
|
4
|
+
export declare function isStringArray(value: unknown): value is string[];
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type CanonicalJsonValue } from "../data-boundary/canonical-data.ts";
|
|
2
|
+
/** 由采用方声明、用于匹配一个 finding 的语义身份与豁免理由。 */
|
|
3
|
+
export interface FindingWaiver<Identity> {
|
|
4
|
+
/** 调用方定义的稳定 finding 身份;匹配时按 canonical JSON 结构比较。 */
|
|
5
|
+
readonly identity: Identity;
|
|
6
|
+
/** 解释该 finding 在当前范围内可被豁免的非空理由。 */
|
|
7
|
+
readonly reason: string;
|
|
8
|
+
}
|
|
9
|
+
/** helper 安全 materialize 后保留的 waiver evidence;identity 是 detached canonical JSON。 */
|
|
10
|
+
export interface MaterializedFindingWaiver {
|
|
11
|
+
/** 从 authored identity materialize 的 detached、deep-frozen canonical JSON。 */
|
|
12
|
+
readonly identity: CanonicalJsonValue;
|
|
13
|
+
/** 从 authored reason materialize 的非空理由。 */
|
|
14
|
+
readonly reason: string;
|
|
15
|
+
}
|
|
16
|
+
/** 一项 finding waiver 的配置与匹配次数审计。 */
|
|
17
|
+
export interface FindingWaiverAudit {
|
|
18
|
+
/** 被审计的 materialized authored waiver evidence,而非调用方可变输入引用。 */
|
|
19
|
+
readonly waiver: MaterializedFindingWaiver;
|
|
20
|
+
/** 该 waiver identity 在完整 finding 集合中匹配到的数量。 */
|
|
21
|
+
readonly matchCount: number;
|
|
22
|
+
/** 未使用、正常应用,或因过宽而没有应用。 */
|
|
23
|
+
readonly status: "unused" | "applied" | "overmatched";
|
|
24
|
+
}
|
|
25
|
+
/** reconciliation 后单个 finding 的可执行处置;只有 `waived` branch 携带 matched waiver。 */
|
|
26
|
+
export type ReconciledFinding<Finding> = Readonly<{
|
|
27
|
+
/** 原始 finding;helper 不解释或改写它的领域字段。 */
|
|
28
|
+
readonly finding: Finding;
|
|
29
|
+
/** 没有匹配 waiver 的正常待处理 finding。 */
|
|
30
|
+
readonly disposition: "actionable";
|
|
31
|
+
} | {
|
|
32
|
+
/** 原始 finding;helper 不解释或改写它的领域字段。 */
|
|
33
|
+
readonly finding: Finding;
|
|
34
|
+
/** 恰好匹配一项 waiver 的 finding。 */
|
|
35
|
+
readonly disposition: "waived";
|
|
36
|
+
/** applied waiver 的身份和理由。 */
|
|
37
|
+
readonly waiver: MaterializedFindingWaiver;
|
|
38
|
+
} | {
|
|
39
|
+
/** 原始 finding;helper 不解释或改写它的领域字段。 */
|
|
40
|
+
readonly finding: Finding;
|
|
41
|
+
/** `overmatched` 保持为待处理,避免宽泛 waiver 静默覆盖多个 finding。 */
|
|
42
|
+
readonly disposition: "overmatched";
|
|
43
|
+
}>;
|
|
44
|
+
/** 调用方提供完整候选集、身份识别器和 waiver 配置的输入。 */
|
|
45
|
+
export interface ReconcileFindingWaiversOptions<Finding, Identity> {
|
|
46
|
+
/** 必须是完整 finding 候选集合,helper 才能审计每项 waiver 的匹配次数。 */
|
|
47
|
+
readonly findings: readonly Finding[];
|
|
48
|
+
/** 从完整 finding 提取调用方选择的稳定语义身份。 */
|
|
49
|
+
readonly identify: (finding: Finding) => Identity;
|
|
50
|
+
/** 要与识别器输出进行 canonical structural matching 的 waiver。 */
|
|
51
|
+
readonly waivers: readonly FindingWaiver<Identity>[];
|
|
52
|
+
}
|
|
53
|
+
/** 独立 waiver reconciliation 的完整输出,保留 finding 处置和每项配置审计。 */
|
|
54
|
+
export interface FindingWaiverReconciliation<Finding> {
|
|
55
|
+
/** 与 input finding 顺序相同的 reconciliation 结果。 */
|
|
56
|
+
readonly findings: readonly ReconciledFinding<Finding>[];
|
|
57
|
+
/** 与 input waiver 顺序相同的完整配置审计。 */
|
|
58
|
+
readonly waiverAudits: readonly FindingWaiverAudit[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* 按调用方定义的语义身份对完整 finding 集合和 waiver 配置做 canonical structural reconciliation。
|
|
62
|
+
*
|
|
63
|
+
* 每项 waiver 必须有唯一、可 canonicalize 的 identity 和非空 reason。匹配零项时产生 `unused` 审计;
|
|
64
|
+
* 匹配一项时该 finding 为 `waived`;匹配多项时产生 `overmatched` 审计,相关 finding 保持待处理。
|
|
65
|
+
*/
|
|
66
|
+
export declare function reconcileFindingWaivers<Finding, Identity>(options: ReconcileFindingWaiversOptions<Finding, Identity>): FindingWaiverReconciliation<Finding>;
|