@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
|
@@ -1,18 +1,46 @@
|
|
|
1
|
-
import { buildRegistrationGraph, explainWiring, registrationChain, registrationGraphSignature,
|
|
1
|
+
import { buildRegistrationGraph, explainWiring, measureIdiomRoleCoverage, planeScanExcludeDirs, registrationChain, registrationGraphSignature, registrationOrphansVerdict, registrationUnprovidedVerdict, } from '@shrkcrft/boundaries';
|
|
2
|
+
import { formatCoverage, formatEmptyRuleAdvice, ruleVerdictRecords, } from '@shrkcrft/core';
|
|
2
3
|
import { refExists, resolveChangedFiles, resolveProjectConfig } from '@shrkcrft/inspector';
|
|
3
4
|
import { createHash } from 'node:crypto';
|
|
4
5
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
5
6
|
import * as nodePath from 'node:path';
|
|
6
7
|
import { flagBool, flagString, resolveCwd, } from "../command-registry.js";
|
|
8
|
+
import { PositionalMode } from "../dispatch/positional-mode.js";
|
|
7
9
|
import { ExitCode } from "../exit-codes.js";
|
|
8
10
|
import { asJson, header, kv } from "../output/format-output.js";
|
|
11
|
+
import { ALLOW_EMPTY_FLAG, allowEmptyValve } from "../gates/allow-empty.js";
|
|
12
|
+
import { buildGateEnvelope } from "../gates/gate-envelope.js";
|
|
13
|
+
import { scanNote } from "../gates/gate-rule-view.js";
|
|
14
|
+
import { planeVerdictForExit } from "../gates/plane-verdict.js";
|
|
15
|
+
import { settleVerdict } from "../gates/settle-verdict.js";
|
|
16
|
+
import { settleRegistrationGraph } from "../gates/registration-graph-verdict.js";
|
|
17
|
+
import { verdictLine } from "../gates/verdict-line.js";
|
|
18
|
+
import { unitStateNotes } from "../gates/unit-state-notes.js";
|
|
9
19
|
const SITE_DISPLAY_CAP = 50;
|
|
20
|
+
/**
|
|
21
|
+
* The explained rule's verdict, SETTLED — through the same `settleVerdict` the
|
|
22
|
+
* gate envelope uses, over the engine's own coverage for the rule. An `errors`
|
|
23
|
+
* verdict proposes 1; anything else proposes 0 and the coverage vetoes it to 2
|
|
24
|
+
* on a shortfall. `check wiring --explain` returns this exit (it runs under a
|
|
25
|
+
* verdict verb, so its `$?` and trailer must not read 0 over a partial rule);
|
|
26
|
+
* the renderer prints its final line from it.
|
|
27
|
+
*/
|
|
28
|
+
export function settleWiringExplain(report) {
|
|
29
|
+
// The rule's `expectEmpty` acceptance joins its coverage through THE fold
|
|
30
|
+
// (`ruleVerdictRecords`), as `check wiring`'s envelope folds it (round 13):
|
|
31
|
+
// printed at exit 0, never silent; one record when they are the same claim.
|
|
32
|
+
return settleVerdict(report.verdict === 'errors' ? ExitCode.Failure : ExitCode.VerifiedPass, ruleVerdictRecords(report.coverage, report.unitAcceptance));
|
|
33
|
+
}
|
|
10
34
|
/**
|
|
11
35
|
* Render an {@link IWiringExplain} to stdout. Shared by `wiring explain`,
|
|
12
|
-
* `wiring test`, and `check wiring --explain` so all
|
|
13
|
-
* dialect. JSON emits the full payload; text mirrors `search tuning
|
|
14
|
-
* (header → loaded sets → per-site detail → the set-difference →
|
|
15
|
-
*
|
|
36
|
+
* `wiring test`, `gates explain` and `check wiring --explain` so all four speak
|
|
37
|
+
* the same dialect. JSON emits the full payload; text mirrors `search tuning
|
|
38
|
+
* explain` (header → loaded sets → per-site detail → the set-difference →
|
|
39
|
+
* verdict). The status, coverage and final line come from the settled rule
|
|
40
|
+
* (see {@link settleWiringExplain}), so explain can never read clean over a
|
|
41
|
+
* rule `gates check` reports partial.
|
|
42
|
+
* Always returns 0 — explain is informational; a verdict verb that wants the
|
|
43
|
+
* rule's exit reads {@link settleWiringExplain}.
|
|
16
44
|
*/
|
|
17
45
|
export function renderWiringExplain(report, wantJson) {
|
|
18
46
|
if (wantJson) {
|
|
@@ -28,9 +56,13 @@ export function renderWiringExplain(report, wantJson) {
|
|
|
28
56
|
process.stdout.write(kv('registeredMode', 'intersection (must be in EVERY sink)') + '\n');
|
|
29
57
|
}
|
|
30
58
|
process.stdout.write(kv('status', report.status) + '\n');
|
|
31
|
-
process.stdout.write(kv('
|
|
32
|
-
|
|
33
|
-
|
|
59
|
+
process.stdout.write(kv('coverage', formatCoverage(report.coverage)) + '\n');
|
|
60
|
+
process.stdout.write(kv('declared', `${report.declared.distinctCount} distinct across ${report.declared.filesScanned} file(s)` +
|
|
61
|
+
(report.declared.viaExtractor ? ` (via $use:${report.declared.viaExtractor})` : '') +
|
|
62
|
+
scanNote(report.declared.scan, report.declared.blankedChars)) + '\n');
|
|
63
|
+
process.stdout.write(kv('registered', `${report.registered.distinctCount} distinct across ${report.registered.filesScanned} file(s)` +
|
|
64
|
+
(report.registered.viaExtractor ? ` (via $use:${report.registered.viaExtractor})` : '') +
|
|
65
|
+
scanNote(report.registered.scan, report.registered.blankedChars)) + '\n');
|
|
34
66
|
if (report.declared.error)
|
|
35
67
|
process.stdout.write(` ! declared side: ${report.declared.error}\n`);
|
|
36
68
|
if (report.registered.error) {
|
|
@@ -48,13 +80,23 @@ export function renderWiringExplain(report, wantJson) {
|
|
|
48
80
|
}
|
|
49
81
|
}
|
|
50
82
|
if (report.registeredNotDeclared.length > 0) {
|
|
51
|
-
|
|
83
|
+
// One set, two meanings: a parity rule FAILS on each token; a subset rule
|
|
84
|
+
// never examined them, so they are a coverage shortfall (`partial`, exit 2)
|
|
85
|
+
// unless `registeredExtras` accepts them.
|
|
86
|
+
const parity = report.mode === 'parity';
|
|
87
|
+
process.stdout.write(parity
|
|
88
|
+
? `\nRegistered but NOT declared (parity, ${report.registeredNotDeclared.length}):\n`
|
|
89
|
+
: `\nRegistered with NO declared site (subset — never examined by this rule, ${report.registeredNotDeclared.length}):\n`);
|
|
52
90
|
for (const s of report.registeredNotDeclared.slice(0, SITE_DISPLAY_CAP)) {
|
|
53
|
-
process.stdout.write(` ✗ ${s.token} (${s.file}:${s.line})\n`);
|
|
91
|
+
process.stdout.write(` ${parity ? '✗' : '?'} ${s.token} (${s.file}:${s.line})\n`);
|
|
54
92
|
}
|
|
55
93
|
if (report.registeredNotDeclared.length > SITE_DISPLAY_CAP) {
|
|
56
94
|
process.stdout.write(` … (${report.registeredNotDeclared.length - SITE_DISPLAY_CAP} more)\n`);
|
|
57
95
|
}
|
|
96
|
+
if (!parity) {
|
|
97
|
+
process.stdout.write(' → the declared selector may be incomplete. List known extras in `registeredExtras`,\n' +
|
|
98
|
+
" or set `mode: 'parity'` if the two sets should be equal.\n");
|
|
99
|
+
}
|
|
58
100
|
}
|
|
59
101
|
if (report.overlap.length > 0) {
|
|
60
102
|
process.stdout.write(`\nPresent on BOTH sides (disjoint, ${report.overlap.length}):\n`);
|
|
@@ -75,11 +117,32 @@ export function renderWiringExplain(report, wantJson) {
|
|
|
75
117
|
// A rule that checked NOTHING must never read like a clean pass.
|
|
76
118
|
if (report.skipReason) {
|
|
77
119
|
process.stdout.write(`\n! SKIPPED — ${report.skipReason}. A rule that matches nothing is a bug in the rule,\n` +
|
|
78
|
-
|
|
120
|
+
` not a pass. ${formatEmptyRuleAdvice({ fails: report.verdict === 'errors' })}.\n`);
|
|
79
121
|
}
|
|
80
122
|
for (const d of report.diagnostics)
|
|
81
123
|
process.stdout.write(` ! ${d}\n`);
|
|
124
|
+
// THE shared unit-state block (round 13 review): a LOCAL expectEmpty marker
|
|
125
|
+
// whose target appeared, a dead glob of a rule that still matched and a pack
|
|
126
|
+
// marker (INFO) — `check wiring --explain`, `wiring explain` and `gates
|
|
127
|
+
// explain` said `Verdict: pass` over a went-live marker with no line for it.
|
|
128
|
+
process.stdout.write(unitStateNotes([
|
|
129
|
+
{
|
|
130
|
+
id: report.ruleId,
|
|
131
|
+
...(report.unitLiveness !== undefined ? { unitLiveness: report.unitLiveness } : {}),
|
|
132
|
+
reportedEmpty: report.skipReason !== undefined,
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
// An explain view names every unit state — the intended-empty ones too
|
|
136
|
+
// (round 13, K6), as the registry / registration explain views do.
|
|
137
|
+
{ intendedEmpty: true }).text);
|
|
82
138
|
process.stdout.write(`\nVerdict: ${report.verdict}\n`);
|
|
139
|
+
// The shortfall (or the acceptance that waived it) comes from the SETTLED
|
|
140
|
+
// rule: `NOT VERIFIED: …` under a not-verified verdict, `(also not verified:
|
|
141
|
+
// …)` under errors, `accepted by …` under a clean one — never silent.
|
|
142
|
+
const settled = settleWiringExplain(report);
|
|
143
|
+
const line = verdictLine(settled, '');
|
|
144
|
+
if (line)
|
|
145
|
+
process.stdout.write(`${line}\n`);
|
|
83
146
|
return 0;
|
|
84
147
|
}
|
|
85
148
|
function writeSites(label, sites) {
|
|
@@ -143,7 +206,8 @@ async function wiringExplain(args) {
|
|
|
143
206
|
process.stderr.write(`No wiring rule "${ruleId}". Configured rules: ${ids.length > 0 ? ids.join(', ') : '(none)'}\n`);
|
|
144
207
|
return 2;
|
|
145
208
|
}
|
|
146
|
-
|
|
209
|
+
// THE plane scan scope, so `wiring explain` ≡ `check wiring --explain` ≡ `gates explain`.
|
|
210
|
+
return renderWiringExplain(explainWiring(cwd, rule, { excludeDirs: planeScanExcludeDirs(cwd, loaded.value.sharkcraftDir) }), wantJson);
|
|
147
211
|
}
|
|
148
212
|
async function wiringTest(args) {
|
|
149
213
|
const cwd = resolveCwd(args);
|
|
@@ -208,17 +272,50 @@ async function loadRegistrationGraph(cwd) {
|
|
|
208
272
|
const idioms = loaded.value.config.registrationGraph ?? [];
|
|
209
273
|
if (idioms.length === 0)
|
|
210
274
|
return { ok: true, idioms: [] };
|
|
211
|
-
|
|
275
|
+
// THE plane scan scope, so these queries walk the tree `gates check`'s
|
|
276
|
+
// registration plane and finish's unprovided sub-gate walk.
|
|
277
|
+
const scan = { excludeDirs: planeScanExcludeDirs(cwd, loaded.value.sharkcraftDir) };
|
|
278
|
+
const cacheKey = registrationCacheKey(cwd, idioms, scan);
|
|
212
279
|
const cachePath = nodePath.join(cwd, '.sharkcraft', 'cache', 'registration-graph.json');
|
|
213
280
|
if (cacheKey) {
|
|
214
281
|
const cached = readRegistrationCache(cachePath, cacheKey);
|
|
215
282
|
if (cached)
|
|
216
|
-
return { ok: true, idioms, graph: cached };
|
|
283
|
+
return { ok: true, idioms, graph: cached, excludeDirs: scan.excludeDirs };
|
|
217
284
|
}
|
|
218
|
-
const graph = buildRegistrationGraph(cwd, idioms);
|
|
285
|
+
const graph = buildRegistrationGraph(cwd, idioms, scan);
|
|
219
286
|
if (cacheKey)
|
|
220
287
|
writeRegistrationCache(cachePath, cacheKey, graph);
|
|
221
|
-
return { ok: true, idioms, graph };
|
|
288
|
+
return { ok: true, idioms, graph, excludeDirs: scan.excludeDirs };
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* The gate envelope of an absence query that examined nothing in its changed
|
|
292
|
+
* scope (no changed file, or a scope that could not be resolved): 2, never a
|
|
293
|
+
* pass — the same answer the verb returns, carried in `--json` as `gate`.
|
|
294
|
+
*/
|
|
295
|
+
function unexaminedScopeEnvelope(verb, root, reason) {
|
|
296
|
+
return buildGateEnvelope(verb, ExitCode.VerifiedPass, [], {
|
|
297
|
+
unit: 'changed files',
|
|
298
|
+
expected: 0,
|
|
299
|
+
examined: 0,
|
|
300
|
+
root,
|
|
301
|
+
reason,
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* The `--json` keys EVERY registration-query answer carries (round 13 review):
|
|
306
|
+
* the empty-changed-scope and scoped-error answers carried only `gate`, against
|
|
307
|
+
* the documented "always carries `coverage`, `exitCode`, `verdict`,
|
|
308
|
+
* `shortfalls`, `accepted` and `gate`" — the idiom answer's keys.
|
|
309
|
+
*/
|
|
310
|
+
function scopeEnvelopeJson(gate) {
|
|
311
|
+
return {
|
|
312
|
+
coverage: [gate.coverage],
|
|
313
|
+
exitCode: gate.exit,
|
|
314
|
+
verdict: planeVerdictForExit(gate.exit),
|
|
315
|
+
shortfalls: gate.shortfalls,
|
|
316
|
+
accepted: gate.accepted,
|
|
317
|
+
gate,
|
|
318
|
+
};
|
|
222
319
|
}
|
|
223
320
|
/**
|
|
224
321
|
* `<file-signature>:<idiom-hash>` — keyed on the mtime/size signature of the
|
|
@@ -227,9 +324,9 @@ async function loadRegistrationGraph(cwd) {
|
|
|
227
324
|
* run, so the persisted cache can never return a stale wiring verdict. Undefined
|
|
228
325
|
* only if signing itself throws (then the query rebuilds every time).
|
|
229
326
|
*/
|
|
230
|
-
function registrationCacheKey(cwd, idioms) {
|
|
327
|
+
function registrationCacheKey(cwd, idioms, scan) {
|
|
231
328
|
try {
|
|
232
|
-
const signature = registrationGraphSignature(cwd, idioms);
|
|
329
|
+
const signature = registrationGraphSignature(cwd, idioms, scan);
|
|
233
330
|
const idiomHash = createHash('sha1').update(JSON.stringify(idioms)).digest('hex').slice(0, 16);
|
|
234
331
|
return `${signature}:${idiomHash}`;
|
|
235
332
|
}
|
|
@@ -257,16 +354,50 @@ function writeRegistrationCache(cachePath, key, graph) {
|
|
|
257
354
|
// best-effort cache; a write failure never breaks the query.
|
|
258
355
|
}
|
|
259
356
|
}
|
|
260
|
-
|
|
357
|
+
/**
|
|
358
|
+
* No `registrationGraph[]` declared: the query examined nothing, so it is NOT
|
|
359
|
+
* VERIFIED (2) — never "no unprovided tokens" at 0 — unless `--allow-empty`
|
|
360
|
+
* accepts the empty graph explicitly (printed). `wiring unprovided|orphans|
|
|
361
|
+
* chain` are registered verdict verbs; `check wiring` / `gates check` settle
|
|
362
|
+
* the same empty request to 2, so the planes agree. Settled through the shared
|
|
363
|
+
* gate envelope, which `--json` carries as `gate` (round 13, P4).
|
|
364
|
+
*/
|
|
365
|
+
function noIdiomsHint(args, wantJson, verb) {
|
|
366
|
+
const settled = buildGateEnvelope(verb, ExitCode.VerifiedPass, [], {
|
|
367
|
+
unit: 'registration idioms',
|
|
368
|
+
expected: 0,
|
|
369
|
+
examined: 0,
|
|
370
|
+
root: resolveCwd(args),
|
|
371
|
+
reason: 'no registrationGraph[] declared',
|
|
372
|
+
...allowEmptyValve(args, 0),
|
|
373
|
+
});
|
|
261
374
|
if (wantJson) {
|
|
262
|
-
process.stdout.write(asJson({
|
|
263
|
-
|
|
375
|
+
process.stdout.write(asJson({
|
|
376
|
+
schema: 'sharkcraft.registration-graph/v1',
|
|
377
|
+
idioms: [],
|
|
378
|
+
tokens: [],
|
|
379
|
+
// The same keys as the idiom answer (round 13 review): `coverage` was
|
|
380
|
+
// missing here, against the documented "always carries".
|
|
381
|
+
coverage: [settled.coverage],
|
|
382
|
+
exitCode: settled.exit,
|
|
383
|
+
verdict: planeVerdictForExit(settled.exit),
|
|
384
|
+
shortfalls: settled.shortfalls,
|
|
385
|
+
accepted: settled.accepted,
|
|
386
|
+
gate: settled,
|
|
387
|
+
}) + '\n');
|
|
388
|
+
return settled.exit;
|
|
264
389
|
}
|
|
265
390
|
process.stdout.write(header('Registration graph'));
|
|
266
391
|
process.stdout.write(' No registration idioms configured. Declare `registrationGraph[]` in\n' +
|
|
267
392
|
' sharkcraft.config.ts (declared/provided/consumed shapes) to model your DI\n' +
|
|
268
393
|
' wiring as a queryable graph — see docs/wiring.md.\n');
|
|
269
|
-
|
|
394
|
+
const line = verdictLine(settled, 'No registration idioms configured — accepted.');
|
|
395
|
+
if (line)
|
|
396
|
+
process.stdout.write(`\n${line}\n`);
|
|
397
|
+
if (settled.exit === ExitCode.NotVerified) {
|
|
398
|
+
process.stdout.write(`Pass --${ALLOW_EMPTY_FLAG} to accept an empty registration graph explicitly.\n`);
|
|
399
|
+
}
|
|
400
|
+
return settled.exit;
|
|
270
401
|
}
|
|
271
402
|
function siteLine(s) {
|
|
272
403
|
return `${s.file}:${s.line} [${s.idiom}]`;
|
|
@@ -308,14 +439,18 @@ async function wiringChain(args) {
|
|
|
308
439
|
}
|
|
309
440
|
const loaded = await loadRegistrationGraph(cwd);
|
|
310
441
|
if (!loaded.ok) {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
442
|
+
// The registration graph is declared in the config that did not load: the
|
|
443
|
+
// query never STARTED — a usage error (3), never a `1` finding.
|
|
444
|
+
if (wantJson) {
|
|
445
|
+
process.stdout.write(asJson({ ok: false, error: loaded.error, exitCode: ExitCode.UsageError }) + '\n');
|
|
446
|
+
}
|
|
447
|
+
else {
|
|
314
448
|
process.stderr.write(`Could not load config: ${loaded.error}\n`);
|
|
315
|
-
|
|
449
|
+
}
|
|
450
|
+
return ExitCode.UsageError;
|
|
316
451
|
}
|
|
317
452
|
if (!loaded.graph)
|
|
318
|
-
return noIdiomsHint(wantJson);
|
|
453
|
+
return noIdiomsHint(args, wantJson, 'wiring chain');
|
|
319
454
|
const chain = registrationChain(loaded.graph, token);
|
|
320
455
|
if (!chain) {
|
|
321
456
|
if (wantJson) {
|
|
@@ -326,9 +461,39 @@ async function wiringChain(args) {
|
|
|
326
461
|
process.stdout.write(' Token not found in the registration graph.\n');
|
|
327
462
|
return 1;
|
|
328
463
|
}
|
|
464
|
+
// Round 13 review: settled like `wiring unprovided|orphans` (P4) — every
|
|
465
|
+
// idiom the token's sites belong to folds its ROLE record and expectEmpty
|
|
466
|
+
// acceptance from THE role authority (`measureIdiomRoleCoverage`) through
|
|
467
|
+
// the shared envelope. A chain over a dead declared role printed "declared
|
|
468
|
+
// (0)" and then "✓ declared → provided → consumed." at exit 0 while its
|
|
469
|
+
// siblings said NOT VERIFIED; an acceptance was printed nowhere.
|
|
470
|
+
const involved = new Set([...chain.declared, ...chain.provided, ...chain.consumed].map((s) => s.idiom));
|
|
471
|
+
const matched = loaded.idioms.filter((i) => involved.has(i.name));
|
|
472
|
+
const idioms = matched.length > 0 ? matched : loaded.idioms;
|
|
473
|
+
const roles = measureIdiomRoleCoverage(cwd, idioms, loaded.excludeDirs ?? []);
|
|
474
|
+
const gate = buildGateEnvelope('wiring chain', ExitCode.VerifiedPass, roles.map((r) => ({
|
|
475
|
+
id: r.idiom,
|
|
476
|
+
type: 'registration',
|
|
477
|
+
status: 'passed',
|
|
478
|
+
severity: 'warning',
|
|
479
|
+
counts: {},
|
|
480
|
+
violations: [],
|
|
481
|
+
coverage: r.coverage,
|
|
482
|
+
...(r.unitAcceptance !== undefined ? { unitAcceptance: r.unitAcceptance } : {}),
|
|
483
|
+
})), { unit: 'registration idioms', expected: idioms.length, examined: idioms.length });
|
|
484
|
+
const unprovided = !chain.isProvided && (chain.isDeclared || chain.isConsumed);
|
|
485
|
+
const orphan = chain.isProvided && !chain.isConsumed;
|
|
329
486
|
if (wantJson) {
|
|
330
|
-
process.stdout.write(asJson(
|
|
331
|
-
|
|
487
|
+
process.stdout.write(asJson({
|
|
488
|
+
...chain,
|
|
489
|
+
coverage: roles.map((r) => r.coverage),
|
|
490
|
+
exitCode: gate.exit,
|
|
491
|
+
verdict: planeVerdictForExit(gate.exit),
|
|
492
|
+
shortfalls: gate.shortfalls,
|
|
493
|
+
accepted: gate.accepted,
|
|
494
|
+
gate,
|
|
495
|
+
}) + '\n');
|
|
496
|
+
return gate.exit;
|
|
332
497
|
}
|
|
333
498
|
process.stdout.write(header(`Wiring chain: ${token}`));
|
|
334
499
|
const section = (label, sites) => {
|
|
@@ -341,34 +506,48 @@ async function wiringChain(args) {
|
|
|
341
506
|
section('declared', chain.declared);
|
|
342
507
|
section('provided', chain.provided);
|
|
343
508
|
section('consumed', chain.consumed);
|
|
344
|
-
if (
|
|
509
|
+
if (unprovided) {
|
|
345
510
|
process.stdout.write('\n ⚠ UNPROVIDED — declared/injected but never provided (silent at runtime).\n');
|
|
346
511
|
}
|
|
347
|
-
else if (
|
|
512
|
+
else if (orphan) {
|
|
348
513
|
process.stdout.write('\n ⚠ ORPHAN — provided but nothing consumes it.\n');
|
|
349
514
|
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
515
|
+
// The ✓ only from the SETTLED verdict — a dead role is NOT VERIFIED (2), an
|
|
516
|
+
// acceptance is printed under the clean line.
|
|
517
|
+
const line = verdictLine(gate, unprovided || orphan ? '' : ' ✓ declared → provided → consumed.');
|
|
518
|
+
if (line)
|
|
519
|
+
process.stdout.write(`\n${line}\n`);
|
|
520
|
+
return gate.exit;
|
|
354
521
|
}
|
|
355
522
|
async function wiringUnprovided(args) {
|
|
356
523
|
const cwd = resolveCwd(args);
|
|
357
524
|
const wantJson = flagBool(args, 'json');
|
|
358
525
|
const loaded = await loadRegistrationGraph(cwd);
|
|
359
526
|
if (!loaded.ok) {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
527
|
+
// The registration graph is declared in the config that did not load: the
|
|
528
|
+
// query never STARTED — a usage error (3), never a `1` finding.
|
|
529
|
+
if (wantJson) {
|
|
530
|
+
process.stdout.write(asJson({ ok: false, error: loaded.error, exitCode: ExitCode.UsageError }) + '\n');
|
|
531
|
+
}
|
|
532
|
+
else {
|
|
363
533
|
process.stderr.write(`Could not load config: ${loaded.error}\n`);
|
|
364
|
-
|
|
534
|
+
}
|
|
535
|
+
return ExitCode.UsageError;
|
|
365
536
|
}
|
|
366
537
|
if (!loaded.graph)
|
|
367
|
-
return noIdiomsHint(wantJson);
|
|
538
|
+
return noIdiomsHint(args, wantJson, 'wiring unprovided');
|
|
368
539
|
const scoped = changedScopeFor(args, cwd);
|
|
369
540
|
if (scoped.error) {
|
|
370
541
|
if (wantJson) {
|
|
371
|
-
|
|
542
|
+
const gate = unexaminedScopeEnvelope('wiring unprovided', cwd, scoped.error);
|
|
543
|
+
process.stdout.write(asJson({
|
|
544
|
+
schema: loaded.graph.schema,
|
|
545
|
+
scoped: true,
|
|
546
|
+
error: scoped.error,
|
|
547
|
+
verified: false,
|
|
548
|
+
// The documented keys every answer carries (round 13 review).
|
|
549
|
+
...scopeEnvelopeJson(gate),
|
|
550
|
+
}) + '\n');
|
|
372
551
|
}
|
|
373
552
|
else {
|
|
374
553
|
process.stderr.write(`error: ${scoped.error}\n`);
|
|
@@ -380,50 +559,95 @@ async function wiringUnprovided(args) {
|
|
|
380
559
|
// a green `0` that reads as "no unprovided tokens" (a25 §1.1 exit contract).
|
|
381
560
|
if (scope && scope.length === 0) {
|
|
382
561
|
if (wantJson) {
|
|
383
|
-
|
|
562
|
+
const gate = unexaminedScopeEnvelope('wiring unprovided', cwd, 'no file in the changed scope');
|
|
563
|
+
process.stdout.write(asJson({
|
|
564
|
+
schema: loaded.graph.schema,
|
|
565
|
+
scoped: true,
|
|
566
|
+
total: 0,
|
|
567
|
+
unprovided: [],
|
|
568
|
+
verified: false,
|
|
569
|
+
...scopeEnvelopeJson(gate),
|
|
570
|
+
}) + '\n');
|
|
384
571
|
return ExitCode.NotVerified;
|
|
385
572
|
}
|
|
386
573
|
process.stdout.write(header('Unprovided tokens (declared/injected but never provided)'));
|
|
387
574
|
process.stdout.write(' – No files in the changed scope — nothing to verify (not verified).\n');
|
|
388
575
|
return ExitCode.NotVerified;
|
|
389
576
|
}
|
|
390
|
-
|
|
577
|
+
// Settled against what the graph READ and what every idiom's ROLES examined,
|
|
578
|
+
// through the one boundaries helper finish and MCP use. An idiom file over
|
|
579
|
+
// the read cap holds sites the graph never saw: a token whose provider could
|
|
580
|
+
// sit there is `unproven`, not a finding (the registry plane's rule: only a
|
|
581
|
+
// positive finding survives an incomplete read), and a clean answer over it
|
|
582
|
+
// is NOT VERIFIED (2). Round 13 (P4): so is a clean answer over a role whose
|
|
583
|
+
// globs matched no file — THE role authority `gates check` reads.
|
|
584
|
+
const roles = measureIdiomRoleCoverage(cwd, loaded.idioms, loaded.excludeDirs ?? []);
|
|
585
|
+
const verdict = registrationUnprovidedVerdict(loaded.graph, loaded.idioms, roles, scope);
|
|
586
|
+
const unprovided = verdict.findings;
|
|
587
|
+
const settled = settleRegistrationGraph({
|
|
588
|
+
verb: 'wiring unprovided',
|
|
589
|
+
verdict,
|
|
590
|
+
proposed: unprovided.length > 0 ? ExitCode.Failure : ExitCode.VerifiedPass,
|
|
591
|
+
clean: ` ✓ Every declared/injected token${scope ? ' in the changed scope' : ''} has a provider. ✓`,
|
|
592
|
+
subject: 'unprovided',
|
|
593
|
+
idioms: loaded.idioms.length,
|
|
594
|
+
});
|
|
391
595
|
if (wantJson) {
|
|
392
|
-
process.stdout.write(asJson({ schema: loaded.graph.schema, scoped: scope !== undefined, total: unprovided.length, unprovided }) + '\n');
|
|
393
|
-
return
|
|
596
|
+
process.stdout.write(asJson({ schema: loaded.graph.schema, scoped: scope !== undefined, total: unprovided.length, unprovided, ...settled.json }) + '\n');
|
|
597
|
+
return settled.exit;
|
|
394
598
|
}
|
|
395
599
|
process.stdout.write(header('Unprovided tokens (declared/injected but never provided)'));
|
|
396
600
|
if (scope)
|
|
397
601
|
process.stdout.write(kv('scope', `changed-only (${scope.length} file(s))`) + '\n');
|
|
398
|
-
if (unprovided.length
|
|
399
|
-
process.stdout.write(`
|
|
400
|
-
|
|
602
|
+
if (unprovided.length > 0) {
|
|
603
|
+
process.stdout.write(` ${unprovided.length} token(s) resolve to nothing at runtime:\n`);
|
|
604
|
+
for (const u of unprovided) {
|
|
605
|
+
const site = u.declared[0] ?? u.consumed[0];
|
|
606
|
+
const where = site ? ` (${siteLine(site)})` : '';
|
|
607
|
+
process.stdout.write(` ✗ ${u.token}${where}\n`);
|
|
608
|
+
}
|
|
401
609
|
}
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
const
|
|
406
|
-
|
|
610
|
+
if (verdict.unproven.length > 0) {
|
|
611
|
+
process.stdout.write(` ${verdict.unproven.length} token(s) have no provider among the files read — NOT VERIFIED ` +
|
|
612
|
+
'(a provider may sit in a file the reader did not read):\n');
|
|
613
|
+
for (const u of verdict.unproven) {
|
|
614
|
+
const site = u.declared[0] ?? u.consumed[0];
|
|
615
|
+
process.stdout.write(` ? ${u.token}${site ? ` (${siteLine(site)})` : ''}\n`);
|
|
616
|
+
}
|
|
407
617
|
}
|
|
408
|
-
|
|
618
|
+
if (settled.line)
|
|
619
|
+
process.stdout.write(`${settled.line}\n`);
|
|
620
|
+
return settled.exit;
|
|
409
621
|
}
|
|
410
622
|
async function wiringOrphans(args) {
|
|
411
623
|
const cwd = resolveCwd(args);
|
|
412
624
|
const wantJson = flagBool(args, 'json');
|
|
413
625
|
const loaded = await loadRegistrationGraph(cwd);
|
|
414
626
|
if (!loaded.ok) {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
627
|
+
// The registration graph is declared in the config that did not load: the
|
|
628
|
+
// query never STARTED — a usage error (3), never a `1` finding.
|
|
629
|
+
if (wantJson) {
|
|
630
|
+
process.stdout.write(asJson({ ok: false, error: loaded.error, exitCode: ExitCode.UsageError }) + '\n');
|
|
631
|
+
}
|
|
632
|
+
else {
|
|
418
633
|
process.stderr.write(`Could not load config: ${loaded.error}\n`);
|
|
419
|
-
|
|
634
|
+
}
|
|
635
|
+
return ExitCode.UsageError;
|
|
420
636
|
}
|
|
421
637
|
if (!loaded.graph)
|
|
422
|
-
return noIdiomsHint(wantJson);
|
|
638
|
+
return noIdiomsHint(args, wantJson, 'wiring orphans');
|
|
423
639
|
const scoped = changedScopeFor(args, cwd);
|
|
424
640
|
if (scoped.error) {
|
|
425
641
|
if (wantJson) {
|
|
426
|
-
|
|
642
|
+
const gate = unexaminedScopeEnvelope('wiring orphans', cwd, scoped.error);
|
|
643
|
+
process.stdout.write(asJson({
|
|
644
|
+
schema: loaded.graph.schema,
|
|
645
|
+
scoped: true,
|
|
646
|
+
error: scoped.error,
|
|
647
|
+
verified: false,
|
|
648
|
+
// The documented keys every answer carries (round 13 review).
|
|
649
|
+
...scopeEnvelopeJson(gate),
|
|
650
|
+
}) + '\n');
|
|
427
651
|
}
|
|
428
652
|
else {
|
|
429
653
|
process.stderr.write(`error: ${scoped.error}\n`);
|
|
@@ -433,38 +657,102 @@ async function wiringOrphans(args) {
|
|
|
433
657
|
const scope = scoped.files;
|
|
434
658
|
if (scope && scope.length === 0) {
|
|
435
659
|
if (wantJson) {
|
|
436
|
-
|
|
660
|
+
const gate = unexaminedScopeEnvelope('wiring orphans', cwd, 'no file in the changed scope');
|
|
661
|
+
process.stdout.write(asJson({
|
|
662
|
+
schema: loaded.graph.schema,
|
|
663
|
+
scoped: true,
|
|
664
|
+
total: 0,
|
|
665
|
+
orphans: [],
|
|
666
|
+
verified: false,
|
|
667
|
+
...scopeEnvelopeJson(gate),
|
|
668
|
+
}) + '\n');
|
|
437
669
|
return ExitCode.NotVerified;
|
|
438
670
|
}
|
|
439
671
|
process.stdout.write(header('Orphan registrations (provided but nothing consumes)'));
|
|
440
672
|
process.stdout.write(' – No files in the changed scope — nothing to verify (not verified).\n');
|
|
441
673
|
return ExitCode.NotVerified;
|
|
442
674
|
}
|
|
443
|
-
|
|
675
|
+
// Orphans never fail, but "every provider is consumed" over an idiom file
|
|
676
|
+
// the reader could not read is NOT VERIFIED (2), settled like `unprovided`
|
|
677
|
+
// through the same boundaries helper. A token whose consumer could sit in
|
|
678
|
+
// such a file is `unproven`, never listed as an orphan. Round 13 (P4): so is
|
|
679
|
+
// the answer over a role whose globs matched no file (THE role authority).
|
|
680
|
+
const roles = measureIdiomRoleCoverage(cwd, loaded.idioms, loaded.excludeDirs ?? []);
|
|
681
|
+
const verdict = registrationOrphansVerdict(loaded.graph, loaded.idioms, roles, scope);
|
|
682
|
+
const orphans = verdict.findings;
|
|
683
|
+
const settled = settleRegistrationGraph({
|
|
684
|
+
verb: 'wiring orphans',
|
|
685
|
+
verdict,
|
|
686
|
+
proposed: ExitCode.VerifiedPass,
|
|
687
|
+
clean: orphans.length === 0
|
|
688
|
+
? ` ✓ Every provided token${scope ? ' in the changed scope' : ''} is consumed somewhere. ✓`
|
|
689
|
+
: '',
|
|
690
|
+
subject: 'orphans',
|
|
691
|
+
idioms: loaded.idioms.length,
|
|
692
|
+
});
|
|
444
693
|
if (wantJson) {
|
|
445
|
-
process.stdout.write(asJson({ schema: loaded.graph.schema, scoped: scope !== undefined, total: orphans.length, orphans }) + '\n');
|
|
446
|
-
return
|
|
694
|
+
process.stdout.write(asJson({ schema: loaded.graph.schema, scoped: scope !== undefined, total: orphans.length, orphans, ...settled.json }) + '\n');
|
|
695
|
+
return settled.exit;
|
|
447
696
|
}
|
|
448
697
|
process.stdout.write(header('Orphan registrations (provided but nothing consumes)'));
|
|
449
698
|
if (scope)
|
|
450
699
|
process.stdout.write(kv('scope', `changed-only (${scope.length} file(s))`) + '\n');
|
|
451
|
-
if (orphans.length
|
|
452
|
-
process.stdout.write(`
|
|
453
|
-
|
|
700
|
+
if (orphans.length > 0) {
|
|
701
|
+
process.stdout.write(` ${orphans.length} provided token(s) nothing injects:\n`);
|
|
702
|
+
for (const o of orphans) {
|
|
703
|
+
const site = o.provided[0];
|
|
704
|
+
process.stdout.write(` • ${o.token}${site ? ` (${siteLine(site)})` : ''}\n`);
|
|
705
|
+
}
|
|
454
706
|
}
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
707
|
+
if (verdict.unproven.length > 0) {
|
|
708
|
+
process.stdout.write(` ${verdict.unproven.length} provided token(s) have no consumer among the files read — NOT VERIFIED ` +
|
|
709
|
+
'(a consumer may sit in a file the reader did not read):\n');
|
|
710
|
+
for (const o of verdict.unproven) {
|
|
711
|
+
const site = o.provided[0];
|
|
712
|
+
process.stdout.write(` ? ${o.token}${site ? ` (${siteLine(site)})` : ''}\n`);
|
|
713
|
+
}
|
|
459
714
|
}
|
|
460
|
-
|
|
715
|
+
if (settled.line)
|
|
716
|
+
process.stdout.write(`${settled.line}\n`);
|
|
717
|
+
return settled.exit;
|
|
461
718
|
}
|
|
462
|
-
const WIRING_USAGE = 'shrk wiring explain <ruleId> | test <candidate.json|inline> | chain <token> | unprovided | orphans [--changed-only | --base <ref>] [--json]';
|
|
719
|
+
const WIRING_USAGE = 'shrk wiring explain <ruleId> | test <candidate.json|inline> | chain <token> | unprovided | orphans [--changed-only | --base <ref>] [--allow-empty] [--json]';
|
|
463
720
|
export const wiringCommand = {
|
|
464
721
|
name: 'wiring',
|
|
722
|
+
positionals: PositionalMode.None,
|
|
723
|
+
subverbs: [
|
|
724
|
+
{
|
|
725
|
+
name: 'explain',
|
|
726
|
+
description: 'Dry-run one wiring rule: the declared / registered sets it extracts.',
|
|
727
|
+
usage: 'shrk wiring explain <ruleId> [--json]',
|
|
728
|
+
positionals: PositionalMode.Free,
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
name: 'test',
|
|
732
|
+
description: 'Dry-run a candidate wiring rule (a file or inline JSON) without touching config.',
|
|
733
|
+
usage: 'shrk wiring test <candidate.json | inline-json> [--json]',
|
|
734
|
+
positionals: PositionalMode.Path,
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
name: 'chain',
|
|
738
|
+
description: 'Trace one token declared → provided → consumed through the registration graph.',
|
|
739
|
+
usage: 'shrk wiring chain <token> [--allow-empty] [--json]',
|
|
740
|
+
positionals: PositionalMode.Free,
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
name: 'unprovided',
|
|
744
|
+
description: 'Tokens consumed but never provided — the silent-at-runtime DI bug.',
|
|
745
|
+
usage: 'shrk wiring unprovided [--changed-only | --base <ref>] [--allow-empty] [--json]',
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
name: 'orphans',
|
|
749
|
+
description: 'Tokens provided that nothing injects.',
|
|
750
|
+
usage: 'shrk wiring orphans [--changed-only | --base <ref>] [--allow-empty] [--json]',
|
|
751
|
+
},
|
|
752
|
+
],
|
|
465
753
|
description: 'Author-loop + runtime-wiring queries (no config write): `explain <ruleId>` / `test <candidate>` show what a wiring rule extracts; `chain <token>` / `unprovided` / `orphans` query the DI/registration graph (declared→provided→consumed) for the silent-at-runtime bugs imports can\'t see. `unprovided` / `orphans` accept `--changed-only` (working tree) or `--base <ref>` to scope the verdict to the changeset.',
|
|
466
754
|
usage: WIRING_USAGE,
|
|
467
|
-
booleanFlags: new Set(['json', 'changed-only']),
|
|
755
|
+
booleanFlags: new Set(['json', 'changed-only', ALLOW_EMPTY_FLAG]),
|
|
468
756
|
async run(args) {
|
|
469
757
|
const sub = args.positional[0];
|
|
470
758
|
if (sub === 'explain')
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs';
|
|
2
2
|
import * as nodePath from 'node:path';
|
|
3
|
-
import { runArchCheck } from '@shrkcrft/architecture-guard';
|
|
3
|
+
import { archStoreMissing, runArchCheck } from '@shrkcrft/architecture-guard';
|
|
4
4
|
import { FrameworkQueryApi } from '@shrkcrft/framework-scanners';
|
|
5
|
-
import { detectGraphFreshness, GraphQueryApi, GraphStore } from '@shrkcrft/graph';
|
|
5
|
+
import { detectGraphFreshness, GraphQueryApi, GraphStore, graphFreshnessBehind } from '@shrkcrft/graph';
|
|
6
6
|
import { findResumePoint, } from '@shrkcrft/migrate';
|
|
7
7
|
import { QualityGateReportStore, runQualityGates } from '@shrkcrft/quality-gates';
|
|
8
8
|
import { BridgeStore } from '@shrkcrft/rule-graph';
|
|
@@ -114,7 +114,7 @@ function readGraphSection(store, projectRoot) {
|
|
|
114
114
|
// `corrupt` (store self-integrity) outranks `stale` (disk drift): a digest
|
|
115
115
|
// failure means the counts themselves can't be trusted.
|
|
116
116
|
const fresh = detectGraphFreshness(projectRoot);
|
|
117
|
-
const behind = fresh
|
|
117
|
+
const behind = graphFreshnessBehind(fresh);
|
|
118
118
|
const verify = store.verifyDigest();
|
|
119
119
|
const state = !verify.ok ? 'corrupt' : behind > 0 ? 'stale' : 'fresh';
|
|
120
120
|
return {
|
|
@@ -165,7 +165,7 @@ function readArchSection(projectRoot) {
|
|
|
165
165
|
void archPath;
|
|
166
166
|
const report = runArchCheck({ projectRoot });
|
|
167
167
|
return {
|
|
168
|
-
available:
|
|
168
|
+
available: !archStoreMissing(report),
|
|
169
169
|
errors: report.countsBySeverity.error,
|
|
170
170
|
warnings: report.countsBySeverity.warning,
|
|
171
171
|
violationsByKind: report.countsByKind,
|