@shrkcrft/cli 0.1.0-alpha.29 → 0.1.0-alpha.31
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/dist/asset-preview/apply-asset-preview.js +1 -1
- package/dist/authoring/authoring-kit.d.ts +9 -1
- package/dist/authoring/authoring-kit.d.ts.map +1 -1
- package/dist/authoring/authoring-kit.js +26 -13
- package/dist/bootstrap/unlinked-workspace-dependency.d.ts +11 -0
- package/dist/bootstrap/unlinked-workspace-dependency.d.ts.map +1 -0
- package/dist/bootstrap/unlinked-workspace-dependency.js +99 -0
- package/dist/command-registry.d.ts +100 -1
- package/dist/command-registry.d.ts.map +1 -1
- package/dist/command-registry.js +130 -3
- package/dist/commands/api-diff.command.d.ts.map +1 -1
- package/dist/commands/api-diff.command.js +12 -0
- package/dist/commands/apply.command.d.ts.map +1 -1
- package/dist/commands/apply.command.js +3 -0
- package/dist/commands/arch.command.d.ts.map +1 -1
- package/dist/commands/arch.command.js +26 -7
- package/dist/commands/architecture.command.d.ts.map +1 -1
- package/dist/commands/architecture.command.js +8 -2
- package/dist/commands/baseline.command.d.ts +76 -0
- package/dist/commands/baseline.command.d.ts.map +1 -1
- package/dist/commands/baseline.command.js +599 -75
- package/dist/commands/biome.command.d.ts.map +1 -1
- package/dist/commands/biome.command.js +20 -0
- package/dist/commands/boundaries.command.d.ts +9 -1
- package/dist/commands/boundaries.command.d.ts.map +1 -1
- package/dist/commands/boundaries.command.js +88 -20
- package/dist/commands/bundle.command.d.ts.map +1 -1
- package/dist/commands/bundle.command.js +57 -11
- package/dist/commands/cache-align.command.d.ts.map +1 -1
- package/dist/commands/cache-align.command.js +3 -1
- package/dist/commands/changelog-data.d.ts.map +1 -1
- package/dist/commands/changelog-data.js +164 -0
- package/dist/commands/changes.command.d.ts.map +1 -1
- package/dist/commands/changes.command.js +15 -0
- package/dist/commands/check.command.d.ts.map +1 -1
- package/dist/commands/check.command.js +1260 -324
- package/dist/commands/checks.command.d.ts.map +1 -1
- package/dist/commands/checks.command.js +188 -40
- package/dist/commands/ci.command.d.ts.map +1 -1
- package/dist/commands/ci.command.js +35 -2
- package/dist/commands/code-intel.command.d.ts.map +1 -1
- package/dist/commands/code-intel.command.js +8 -1
- package/dist/commands/command-catalog.d.ts +23 -1
- package/dist/commands/command-catalog.d.ts.map +1 -1
- package/dist/commands/command-catalog.js +152 -35
- package/dist/commands/commands.command.d.ts +21 -3
- package/dist/commands/commands.command.d.ts.map +1 -1
- package/dist/commands/commands.command.js +172 -27
- package/dist/commands/compress.command.d.ts.map +1 -1
- package/dist/commands/compress.command.js +4 -0
- package/dist/commands/constructs.command.d.ts.map +1 -1
- package/dist/commands/constructs.command.js +50 -12
- package/dist/commands/context.command.d.ts.map +1 -1
- package/dist/commands/context.command.js +40 -5
- package/dist/commands/contract-templates.command.d.ts.map +1 -1
- package/dist/commands/contract-templates.command.js +9 -1
- package/dist/commands/contract.command.d.ts.map +1 -1
- package/dist/commands/contract.command.js +35 -0
- package/dist/commands/conventions.command.d.ts.map +1 -1
- package/dist/commands/conventions.command.js +189 -29
- package/dist/commands/coverage.command.d.ts.map +1 -1
- package/dist/commands/coverage.command.js +9 -0
- package/dist/commands/daily.commands.d.ts +0 -1
- package/dist/commands/daily.commands.d.ts.map +1 -1
- package/dist/commands/daily.commands.js +12 -76
- package/dist/commands/dashboard.command.d.ts.map +1 -1
- package/dist/commands/dashboard.command.js +10 -0
- package/dist/commands/dev.command.d.ts.map +1 -1
- package/dist/commands/dev.command.js +45 -2
- package/dist/commands/diagnostics.command.d.ts +0 -2
- package/dist/commands/diagnostics.command.d.ts.map +1 -1
- package/dist/commands/diagnostics.command.js +5 -78
- package/dist/commands/diff-check.command.d.ts +6 -4
- package/dist/commands/diff-check.command.d.ts.map +1 -1
- package/dist/commands/diff-check.command.js +190 -103
- package/dist/commands/docs-references.command.d.ts +20 -0
- package/dist/commands/docs-references.command.d.ts.map +1 -0
- package/dist/commands/docs-references.command.js +520 -0
- package/dist/commands/doctor.command.d.ts.map +1 -1
- package/dist/commands/doctor.command.js +60 -5
- package/dist/commands/drift.command.d.ts.map +1 -1
- package/dist/commands/drift.command.js +17 -4
- package/dist/commands/eslint.command.d.ts.map +1 -1
- package/dist/commands/eslint.command.js +20 -0
- package/dist/commands/export.command.d.ts.map +1 -1
- package/dist/commands/export.command.js +23 -1
- package/dist/commands/feedback-dispatch.command.d.ts.map +1 -1
- package/dist/commands/feedback-dispatch.command.js +29 -0
- package/dist/commands/feedback.command.d.ts.map +1 -1
- package/dist/commands/feedback.command.js +6 -1
- package/dist/commands/finish.command.d.ts.map +1 -1
- package/dist/commands/finish.command.js +32 -8
- package/dist/commands/fix.command.d.ts.map +1 -1
- package/dist/commands/fix.command.js +19 -0
- package/dist/commands/gate.command.d.ts +6 -1
- package/dist/commands/gate.command.d.ts.map +1 -1
- package/dist/commands/gate.command.js +50 -124
- package/dist/commands/gates.command.d.ts +54 -0
- package/dist/commands/gates.command.d.ts.map +1 -1
- package/dist/commands/gates.command.js +1314 -64
- package/dist/commands/gen.command.d.ts.map +1 -1
- package/dist/commands/gen.command.js +4 -0
- package/dist/commands/generated.command.d.ts +62 -0
- package/dist/commands/generated.command.d.ts.map +1 -1
- package/dist/commands/generated.command.js +639 -156
- package/dist/commands/graph-code-subverbs.d.ts +15 -0
- package/dist/commands/graph-code-subverbs.d.ts.map +1 -1
- package/dist/commands/graph-code-subverbs.js +203 -25
- package/dist/commands/graph.command.d.ts.map +1 -1
- package/dist/commands/graph.command.js +79 -37
- package/dist/commands/help.command.d.ts +30 -6
- package/dist/commands/help.command.d.ts.map +1 -1
- package/dist/commands/help.command.js +323 -199
- package/dist/commands/helper.command.d.ts +1 -0
- package/dist/commands/helper.command.d.ts.map +1 -1
- package/dist/commands/helper.command.js +195 -56
- package/dist/commands/impact.command.d.ts.map +1 -1
- package/dist/commands/impact.command.js +115 -12
- package/dist/commands/infer.command.d.ts.map +1 -1
- package/dist/commands/infer.command.js +20 -45
- package/dist/commands/ingest.command.d.ts +0 -1
- package/dist/commands/ingest.command.d.ts.map +1 -1
- package/dist/commands/ingest.command.js +25 -41
- package/dist/commands/knowledge-author.command.d.ts +0 -3
- package/dist/commands/knowledge-author.command.d.ts.map +1 -1
- package/dist/commands/knowledge-author.command.js +10 -23
- package/dist/commands/knowledge.command.d.ts.map +1 -1
- package/dist/commands/knowledge.command.js +469 -129
- package/dist/commands/languages.command.d.ts.map +1 -1
- package/dist/commands/languages.command.js +27 -0
- package/dist/commands/lint.command.d.ts.map +1 -1
- package/dist/commands/lint.command.js +3 -0
- package/dist/commands/mcp.command.d.ts +18 -0
- package/dist/commands/mcp.command.d.ts.map +1 -1
- package/dist/commands/mcp.command.js +33 -8
- package/dist/commands/onboard.command.d.ts.map +1 -1
- package/dist/commands/onboard.command.js +20 -0
- package/dist/commands/owners.command.d.ts.map +1 -1
- package/dist/commands/owners.command.js +14 -2
- package/dist/commands/packs-new.d.ts +13 -1
- package/dist/commands/packs-new.d.ts.map +1 -1
- package/dist/commands/packs-new.js +500 -335
- package/dist/commands/packs.command.d.ts.map +1 -1
- package/dist/commands/packs.command.js +378 -36
- package/dist/commands/paths.command.d.ts.map +1 -1
- package/dist/commands/paths.command.js +9 -1
- package/dist/commands/pipelines.command.d.ts.map +1 -1
- package/dist/commands/pipelines.command.js +7 -1
- package/dist/commands/plan-check.command.d.ts.map +1 -1
- package/dist/commands/plan-check.command.js +3 -0
- package/dist/commands/plan.command.d.ts.map +1 -1
- package/dist/commands/plan.command.js +3 -0
- package/dist/commands/playbooks.command.d.ts.map +1 -1
- package/dist/commands/playbooks.command.js +7 -2
- package/dist/commands/policy-lint.command.d.ts +19 -2
- package/dist/commands/policy-lint.command.d.ts.map +1 -1
- package/dist/commands/policy-lint.command.js +224 -65
- package/dist/commands/policy.command.d.ts.map +1 -1
- package/dist/commands/policy.command.js +6 -1
- package/dist/commands/pr.command.d.ts.map +1 -1
- package/dist/commands/pr.command.js +14 -0
- package/dist/commands/presets.command.d.ts.map +1 -1
- package/dist/commands/presets.command.js +12 -27
- package/dist/commands/profiles.command.d.ts.map +1 -1
- package/dist/commands/profiles.command.js +94 -26
- package/dist/commands/provenance.command.js +1 -1
- package/dist/commands/quality.command.d.ts.map +1 -1
- package/dist/commands/quality.command.js +129 -33
- package/dist/commands/recommend.command.d.ts +20 -4
- package/dist/commands/recommend.command.d.ts.map +1 -1
- package/dist/commands/recommend.command.js +172 -278
- package/dist/commands/registrations.command.d.ts.map +1 -1
- package/dist/commands/registrations.command.js +138 -13
- package/dist/commands/registry-lifecycle-run.d.ts +14 -0
- package/dist/commands/registry-lifecycle-run.d.ts.map +1 -0
- package/dist/commands/registry-lifecycle-run.js +336 -0
- package/dist/commands/registry.command.d.ts.map +1 -1
- package/dist/commands/registry.command.js +235 -62
- package/dist/commands/release.command.d.ts.map +1 -1
- package/dist/commands/release.command.js +99 -20
- package/dist/commands/report.command.d.ts.map +1 -1
- package/dist/commands/report.command.js +38 -2
- package/dist/commands/reuse-coverage.command.d.ts +23 -0
- package/dist/commands/reuse-coverage.command.d.ts.map +1 -0
- package/dist/commands/reuse-coverage.command.js +536 -0
- package/dist/commands/reuse.command.d.ts +3 -18
- package/dist/commands/reuse.command.d.ts.map +1 -1
- package/dist/commands/reuse.command.js +395 -244
- package/dist/commands/review.command.d.ts.map +1 -1
- package/dist/commands/review.command.js +33 -1
- package/dist/commands/rounds.command.d.ts.map +1 -1
- package/dist/commands/rounds.command.js +5 -0
- package/dist/commands/safety.command.d.ts.map +1 -1
- package/dist/commands/safety.command.js +9 -0
- package/dist/commands/scaffolds.command.d.ts.map +1 -1
- package/dist/commands/scaffolds.command.js +97 -25
- package/dist/commands/search.command.d.ts +0 -8
- package/dist/commands/search.command.d.ts.map +1 -1
- package/dist/commands/search.command.js +136 -28
- package/dist/commands/self-config-xrefs.command.d.ts +24 -0
- package/dist/commands/self-config-xrefs.command.d.ts.map +1 -0
- package/dist/commands/self-config-xrefs.command.js +170 -0
- package/dist/commands/self-config.command.d.ts.map +1 -1
- package/dist/commands/self-config.command.js +261 -65
- package/dist/commands/smart-context.command.d.ts.map +1 -1
- package/dist/commands/smart-context.command.js +39 -3
- package/dist/commands/spec.command.d.ts.map +1 -1
- package/dist/commands/spec.command.js +3 -0
- package/dist/commands/stats.command.d.ts.map +1 -1
- package/dist/commands/stats.command.js +3 -0
- package/dist/commands/surface.command.d.ts +6 -1
- package/dist/commands/surface.command.d.ts.map +1 -1
- package/dist/commands/surface.command.js +256 -54
- package/dist/commands/task-context.command.js +1 -1
- package/dist/commands/task.command.d.ts.map +1 -1
- package/dist/commands/task.command.js +22 -1
- package/dist/commands/templates.command.d.ts +4 -0
- package/dist/commands/templates.command.d.ts.map +1 -1
- package/dist/commands/templates.command.js +109 -22
- package/dist/commands/test.command.d.ts.map +1 -1
- package/dist/commands/test.command.js +161 -33
- package/dist/commands/tests.command.d.ts.map +1 -1
- package/dist/commands/tests.command.js +29 -3
- package/dist/commands/trace.command.d.ts.map +1 -1
- package/dist/commands/trace.command.js +29 -4
- package/dist/commands/watch.command.d.ts.map +1 -1
- package/dist/commands/watch.command.js +3 -0
- package/dist/commands/why.command.d.ts.map +1 -1
- package/dist/commands/why.command.js +3 -0
- package/dist/commands/wiring.command.d.ts +18 -4
- package/dist/commands/wiring.command.d.ts.map +1 -1
- package/dist/commands/wiring.command.js +362 -74
- package/dist/dashboard/code-intelligence-data.js +4 -4
- package/dist/diff/deleted-orphan-coverage.d.ts +32 -0
- package/dist/diff/deleted-orphan-coverage.d.ts.map +1 -0
- package/dist/diff/deleted-orphan-coverage.js +107 -0
- package/dist/diff/deleted-orphan-scope-notes.d.ts +23 -0
- package/dist/diff/deleted-orphan-scope-notes.d.ts.map +1 -0
- package/dist/diff/deleted-orphan-scope-notes.js +49 -0
- package/dist/diff/deleted-orphans.d.ts +32 -0
- package/dist/diff/deleted-orphans.d.ts.map +1 -1
- package/dist/diff/deleted-orphans.js +42 -2
- package/dist/dispatch/closest-match.d.ts +15 -0
- package/dist/dispatch/closest-match.d.ts.map +1 -0
- package/dist/dispatch/closest-match.js +47 -0
- package/dist/dispatch/global-flags.d.ts +94 -0
- package/dist/dispatch/global-flags.d.ts.map +1 -0
- package/dist/dispatch/global-flags.js +123 -0
- package/dist/dispatch/guard-invocation-input.d.ts +24 -0
- package/dist/dispatch/guard-invocation-input.d.ts.map +1 -0
- package/dist/dispatch/guard-invocation-input.js +1 -0
- package/dist/dispatch/guard-invocation.d.ts +33 -0
- package/dist/dispatch/guard-invocation.d.ts.map +1 -0
- package/dist/dispatch/guard-invocation.js +183 -0
- package/dist/dispatch/help-intercept.d.ts +22 -0
- package/dist/dispatch/help-intercept.d.ts.map +1 -0
- package/dist/dispatch/help-intercept.js +42 -0
- package/dist/dispatch/i-declared-invocation.d.ts +17 -0
- package/dist/dispatch/i-declared-invocation.d.ts.map +1 -0
- package/dist/dispatch/i-declared-invocation.js +1 -0
- package/dist/dispatch/i-unknown-flag-refusal-input.d.ts +28 -0
- package/dist/dispatch/i-unknown-flag-refusal-input.d.ts.map +1 -0
- package/dist/dispatch/i-unknown-flag-refusal-input.js +1 -0
- package/dist/dispatch/invocation-rejection-kind.d.ts +15 -0
- package/dist/dispatch/invocation-rejection-kind.d.ts.map +1 -0
- package/dist/dispatch/invocation-rejection-kind.js +15 -0
- package/dist/dispatch/invocation-rejection.d.ts +18 -0
- package/dist/dispatch/invocation-rejection.d.ts.map +1 -0
- package/dist/dispatch/invocation-rejection.js +1 -0
- package/dist/dispatch/judge-invocation.d.ts +24 -0
- package/dist/dispatch/judge-invocation.d.ts.map +1 -0
- package/dist/dispatch/judge-invocation.js +50 -0
- package/dist/dispatch/positional-mode.d.ts +18 -0
- package/dist/dispatch/positional-mode.d.ts.map +1 -0
- package/dist/dispatch/positional-mode.js +18 -0
- package/dist/dispatch/read-tracking-map.d.ts +28 -0
- package/dist/dispatch/read-tracking-map.d.ts.map +1 -0
- package/dist/dispatch/read-tracking-map.js +58 -0
- package/dist/dispatch/refuse-sibling-valve-flags.d.ts +30 -0
- package/dist/dispatch/refuse-sibling-valve-flags.d.ts.map +1 -0
- package/dist/dispatch/refuse-sibling-valve-flags.js +65 -0
- package/dist/dispatch/subverb-spec.d.ts +26 -0
- package/dist/dispatch/subverb-spec.d.ts.map +1 -0
- package/dist/dispatch/subverb-spec.js +1 -0
- package/dist/dispatch/undocumented-flag-reads.d.ts +22 -0
- package/dist/dispatch/undocumented-flag-reads.d.ts.map +1 -0
- package/dist/dispatch/undocumented-flag-reads.js +283 -0
- package/dist/dispatch/unknown-flag-refusal-mode.d.ts +13 -0
- package/dist/dispatch/unknown-flag-refusal-mode.d.ts.map +1 -0
- package/dist/dispatch/unknown-flag-refusal-mode.js +13 -0
- package/dist/dispatch/unknown-flag-refusal.d.ts +22 -0
- package/dist/dispatch/unknown-flag-refusal.d.ts.map +1 -0
- package/dist/dispatch/unknown-flag-refusal.js +57 -0
- package/dist/dispatch/unread-flags.d.ts +152 -0
- package/dist/dispatch/unread-flags.d.ts.map +1 -0
- package/dist/dispatch/unread-flags.js +295 -0
- package/dist/dispatch/verdict-valve-flag.d.ts +21 -0
- package/dist/dispatch/verdict-valve-flag.d.ts.map +1 -0
- package/dist/dispatch/verdict-valve-flag.js +21 -0
- package/dist/dispatch/walk-declared-subverbs.d.ts +14 -0
- package/dist/dispatch/walk-declared-subverbs.d.ts.map +1 -0
- package/dist/dispatch/walk-declared-subverbs.js +28 -0
- package/dist/exit-codes.d.ts +41 -3
- package/dist/exit-codes.d.ts.map +1 -1
- package/dist/exit-codes.js +153 -14
- package/dist/finish/run-finish.d.ts +72 -5
- package/dist/finish/run-finish.d.ts.map +1 -1
- package/dist/finish/run-finish.js +453 -104
- package/dist/gates/accepted-empty-note.d.ts +10 -0
- package/dist/gates/accepted-empty-note.d.ts.map +1 -0
- package/dist/gates/accepted-empty-note.js +11 -0
- package/dist/gates/allow-empty.d.ts +25 -0
- package/dist/gates/allow-empty.d.ts.map +1 -0
- package/dist/gates/allow-empty.js +27 -0
- package/dist/gates/asset-doctor-failing-units.d.ts +16 -0
- package/dist/gates/asset-doctor-failing-units.d.ts.map +1 -0
- package/dist/gates/asset-doctor-failing-units.js +14 -0
- package/dist/gates/asset-doctor-failure-line.d.ts +16 -0
- package/dist/gates/asset-doctor-failure-line.d.ts.map +1 -0
- package/dist/gates/asset-doctor-failure-line.js +28 -0
- package/dist/gates/empty-rule-advice-lines.d.ts +15 -0
- package/dist/gates/empty-rule-advice-lines.d.ts.map +1 -0
- package/dist/gates/empty-rule-advice-lines.js +20 -0
- package/dist/gates/gate-envelope.d.ts +85 -8
- package/dist/gates/gate-envelope.d.ts.map +1 -1
- package/dist/gates/gate-envelope.js +56 -7
- package/dist/gates/gate-rule-globs.d.ts +67 -0
- package/dist/gates/gate-rule-globs.d.ts.map +1 -0
- package/dist/gates/gate-rule-globs.js +139 -0
- package/dist/gates/gate-rule-view.d.ts +25 -6
- package/dist/gates/gate-rule-view.d.ts.map +1 -1
- package/dist/gates/gate-rule-view.js +105 -77
- package/dist/gates/i-coverage-dead-glob.d.ts +19 -0
- package/dist/gates/i-coverage-dead-glob.d.ts.map +1 -0
- package/dist/gates/i-coverage-dead-glob.js +1 -0
- package/dist/gates/i-coverage-negation.d.ts +13 -0
- package/dist/gates/i-coverage-negation.d.ts.map +1 -0
- package/dist/gates/i-coverage-negation.js +1 -0
- package/dist/gates/i-registration-query-settle-input.d.ts +18 -0
- package/dist/gates/i-registration-query-settle-input.d.ts.map +1 -0
- package/dist/gates/i-registration-query-settle-input.js +1 -0
- package/dist/gates/i-unit-state-note-row.d.ts +16 -0
- package/dist/gates/i-unit-state-note-row.d.ts.map +1 -0
- package/dist/gates/i-unit-state-note-row.js +1 -0
- package/dist/gates/i-unit-state-notes.d.ts +32 -0
- package/dist/gates/i-unit-state-notes.d.ts.map +1 -0
- package/dist/gates/i-unit-state-notes.js +1 -0
- package/dist/gates/incomplete-registry-inventory.d.ts +19 -0
- package/dist/gates/incomplete-registry-inventory.d.ts.map +1 -0
- package/dist/gates/incomplete-registry-inventory.js +63 -0
- package/dist/gates/measure-registration-roles.d.ts +10 -0
- package/dist/gates/measure-registration-roles.d.ts.map +1 -0
- package/dist/gates/measure-registration-roles.js +9 -0
- package/dist/gates/plane-verdict.d.ts +14 -0
- package/dist/gates/plane-verdict.d.ts.map +1 -0
- package/dist/gates/plane-verdict.js +22 -0
- package/dist/gates/qualify-clean-for-units.d.ts +12 -0
- package/dist/gates/qualify-clean-for-units.d.ts.map +1 -0
- package/dist/gates/qualify-clean-for-units.js +18 -0
- package/dist/gates/registration-graph-verdict.d.ts +34 -0
- package/dist/gates/registration-graph-verdict.d.ts.map +1 -0
- package/dist/gates/registration-graph-verdict.js +70 -0
- package/dist/gates/registration-roles.d.ts +9 -0
- package/dist/gates/registration-roles.d.ts.map +1 -0
- package/dist/gates/registration-roles.js +1 -0
- package/dist/gates/registry-liveness.d.ts +11 -0
- package/dist/gates/registry-liveness.d.ts.map +1 -0
- package/dist/gates/registry-liveness.js +13 -0
- package/dist/gates/rule-coverage.d.ts +225 -4
- package/dist/gates/rule-coverage.d.ts.map +1 -1
- package/dist/gates/rule-coverage.js +610 -43
- package/dist/gates/run-gate-planes.d.ts +58 -0
- package/dist/gates/run-gate-planes.d.ts.map +1 -0
- package/dist/gates/run-gate-planes.js +403 -0
- package/dist/gates/scaffold-selftest.d.ts +56 -0
- package/dist/gates/scaffold-selftest.d.ts.map +1 -0
- package/dist/gates/scaffold-selftest.js +119 -0
- package/dist/gates/seam-rejected-rules.d.ts +28 -0
- package/dist/gates/seam-rejected-rules.d.ts.map +1 -0
- package/dist/gates/seam-rejected-rules.js +95 -0
- package/dist/gates/self-test-check.d.ts +29 -0
- package/dist/gates/self-test-check.d.ts.map +1 -0
- package/dist/gates/self-test-check.js +1 -0
- package/dist/gates/self-test-subject.d.ts +28 -0
- package/dist/gates/self-test-subject.d.ts.map +1 -0
- package/dist/gates/self-test-subject.js +1 -0
- package/dist/gates/self-test.d.ts +20 -0
- package/dist/gates/self-test.d.ts.map +1 -0
- package/dist/gates/self-test.js +82 -0
- package/dist/gates/settle-verdict.d.ts +14 -0
- package/dist/gates/settle-verdict.d.ts.map +1 -0
- package/dist/gates/settle-verdict.js +13 -0
- package/dist/gates/settled-verdict.d.ts +8 -0
- package/dist/gates/settled-verdict.d.ts.map +1 -0
- package/dist/gates/settled-verdict.js +1 -0
- package/dist/gates/template-registry-coverage.d.ts +18 -0
- package/dist/gates/template-registry-coverage.d.ts.map +1 -0
- package/dist/gates/template-registry-coverage.js +24 -0
- package/dist/gates/unit-state-notes.d.ts +40 -0
- package/dist/gates/unit-state-notes.d.ts.map +1 -0
- package/dist/gates/unit-state-notes.js +71 -0
- package/dist/gates/verdict-line.d.ts +18 -0
- package/dist/gates/verdict-line.d.ts.map +1 -0
- package/dist/gates/verdict-line.js +40 -0
- package/dist/graph/graph-reuse-lookup.d.ts +10 -0
- package/dist/graph/graph-reuse-lookup.d.ts.map +1 -0
- package/dist/graph/graph-reuse-lookup.js +41 -0
- package/dist/graph/index-behind-hint.d.ts +11 -0
- package/dist/graph/index-behind-hint.d.ts.map +1 -0
- package/dist/graph/index-behind-hint.js +27 -0
- package/dist/knowledge/knowledge-stale-gate-flags.d.ts +3 -0
- package/dist/knowledge/knowledge-stale-gate-flags.d.ts.map +1 -0
- package/dist/knowledge/knowledge-stale-gate-flags.js +1 -0
- package/dist/knowledge/knowledge-stale-gate-input.d.ts +3 -0
- package/dist/knowledge/knowledge-stale-gate-input.d.ts.map +1 -0
- package/dist/knowledge/knowledge-stale-gate-input.js +1 -0
- package/dist/knowledge/knowledge-stale-gate-result.d.ts +3 -0
- package/dist/knowledge/knowledge-stale-gate-result.d.ts.map +1 -0
- package/dist/knowledge/knowledge-stale-gate-result.js +1 -0
- package/dist/knowledge/knowledge-stale-gate.d.ts +10 -0
- package/dist/knowledge/knowledge-stale-gate.d.ts.map +1 -0
- package/dist/knowledge/knowledge-stale-gate.js +9 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +204 -83
- package/dist/output/failure-hints.d.ts.map +1 -1
- package/dist/output/failure-hints.js +11 -9
- package/dist/output/rejected-entries-note.d.ts +57 -0
- package/dist/output/rejected-entries-note.d.ts.map +1 -0
- package/dist/output/rejected-entries-note.js +103 -0
- package/dist/output/stdout-is-pipe.d.ts +13 -0
- package/dist/output/stdout-is-pipe.d.ts.map +1 -0
- package/dist/output/stdout-is-pipe.js +21 -0
- package/dist/packs/stale-build-warning.d.ts +11 -0
- package/dist/packs/stale-build-warning.d.ts.map +1 -0
- package/dist/packs/stale-build-warning.js +23 -0
- package/dist/quality/run-quality.d.ts +123 -0
- package/dist/quality/run-quality.d.ts.map +1 -0
- package/dist/quality/run-quality.js +442 -0
- package/dist/schemas/json-schemas.d.ts +184 -3
- package/dist/schemas/json-schemas.d.ts.map +1 -1
- package/dist/schemas/json-schemas.js +113 -2
- package/dist/shrk.d.ts +3 -0
- package/dist/shrk.d.ts.map +1 -0
- package/dist/shrk.js +30 -0
- package/dist/surface/audience-applicability.d.ts +26 -0
- package/dist/surface/audience-applicability.d.ts.map +1 -0
- package/dist/surface/audience-applicability.js +60 -0
- package/dist/surface/catalog-command-safety.d.ts +18 -0
- package/dist/surface/catalog-command-safety.d.ts.map +1 -0
- package/dist/surface/catalog-command-safety.js +62 -0
- package/dist/surface/cli-command-resolver.d.ts +21 -0
- package/dist/surface/cli-command-resolver.d.ts.map +1 -0
- package/dist/surface/cli-command-resolver.js +87 -0
- package/dist/surface/command-dispatch-kind.d.ts +20 -0
- package/dist/surface/command-dispatch-kind.d.ts.map +1 -0
- package/dist/surface/command-dispatch-kind.js +20 -0
- package/dist/surface/command-index-entry.d.ts +40 -0
- package/dist/surface/command-index-entry.d.ts.map +1 -0
- package/dist/surface/command-index-entry.js +1 -0
- package/dist/surface/command-index.d.ts +77 -0
- package/dist/surface/command-index.d.ts.map +1 -0
- package/dist/surface/command-index.js +323 -0
- package/dist/surface/i-command-index.d.ts +22 -0
- package/dist/surface/i-command-index.d.ts.map +1 -0
- package/dist/surface/i-command-index.js +1 -0
- package/dist/surface/i-command-string-context.d.ts +20 -0
- package/dist/surface/i-command-string-context.d.ts.map +1 -0
- package/dist/surface/i-command-string-context.js +1 -0
- package/dist/surface/i-surface-denial.d.ts +13 -0
- package/dist/surface/i-surface-denial.d.ts.map +1 -0
- package/dist/surface/i-surface-denial.js +1 -0
- package/dist/surface/load-surface-context.d.ts +17 -1
- package/dist/surface/load-surface-context.d.ts.map +1 -1
- package/dist/surface/load-surface-context.js +48 -10
- package/dist/surface/not-enabled-error.d.ts +38 -4
- package/dist/surface/not-enabled-error.d.ts.map +1 -1
- package/dist/surface/not-enabled-error.js +96 -6
- package/dist/surface/profiles.d.ts +7 -0
- package/dist/surface/profiles.d.ts.map +1 -1
- package/dist/surface/resolve-command-string.d.ts +10 -0
- package/dist/surface/resolve-command-string.d.ts.map +1 -0
- package/dist/surface/resolve-command-string.js +572 -0
- package/dist/surface/surface-config-writer.d.ts +7 -2
- package/dist/surface/surface-config-writer.d.ts.map +1 -1
- package/dist/surface/surface-config-writer.js +25 -6
- package/dist/surface/surface-layer.d.ts +11 -0
- package/dist/surface/surface-layer.d.ts.map +1 -0
- package/dist/surface/surface-layer.js +11 -0
- package/dist/surface/surface-refusal-reason.d.ts +16 -0
- package/dist/surface/surface-refusal-reason.d.ts.map +1 -0
- package/dist/surface/surface-refusal-reason.js +16 -0
- package/dist/surface/surface-selector.d.ts +26 -0
- package/dist/surface/surface-selector.d.ts.map +1 -0
- package/dist/surface/surface-selector.js +42 -0
- package/dist/surface/surface-summary.d.ts +61 -18
- package/dist/surface/surface-summary.d.ts.map +1 -1
- package/dist/surface/surface-summary.js +147 -60
- package/dist/surface/tier.d.ts +85 -22
- package/dist/surface/tier.d.ts.map +1 -1
- package/dist/surface/tier.js +132 -30
- package/dist/usage/usage-log.d.ts +6 -1
- package/dist/usage/usage-log.d.ts.map +1 -1
- package/dist/usage/usage-log.js +7 -2
- package/dist/validation/run-validation-loop.d.ts +9 -0
- package/dist/validation/run-validation-loop.d.ts.map +1 -1
- package/dist/validation/run-validation-loop.js +14 -11
- package/dist/validation/typecheck-emitted.d.ts +8 -9
- package/dist/validation/typecheck-emitted.d.ts.map +1 -1
- package/dist/validation/typecheck-emitted.js +17 -97
- package/package.json +34 -34
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type IResolvedProjectConfig } from '@shrkcrft/inspector';
|
|
2
|
+
import type { IGateRuleResult } from './gate-envelope.js';
|
|
3
|
+
import type { GatePlane } from './gate-rule-view.js';
|
|
4
|
+
/**
|
|
5
|
+
* THE gate-plane reading of a pack element the merge seam refused (round 12
|
|
6
|
+
* review, R12-X1): a configured rule that did NOT run — an ERRORED row, `failed
|
|
7
|
+
* validation — NOT evaluated`, exactly as the boundary plane reports a rejected
|
|
8
|
+
* boundary rule.
|
|
9
|
+
*
|
|
10
|
+
* `resolveProjectConfig` has always returned the structured rejections
|
|
11
|
+
* (`planeOutcomes`), but every gate verb read only the `planeDiagnostics`
|
|
12
|
+
* strings: a pack policy rule whose `files` was negation-only was dropped, never
|
|
13
|
+
* entered the rule denominator, and `gates check` / `policy-lint` / `gates
|
|
14
|
+
* coverage` printed a ✓ at exit 0 over it while `packs contributions` and
|
|
15
|
+
* `packs doctor` exited 1 on the same tree. Every plane reader — `gates
|
|
16
|
+
* check|coverage|list`, `quality`, `policy-lint`, `check wiring`, `registry`,
|
|
17
|
+
* `baseline check`, `generated check`, `finish` — builds its rows here, so they
|
|
18
|
+
* cannot disagree about one rejected rule.
|
|
19
|
+
*
|
|
20
|
+
* A pack plane FILE that failed to import is one errored row per file (the
|
|
21
|
+
* rules inside it are unknown). A `duplicate-id` rejection is NOT a row: the id
|
|
22
|
+
* it collided with is a rule that runs (local wins), so it stays a diagnostic.
|
|
23
|
+
* `planes` narrows to the planes a verb reads; absent = every plane.
|
|
24
|
+
*/
|
|
25
|
+
export declare function seamRejectedRules(resolved: Pick<IResolvedProjectConfig, 'planeOutcomes' | 'projectRoot'>, planes?: readonly GatePlane[]): (IGateRuleResult & {
|
|
26
|
+
readonly type: GatePlane;
|
|
27
|
+
})[];
|
|
28
|
+
//# sourceMappingURL=seam-rejected-rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seam-rejected-rules.d.ts","sourceRoot":"","sources":["../../src/gates/seam-rejected-rules.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,sBAAsB,EAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAmBrD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,IAAI,CAAC,sBAAsB,EAAE,eAAe,GAAG,aAAa,CAAC,EACvE,MAAM,CAAC,EAAE,SAAS,SAAS,EAAE,GAC5B,CAAC,eAAe,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC,EAAE,CAkDpD"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { RejectionCause } from '@shrkcrft/core';
|
|
2
|
+
import { ContributionKind, contributionFileLabel, formatEntryRejection, } from '@shrkcrft/inspector';
|
|
3
|
+
/**
|
|
4
|
+
* Each gate-plane contribution kind → the plane its rules run on. A kind absent
|
|
5
|
+
* here (`reuse-primitive`) is not a gate plane. Doc references joined in round
|
|
6
|
+
* 13 (P3): their pack slot (`docReferenceFiles`) is declared, so a rejected
|
|
7
|
+
* pack doc-reference rule is an ERRORED row like every other plane's — before,
|
|
8
|
+
* it was a diagnostic string only.
|
|
9
|
+
*/
|
|
10
|
+
const PLANE_OF_KIND = {
|
|
11
|
+
[ContributionKind.WiringRule]: 'wiring',
|
|
12
|
+
[ContributionKind.PolicyRule]: 'policy',
|
|
13
|
+
[ContributionKind.Registry]: 'registry',
|
|
14
|
+
[ContributionKind.RegistrationIdiom]: 'registration',
|
|
15
|
+
[ContributionKind.Baseline]: 'baseline',
|
|
16
|
+
[ContributionKind.GeneratedArtifact]: 'generated',
|
|
17
|
+
[ContributionKind.DocReference]: 'doc-reference',
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* THE gate-plane reading of a pack element the merge seam refused (round 12
|
|
21
|
+
* review, R12-X1): a configured rule that did NOT run — an ERRORED row, `failed
|
|
22
|
+
* validation — NOT evaluated`, exactly as the boundary plane reports a rejected
|
|
23
|
+
* boundary rule.
|
|
24
|
+
*
|
|
25
|
+
* `resolveProjectConfig` has always returned the structured rejections
|
|
26
|
+
* (`planeOutcomes`), but every gate verb read only the `planeDiagnostics`
|
|
27
|
+
* strings: a pack policy rule whose `files` was negation-only was dropped, never
|
|
28
|
+
* entered the rule denominator, and `gates check` / `policy-lint` / `gates
|
|
29
|
+
* coverage` printed a ✓ at exit 0 over it while `packs contributions` and
|
|
30
|
+
* `packs doctor` exited 1 on the same tree. Every plane reader — `gates
|
|
31
|
+
* check|coverage|list`, `quality`, `policy-lint`, `check wiring`, `registry`,
|
|
32
|
+
* `baseline check`, `generated check`, `finish` — builds its rows here, so they
|
|
33
|
+
* cannot disagree about one rejected rule.
|
|
34
|
+
*
|
|
35
|
+
* A pack plane FILE that failed to import is one errored row per file (the
|
|
36
|
+
* rules inside it are unknown). A `duplicate-id` rejection is NOT a row: the id
|
|
37
|
+
* it collided with is a rule that runs (local wins), so it stays a diagnostic.
|
|
38
|
+
* `planes` narrows to the planes a verb reads; absent = every plane.
|
|
39
|
+
*/
|
|
40
|
+
export function seamRejectedRules(resolved, planes) {
|
|
41
|
+
const outcomes = resolved.planeOutcomes;
|
|
42
|
+
if (!outcomes)
|
|
43
|
+
return [];
|
|
44
|
+
const wanted = (kind) => {
|
|
45
|
+
const plane = PLANE_OF_KIND[kind];
|
|
46
|
+
return plane !== undefined && (planes === undefined || planes.includes(plane)) ? plane : undefined;
|
|
47
|
+
};
|
|
48
|
+
const rows = [];
|
|
49
|
+
const seen = new Set();
|
|
50
|
+
for (const r of outcomes.rejected) {
|
|
51
|
+
if (r.cause === RejectionCause.DuplicateId)
|
|
52
|
+
continue;
|
|
53
|
+
const plane = wanted(r.kind);
|
|
54
|
+
if (plane === undefined)
|
|
55
|
+
continue;
|
|
56
|
+
const file = contributionFileLabel(resolved.projectRoot, r.file);
|
|
57
|
+
const id = r.entryId ?? `${file}[${r.index}]`;
|
|
58
|
+
if (seen.has(`${plane}:${id}`))
|
|
59
|
+
continue;
|
|
60
|
+
seen.add(`${plane}:${id}`);
|
|
61
|
+
const pack = r.packageName ? `pack ${r.packageName} ` : '';
|
|
62
|
+
rows.push({
|
|
63
|
+
id,
|
|
64
|
+
type: plane,
|
|
65
|
+
status: 'error',
|
|
66
|
+
severity: 'error',
|
|
67
|
+
counts: {},
|
|
68
|
+
violations: [],
|
|
69
|
+
error: `${pack}${plane} rule failed validation at the pack-plane merge seam — NOT evaluated: ` +
|
|
70
|
+
`${formatEntryRejection(r)} (${file})`,
|
|
71
|
+
coverage: { unit: 'rules', expected: 1, examined: 0, subject: id, reason: 'failed validation — NOT evaluated' },
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
for (const f of outcomes.loadFailures) {
|
|
75
|
+
const plane = wanted(f.kind);
|
|
76
|
+
if (plane === undefined)
|
|
77
|
+
continue;
|
|
78
|
+
const file = contributionFileLabel(resolved.projectRoot, f.file);
|
|
79
|
+
const id = `${f.packageName}:${file}`;
|
|
80
|
+
if (seen.has(`${plane}:${id}`))
|
|
81
|
+
continue;
|
|
82
|
+
seen.add(`${plane}:${id}`);
|
|
83
|
+
rows.push({
|
|
84
|
+
id,
|
|
85
|
+
type: plane,
|
|
86
|
+
status: 'error',
|
|
87
|
+
severity: 'error',
|
|
88
|
+
counts: {},
|
|
89
|
+
violations: [],
|
|
90
|
+
error: `pack ${f.packageName} ${plane} rule file failed to load — none of its rules was evaluated: ${f.message}`,
|
|
91
|
+
coverage: { unit: 'rules', expected: 1, examined: 0, subject: id, reason: 'the rule file failed to load' },
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
return rows;
|
|
95
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One `selfTest` expectation, evaluated against a rule's EXTRACTED SET.
|
|
3
|
+
*
|
|
4
|
+
* Every gate-plane selfTest field asserts on the same thing — what the rule's
|
|
5
|
+
* primary selector extracted from the live tree — never on a ranker's output or
|
|
6
|
+
* on a registry lookup. `assertion` names that class explicitly, so a JSON
|
|
7
|
+
* reader can tell these apart from the ranker-surfaced and registry-existence
|
|
8
|
+
* expectations of agent-contract and pack tests, which answer different
|
|
9
|
+
* questions and fail for different reasons.
|
|
10
|
+
*/
|
|
11
|
+
export interface ISelfTestCheck {
|
|
12
|
+
/** The selfTest field this check came from. */
|
|
13
|
+
readonly field: 'expectMatchesAtLeast' | 'expectIds' | 'expectNotIds';
|
|
14
|
+
/** What the field asserts on — always the rule's extracted set on a gate plane. */
|
|
15
|
+
readonly assertion: 'extracted-set';
|
|
16
|
+
/** The floor (`expectMatchesAtLeast`), or the id this check is about. */
|
|
17
|
+
readonly expected: number | string;
|
|
18
|
+
/**
|
|
19
|
+
* `held` / `failed` were measured. `not-evaluable` means this plane shape
|
|
20
|
+
* cannot produce the set the field asserts on, so the field is neither a
|
|
21
|
+
* pass nor a fake "got 0".
|
|
22
|
+
*/
|
|
23
|
+
readonly status: 'held' | 'failed' | 'not-evaluable';
|
|
24
|
+
/** The measured count, for `expectMatchesAtLeast`. */
|
|
25
|
+
readonly actual?: number;
|
|
26
|
+
/** One sentence naming the unit counted and, on failure, the selector consulted. */
|
|
27
|
+
readonly message: string;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=self-test-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"self-test-check.d.ts","sourceRoot":"","sources":["../../src/gates/self-test-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,QAAQ,CAAC,KAAK,EAAE,sBAAsB,GAAG,WAAW,GAAG,cAAc,CAAC;IACtE,mFAAmF;IACnF,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,eAAe,CAAC;IACrD,sDAAsD;IACtD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,oFAAoF;IACpF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a rule's primary selector resolved to, in the terms a `selfTest`
|
|
3
|
+
* asserts on.
|
|
4
|
+
*
|
|
5
|
+
* Each plane's coverage adapter produces one, and `evaluateSelfTest` reads
|
|
6
|
+
* nothing else. That is what keeps `gates coverage` and `gates try` from
|
|
7
|
+
* disagreeing about whether an expectation held: they hand the same subject to
|
|
8
|
+
* the same evaluator.
|
|
9
|
+
*/
|
|
10
|
+
export interface ISelfTestSubject {
|
|
11
|
+
/** Every distinct id the selector extracted, sorted. */
|
|
12
|
+
readonly ids: readonly string[];
|
|
13
|
+
/** What `expectMatchesAtLeast` counts. */
|
|
14
|
+
readonly unitsMatched: number;
|
|
15
|
+
/** The unit {@link unitsMatched} counts — `ids`, `content units`, `generated files`. */
|
|
16
|
+
readonly unitLabel: string;
|
|
17
|
+
/** What one "id" is on this plane — `registry ids`, `pattern matches (capture group 1 …)`. */
|
|
18
|
+
readonly idLabel: string;
|
|
19
|
+
/** The selector consulted, e.g. `registry "mcp-tools" — source a/*.ts (regex-capture)`. */
|
|
20
|
+
readonly consulted: string;
|
|
21
|
+
/**
|
|
22
|
+
* Set when this plane shape cannot produce the set a selfTest asserts on (a
|
|
23
|
+
* `command` baseline with no `watchFiles` to probe): the reason, printed
|
|
24
|
+
* instead of a fabricated "got 0".
|
|
25
|
+
*/
|
|
26
|
+
readonly notEvaluable?: string;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=self-test-subject.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"self-test-subject.d.ts","sourceRoot":"","sources":["../../src/gates/self-test-subject.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC/B,wDAAwD;IACxD,QAAQ,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,0CAA0C;IAC1C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,wFAAwF;IACxF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,8FAA8F;IAC9F,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,2FAA2F;IAC3F,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IRuleSelfTest } from '@shrkcrft/core';
|
|
2
|
+
import type { ISelfTestCheck } from './self-test-check.js';
|
|
3
|
+
import type { ISelfTestSubject } from './self-test-subject.js';
|
|
4
|
+
/**
|
|
5
|
+
* THE gate-plane `selfTest` evaluator: every declared expectation, checked
|
|
6
|
+
* against what the rule's primary selector extracted.
|
|
7
|
+
*
|
|
8
|
+
* `gates coverage` (a rule in config), `gates try` (a candidate that is not in
|
|
9
|
+
* config yet) and `shrk quality` all call this one function with the subject
|
|
10
|
+
* the plane's coverage adapter built. A second evaluator — even a faithful
|
|
11
|
+
* copy — is how a dry-run ends up passing a rule the gate then fails.
|
|
12
|
+
*
|
|
13
|
+
* Every check says what it counted and, when it fails, which selector it
|
|
14
|
+
* consulted, so a failure names the set it looked in instead of a bare
|
|
15
|
+
* "expected N match(es)". A field the plane shape cannot evaluate is reported
|
|
16
|
+
* `not-evaluable` with the reason — an unmeasured assertion is never a pass,
|
|
17
|
+
* and never a fabricated "got 0".
|
|
18
|
+
*/
|
|
19
|
+
export declare function evaluateSelfTest(selfTest: IRuleSelfTest | undefined, subject: ISelfTestSubject): readonly ISelfTestCheck[];
|
|
20
|
+
//# sourceMappingURL=self-test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"self-test.d.ts","sourceRoot":"","sources":["../../src/gates/self-test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,aAAa,GAAG,SAAS,EACnC,OAAO,EAAE,gBAAgB,GACxB,SAAS,cAAc,EAAE,CAsE3B"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE gate-plane `selfTest` evaluator: every declared expectation, checked
|
|
3
|
+
* against what the rule's primary selector extracted.
|
|
4
|
+
*
|
|
5
|
+
* `gates coverage` (a rule in config), `gates try` (a candidate that is not in
|
|
6
|
+
* config yet) and `shrk quality` all call this one function with the subject
|
|
7
|
+
* the plane's coverage adapter built. A second evaluator — even a faithful
|
|
8
|
+
* copy — is how a dry-run ends up passing a rule the gate then fails.
|
|
9
|
+
*
|
|
10
|
+
* Every check says what it counted and, when it fails, which selector it
|
|
11
|
+
* consulted, so a failure names the set it looked in instead of a bare
|
|
12
|
+
* "expected N match(es)". A field the plane shape cannot evaluate is reported
|
|
13
|
+
* `not-evaluable` with the reason — an unmeasured assertion is never a pass,
|
|
14
|
+
* and never a fabricated "got 0".
|
|
15
|
+
*/
|
|
16
|
+
export function evaluateSelfTest(selfTest, subject) {
|
|
17
|
+
if (!selfTest)
|
|
18
|
+
return [];
|
|
19
|
+
const where = `consulted: ${subject.consulted}`;
|
|
20
|
+
const out = [];
|
|
21
|
+
if (subject.notEvaluable !== undefined) {
|
|
22
|
+
const unmeasurable = (field, expected) => ({
|
|
23
|
+
field,
|
|
24
|
+
assertion: 'extracted-set',
|
|
25
|
+
expected,
|
|
26
|
+
status: 'not-evaluable',
|
|
27
|
+
message: `selfTest.${field} cannot be evaluated: ${subject.notEvaluable} — ${where}`,
|
|
28
|
+
});
|
|
29
|
+
if (selfTest.expectMatchesAtLeast !== undefined) {
|
|
30
|
+
out.push(unmeasurable('expectMatchesAtLeast', selfTest.expectMatchesAtLeast));
|
|
31
|
+
}
|
|
32
|
+
if ((selfTest.expectIds ?? []).length > 0) {
|
|
33
|
+
out.push(unmeasurable('expectIds', (selfTest.expectIds ?? []).join(', ')));
|
|
34
|
+
}
|
|
35
|
+
if ((selfTest.expectNotIds ?? []).length > 0) {
|
|
36
|
+
out.push(unmeasurable('expectNotIds', (selfTest.expectNotIds ?? []).join(', ')));
|
|
37
|
+
}
|
|
38
|
+
return out;
|
|
39
|
+
}
|
|
40
|
+
if (selfTest.expectMatchesAtLeast !== undefined) {
|
|
41
|
+
const floor = selfTest.expectMatchesAtLeast;
|
|
42
|
+
const got = subject.unitsMatched;
|
|
43
|
+
const held = got >= floor;
|
|
44
|
+
out.push({
|
|
45
|
+
field: 'expectMatchesAtLeast',
|
|
46
|
+
assertion: 'extracted-set',
|
|
47
|
+
expected: floor,
|
|
48
|
+
actual: got,
|
|
49
|
+
status: held ? 'held' : 'failed',
|
|
50
|
+
message: held
|
|
51
|
+
? `${got} ${subject.unitLabel} (at least ${floor} expected)`
|
|
52
|
+
: `expected at least ${floor} ${subject.unitLabel}, got ${got} — ${where}`,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
const present = new Set(subject.ids);
|
|
56
|
+
for (const id of selfTest.expectIds ?? []) {
|
|
57
|
+
const held = present.has(id);
|
|
58
|
+
out.push({
|
|
59
|
+
field: 'expectIds',
|
|
60
|
+
assertion: 'extracted-set',
|
|
61
|
+
expected: id,
|
|
62
|
+
status: held ? 'held' : 'failed',
|
|
63
|
+
message: held
|
|
64
|
+
? `"${id}" is in the extracted set`
|
|
65
|
+
: `expected id "${id}" was NOT extracted — not among the ${subject.ids.length} ` +
|
|
66
|
+
`${subject.idLabel}; ${where}`,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
for (const id of selfTest.expectNotIds ?? []) {
|
|
70
|
+
const held = !present.has(id);
|
|
71
|
+
out.push({
|
|
72
|
+
field: 'expectNotIds',
|
|
73
|
+
assertion: 'extracted-set',
|
|
74
|
+
expected: id,
|
|
75
|
+
status: held ? 'held' : 'failed',
|
|
76
|
+
message: held
|
|
77
|
+
? `"${id}" is not in the extracted set`
|
|
78
|
+
: `id "${id}" was extracted but is listed in expectNotIds — ${where}`,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return out;
|
|
82
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The CLI's one exit guard — `settleVerdict(proposed, coverage)`: a verb
|
|
3
|
+
* PROPOSES an exit from what it found, and the coverage of what it examined may
|
|
4
|
+
* veto a clean one (proposed `0` with any shortfall → `2`; `1`, `2` and `3` are
|
|
5
|
+
* never changed).
|
|
6
|
+
*
|
|
7
|
+
* Round 11 review: the fold moved to `@shrkcrft/core` so the boundary
|
|
8
|
+
* orchestrator (read by finish, quality and the MCP tools, which cannot import
|
|
9
|
+
* the CLI) settles with the SAME function instead of a second copy. This path
|
|
10
|
+
* stays as a re-export so every CLI caller — `buildGateEnvelope`, `quality`,
|
|
11
|
+
* `gate` — keeps its import unchanged.
|
|
12
|
+
*/
|
|
13
|
+
export { settleVerdict } from '@shrkcrft/core';
|
|
14
|
+
//# sourceMappingURL=settle-verdict.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settle-verdict.d.ts","sourceRoot":"","sources":["../../src/gates/settle-verdict.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The CLI's one exit guard — `settleVerdict(proposed, coverage)`: a verb
|
|
3
|
+
* PROPOSES an exit from what it found, and the coverage of what it examined may
|
|
4
|
+
* veto a clean one (proposed `0` with any shortfall → `2`; `1`, `2` and `3` are
|
|
5
|
+
* never changed).
|
|
6
|
+
*
|
|
7
|
+
* Round 11 review: the fold moved to `@shrkcrft/core` so the boundary
|
|
8
|
+
* orchestrator (read by finish, quality and the MCP tools, which cannot import
|
|
9
|
+
* the CLI) settles with the SAME function instead of a second copy. This path
|
|
10
|
+
* stays as a re-export so every CLI caller — `buildGateEnvelope`, `quality`,
|
|
11
|
+
* `gate` — keeps its import unchanged.
|
|
12
|
+
*/
|
|
13
|
+
export { settleVerdict } from '@shrkcrft/core';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A verdict after the coverage guard has run — the only shape a verdict verb
|
|
3
|
+
* may render its final line from. Defined in `@shrkcrft/core` next to
|
|
4
|
+
* `settleVerdict` (round 11 review: one settle derivation for the CLI and the
|
|
5
|
+
* engines below it); re-exported here so CLI imports stay unchanged.
|
|
6
|
+
*/
|
|
7
|
+
export type { ISettledVerdict } from '@shrkcrft/core';
|
|
8
|
+
//# sourceMappingURL=settled-verdict.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settled-verdict.d.ts","sourceRoot":"","sources":["../../src/gates/settled-verdict.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IVerdictCoverage } from '@shrkcrft/core';
|
|
2
|
+
/**
|
|
3
|
+
* THE coverage record of a template-registry verdict: the registered
|
|
4
|
+
* templates, minus any whose operations were never checked (`changes()` threw
|
|
5
|
+
* with sample variables). ZERO registered is an empty request — "nothing to
|
|
6
|
+
* verify", never a pass — unless the caller's `--allow-empty` valve accepts it.
|
|
7
|
+
*
|
|
8
|
+
* `templates doctor` and `check templates` settle on this one record, so the
|
|
9
|
+
* two readers cannot answer "are the templates valid?" two ways over zero
|
|
10
|
+
* templates (round 11 review: the doctor said 2, `check templates` said OK 0).
|
|
11
|
+
*/
|
|
12
|
+
export declare function templateRegistryCoverage(input: {
|
|
13
|
+
readonly total: number;
|
|
14
|
+
readonly unchecked?: readonly string[];
|
|
15
|
+
readonly root: string;
|
|
16
|
+
readonly acceptance?: Pick<IVerdictCoverage, 'acceptedBy'>;
|
|
17
|
+
}): IVerdictCoverage;
|
|
18
|
+
//# sourceMappingURL=template-registry-coverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-registry-coverage.d.ts","sourceRoot":"","sources":["../../src/gates/template-registry-coverage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;CAC5D,GAAG,gBAAgB,CAcnB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE coverage record of a template-registry verdict: the registered
|
|
3
|
+
* templates, minus any whose operations were never checked (`changes()` threw
|
|
4
|
+
* with sample variables). ZERO registered is an empty request — "nothing to
|
|
5
|
+
* verify", never a pass — unless the caller's `--allow-empty` valve accepts it.
|
|
6
|
+
*
|
|
7
|
+
* `templates doctor` and `check templates` settle on this one record, so the
|
|
8
|
+
* two readers cannot answer "are the templates valid?" two ways over zero
|
|
9
|
+
* templates (round 11 review: the doctor said 2, `check templates` said OK 0).
|
|
10
|
+
*/
|
|
11
|
+
export function templateRegistryCoverage(input) {
|
|
12
|
+
const unchecked = input.unchecked ?? [];
|
|
13
|
+
return {
|
|
14
|
+
unit: 'templates',
|
|
15
|
+
expected: input.total,
|
|
16
|
+
examined: input.total - unchecked.length,
|
|
17
|
+
root: input.root,
|
|
18
|
+
reason: input.total === 0
|
|
19
|
+
? 'no template is registered'
|
|
20
|
+
: 'changes() threw with sample variables, so their operations were never checked',
|
|
21
|
+
...(unchecked.length > 0 ? { unexamined: unchecked.slice(0, 20), unexaminedTotal: unchecked.length } : {}),
|
|
22
|
+
...(input.acceptance ?? {}),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { IUnitStateNoteRow } from './i-unit-state-note-row.js';
|
|
2
|
+
import type { IUnitStateNotes } from './i-unit-state-notes.js';
|
|
3
|
+
/** Options for {@link unitStateNotes}. */
|
|
4
|
+
interface IUnitStateNotesOptions {
|
|
5
|
+
/**
|
|
6
|
+
* The verb's `--fail-on-dead-units` value, when the verb TAKES the flag
|
|
7
|
+
* (`undefined` = it does not, so no "pass --fail-on-dead-units" hint).
|
|
8
|
+
*/
|
|
9
|
+
readonly failOnDeadUnits?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Also list every INTENDED-EMPTY unit (round 13, K6), each as its one
|
|
12
|
+
* per-unit line under a neutral bullet — never a ✓ (the acceptance belongs to
|
|
13
|
+
* the settled verdict). The explain views opt in: an introspection names
|
|
14
|
+
* every unit state. The verbs do not; their acceptance line carries it.
|
|
15
|
+
*/
|
|
16
|
+
readonly intendedEmpty?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* THE unit-state block every plane verb prints (round 13, K2) — the one
|
|
20
|
+
* renderer, so `policy-lint`, `check wiring`, `baseline check`, `generated
|
|
21
|
+
* check`, `docs references check`, `registry <name> list|duplicates`, `gates
|
|
22
|
+
* check`, the explain surfaces and finish's plane sub-gates say about a
|
|
23
|
+
* selector unit exactly what `gates coverage` and `check boundaries` say:
|
|
24
|
+
*
|
|
25
|
+
* - an unmarked DEAD unit of a rule that is not already reported as matching
|
|
26
|
+
* nothing (a dead import-edges `to.files` under an accepted fence
|
|
27
|
+
* included) — advisory: listed, the ✓ withheld, the exit unchanged, with
|
|
28
|
+
* ONE footer carrying `DEAD_SELECTOR_CAUSES`;
|
|
29
|
+
* - a LOCAL `expectEmpty` marker whose target appeared (went live) — the
|
|
30
|
+
* fence is a stale assertion: listed, the ✓ withheld;
|
|
31
|
+
* - a PACK marker that went live — INFO in its own block, never a failure
|
|
32
|
+
* and never withholding the ✓ (the consumer cannot edit it).
|
|
33
|
+
*
|
|
34
|
+
* Each line is `• <rule id>: <formatUnitLiveness(u)>` — the one per-unit line;
|
|
35
|
+
* a surface adds decoration only, never its own state words. The verb reads
|
|
36
|
+
* `stale` to qualify its clean line (`qualifyCleanForUnits`).
|
|
37
|
+
*/
|
|
38
|
+
export declare function unitStateNotes(rows: readonly IUnitStateNoteRow[], options?: IUnitStateNotesOptions): IUnitStateNotes;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=unit-state-notes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unit-state-notes.d.ts","sourceRoot":"","sources":["../../src/gates/unit-state-notes.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,0CAA0C;AAC1C,UAAU,sBAAsB;IAC9B;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;CAClC;AAOD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,SAAS,iBAAiB,EAAE,EAClC,OAAO,GAAE,sBAA2B,GACnC,eAAe,CAmDjB"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { DEAD_SELECTOR_CAUSES, formatUnitLiveness, UnitLivenessState, } from '@shrkcrft/core';
|
|
2
|
+
/**
|
|
3
|
+
* THE unit-state block every plane verb prints (round 13, K2) — the one
|
|
4
|
+
* renderer, so `policy-lint`, `check wiring`, `baseline check`, `generated
|
|
5
|
+
* check`, `docs references check`, `registry <name> list|duplicates`, `gates
|
|
6
|
+
* check`, the explain surfaces and finish's plane sub-gates say about a
|
|
7
|
+
* selector unit exactly what `gates coverage` and `check boundaries` say:
|
|
8
|
+
*
|
|
9
|
+
* - an unmarked DEAD unit of a rule that is not already reported as matching
|
|
10
|
+
* nothing (a dead import-edges `to.files` under an accepted fence
|
|
11
|
+
* included) — advisory: listed, the ✓ withheld, the exit unchanged, with
|
|
12
|
+
* ONE footer carrying `DEAD_SELECTOR_CAUSES`;
|
|
13
|
+
* - a LOCAL `expectEmpty` marker whose target appeared (went live) — the
|
|
14
|
+
* fence is a stale assertion: listed, the ✓ withheld;
|
|
15
|
+
* - a PACK marker that went live — INFO in its own block, never a failure
|
|
16
|
+
* and never withholding the ✓ (the consumer cannot edit it).
|
|
17
|
+
*
|
|
18
|
+
* Each line is `• <rule id>: <formatUnitLiveness(u)>` — the one per-unit line;
|
|
19
|
+
* a surface adds decoration only, never its own state words. The verb reads
|
|
20
|
+
* `stale` to qualify its clean line (`qualifyCleanForUnits`).
|
|
21
|
+
*/
|
|
22
|
+
export function unitStateNotes(rows, options = {}) {
|
|
23
|
+
const pick = (state, keep) => rows.flatMap((r) => (r.unitLiveness ?? []).filter((u) => u.state === state && keep(u, r)).map((u) => ({ id: r.id, u })));
|
|
24
|
+
const dead = pick(UnitLivenessState.Dead, (_u, r) => r.reportedEmpty !== true);
|
|
25
|
+
const local = pick(UnitLivenessState.WentLive, (u) => u.mark?.packageName === undefined);
|
|
26
|
+
const pack = pick(UnitLivenessState.WentLive, (u) => u.mark?.packageName !== undefined);
|
|
27
|
+
const intended = options.intendedEmpty === true ? pick(UnitLivenessState.IntendedEmpty, () => true) : [];
|
|
28
|
+
const unitLine = (x) => `${x.id}: ${formatUnitLiveness(x.u, { causes: false })}`;
|
|
29
|
+
const line = (x) => ` • ${unitLine(x)}\n`;
|
|
30
|
+
let text = '';
|
|
31
|
+
if (dead.length > 0) {
|
|
32
|
+
text += `\nDead selector units (${dead.length}) — each matches nothing, so it enforces nothing:\n`;
|
|
33
|
+
text += dead.map(line).join('');
|
|
34
|
+
// The causes ONCE, as a footer (`formatUnitLiveness(u, { causes: false })`
|
|
35
|
+
// on each line) — the wording `check boundaries` appends to each unit.
|
|
36
|
+
text += ` Dead selectors: ${DEAD_SELECTOR_CAUSES}.\n`;
|
|
37
|
+
if (options.failOnDeadUnits === false)
|
|
38
|
+
text += ' Pass --fail-on-dead-units to fail the run on them.\n';
|
|
39
|
+
}
|
|
40
|
+
if (local.length > 0) {
|
|
41
|
+
text += `\nexpectEmpty markers that went live (${local.length}) — each fence now has a target; remove the marker:\n`;
|
|
42
|
+
text += local.map(line).join('');
|
|
43
|
+
}
|
|
44
|
+
if (pack.length > 0) {
|
|
45
|
+
text +=
|
|
46
|
+
`\nINFO — pack expectEmpty markers that went live (${pack.length}) — the fence now has a target; ` +
|
|
47
|
+
"the pack's author removes the marker, and it never fails this run:\n";
|
|
48
|
+
text += pack.map(line).join('');
|
|
49
|
+
}
|
|
50
|
+
if (intended.length > 0) {
|
|
51
|
+
// A neutral bullet, never a ✓: the acceptance and its ✓ belong to the
|
|
52
|
+
// settled verdict (`verdictLine`, exit 0 only) — the same decoration
|
|
53
|
+
// `gates coverage` and `gates try` give an intended-empty unit.
|
|
54
|
+
text += `\nIntended-empty selector units (${intended.length}) — each marks a target that does not exist yet (expectEmpty):\n`;
|
|
55
|
+
text += intended.map((x) => ` · ${unitLine(x)}\n`).join('');
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
dead: dead.length,
|
|
59
|
+
localWentLive: local.length,
|
|
60
|
+
packWentLive: pack.length,
|
|
61
|
+
text,
|
|
62
|
+
deadLines: dead.map(unitLine),
|
|
63
|
+
localWentLiveLines: local.map(unitLine),
|
|
64
|
+
packWentLiveLines: pack.map(unitLine),
|
|
65
|
+
stale: [
|
|
66
|
+
...(dead.length > 0 ? [`${dead.length} dead selector unit(s)`] : []),
|
|
67
|
+
...(local.length > 0 ? [`${local.length} expectEmpty unit(s) went live — remove the markers`] : []),
|
|
68
|
+
],
|
|
69
|
+
staleIds: new Set([...dead, ...local].map((x) => x.id)),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ISettledVerdict } from './settled-verdict.js';
|
|
2
|
+
/**
|
|
3
|
+
* The final line of a verdict verb, rendered FROM the settled verdict — the
|
|
4
|
+
* only way a verb may print its clean (`✓`) sentence.
|
|
5
|
+
*
|
|
6
|
+
* - exit `0`: `clean`, followed by one indented line per accepted gap, so a
|
|
7
|
+
* waived shortfall is always visible next to the green;
|
|
8
|
+
* - exit `2`: `notVerifiedLead` (the verb's own explanation, when it has one)
|
|
9
|
+
* and then `NOT VERIFIED: <shortfalls> (this is not a pass)`;
|
|
10
|
+
* - exit `1`: `(also not verified: <shortfalls>)` when a scope gap sits next
|
|
11
|
+
* to the violations, otherwise empty — the verb already printed them;
|
|
12
|
+
* - anything else: empty.
|
|
13
|
+
*
|
|
14
|
+
* It never returns `clean` for a non-zero exit, which is the property that
|
|
15
|
+
* keeps the banner and `$?` from disagreeing.
|
|
16
|
+
*/
|
|
17
|
+
export declare function verdictLine(s: ISettledVerdict, clean: string, notVerifiedLead?: string): string;
|
|
18
|
+
//# sourceMappingURL=verdict-line.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verdict-line.d.ts","sourceRoot":"","sources":["../../src/gates/verdict-line.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAK5D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAgB/F"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ExitCode } from "../exit-codes.js";
|
|
2
|
+
/** Shortfalls named on the verdict line before the rest are summarised. */
|
|
3
|
+
const SHORTFALLS_SHOWN = 5;
|
|
4
|
+
/**
|
|
5
|
+
* The final line of a verdict verb, rendered FROM the settled verdict — the
|
|
6
|
+
* only way a verb may print its clean (`✓`) sentence.
|
|
7
|
+
*
|
|
8
|
+
* - exit `0`: `clean`, followed by one indented line per accepted gap, so a
|
|
9
|
+
* waived shortfall is always visible next to the green;
|
|
10
|
+
* - exit `2`: `notVerifiedLead` (the verb's own explanation, when it has one)
|
|
11
|
+
* and then `NOT VERIFIED: <shortfalls> (this is not a pass)`;
|
|
12
|
+
* - exit `1`: `(also not verified: <shortfalls>)` when a scope gap sits next
|
|
13
|
+
* to the violations, otherwise empty — the verb already printed them;
|
|
14
|
+
* - anything else: empty.
|
|
15
|
+
*
|
|
16
|
+
* It never returns `clean` for a non-zero exit, which is the property that
|
|
17
|
+
* keeps the banner and `$?` from disagreeing.
|
|
18
|
+
*/
|
|
19
|
+
export function verdictLine(s, clean, notVerifiedLead) {
|
|
20
|
+
if (s.exit === ExitCode.VerifiedPass) {
|
|
21
|
+
return [clean, ...s.accepted.map((a) => ` ${a}`)].filter((l) => l.length > 0).join('\n');
|
|
22
|
+
}
|
|
23
|
+
const listed = listShortfalls(s.shortfalls);
|
|
24
|
+
if (s.exit === ExitCode.NotVerified) {
|
|
25
|
+
if (s.shortfalls.length === 0) {
|
|
26
|
+
return notVerifiedLead ?? 'NOT VERIFIED — nothing was proved (this is not a pass).';
|
|
27
|
+
}
|
|
28
|
+
const line = `NOT VERIFIED: ${listed} (this is not a pass)`;
|
|
29
|
+
return notVerifiedLead ? `${notVerifiedLead}\n${line}` : line;
|
|
30
|
+
}
|
|
31
|
+
if (s.exit === ExitCode.Failure && s.shortfalls.length > 0) {
|
|
32
|
+
return `(also not verified: ${listed})`;
|
|
33
|
+
}
|
|
34
|
+
return '';
|
|
35
|
+
}
|
|
36
|
+
function listShortfalls(shortfalls) {
|
|
37
|
+
const shown = shortfalls.slice(0, SHORTFALLS_SHOWN).join('; ');
|
|
38
|
+
const rest = shortfalls.length - SHORTFALLS_SHOWN;
|
|
39
|
+
return rest > 0 ? `${shown}; … (+${rest} more)` : shown;
|
|
40
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { GraphQueryApi } from '@shrkcrft/graph';
|
|
2
|
+
import type { IReuseSymbolLookup } from '@shrkcrft/inspector';
|
|
3
|
+
/**
|
|
4
|
+
* The reuse engine's graph questions, answered from one snapshot — shared by
|
|
5
|
+
* `shrk reuse` and `shrk reuse coverage`, so both resolve every curated entry
|
|
6
|
+
* (its declaration, import line and whether that import compiles) through the
|
|
7
|
+
* same lookups, via the inspector's `resolveCuratedReuse`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function graphReuseLookup(api: GraphQueryApi): IReuseSymbolLookup;
|
|
10
|
+
//# sourceMappingURL=graph-reuse-lookup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-reuse-lookup.d.ts","sourceRoot":"","sources":["../../src/graph/graph-reuse-lookup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,kBAAkB,CAiCvE"}
|