@shrkcrft/cli 0.1.0-alpha.30 → 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 +54 -3
- package/dist/commands/baseline.command.d.ts.map +1 -1
- package/dist/commands/baseline.command.js +582 -74
- 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 +138 -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 +1241 -322
- 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 +3 -0
- 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 +13 -0
- package/dist/commands/docs-references.command.d.ts.map +1 -1
- package/dist/commands/docs-references.command.js +269 -72
- package/dist/commands/doctor.command.d.ts.map +1 -1
- package/dist/commands/doctor.command.js +58 -4
- 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 +52 -0
- package/dist/commands/gates.command.d.ts.map +1 -1
- package/dist/commands/gates.command.js +811 -185
- 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 +33 -3
- package/dist/commands/generated.command.d.ts.map +1 -1
- package/dist/commands/generated.command.js +499 -147
- 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 +198 -24
- 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 +360 -73
- 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 +37 -3
- package/dist/gates/gate-rule-globs.d.ts.map +1 -1
- package/dist/gates/gate-rule-globs.js +78 -40
- package/dist/gates/gate-rule-view.d.ts +17 -4
- package/dist/gates/gate-rule-view.d.ts.map +1 -1
- package/dist/gates/gate-rule-view.js +105 -90
- 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 +187 -4
- package/dist/gates/rule-coverage.d.ts.map +1 -1
- package/dist/gates/rule-coverage.js +501 -49
- package/dist/gates/run-gate-planes.d.ts +14 -0
- package/dist/gates/run-gate-planes.d.ts.map +1 -1
- package/dist/gates/run-gate-planes.js +172 -30
- 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 +200 -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,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which layer of the `surface{}` composition declared a selector: the
|
|
3
|
+
* project's own `sharkcraft.config.ts`, or the active surface profile it
|
|
4
|
+
* selects. Config wins over the profile — an explicit `surface.enabled`
|
|
5
|
+
* overrides a PROFILE's deny, never a config deny.
|
|
6
|
+
*/
|
|
7
|
+
export var SurfaceLayer;
|
|
8
|
+
(function (SurfaceLayer) {
|
|
9
|
+
SurfaceLayer["Config"] = "config";
|
|
10
|
+
SurfaceLayer["Profile"] = "profile";
|
|
11
|
+
})(SurfaceLayer || (SurfaceLayer = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Why the surface gate refused a command (exit 78). One gate, three reasons:
|
|
3
|
+
*
|
|
4
|
+
* - `experimental` — an experimental command not in `surface.enabled`
|
|
5
|
+
* - `tool-maintenance` — a command that maintains SharkCraft itself, run
|
|
6
|
+
* outside SharkCraft's own repository
|
|
7
|
+
* - `disabled` — denied by a `surface.disabled` selector
|
|
8
|
+
*
|
|
9
|
+
* None of them is a check failure.
|
|
10
|
+
*/
|
|
11
|
+
export declare enum SurfaceRefusalReason {
|
|
12
|
+
Experimental = "experimental",
|
|
13
|
+
ToolMaintenance = "tool-maintenance",
|
|
14
|
+
Disabled = "disabled"
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=surface-refusal-reason.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surface-refusal-reason.d.ts","sourceRoot":"","sources":["../../src/surface/surface-refusal-reason.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,oBAAY,oBAAoB;IAC9B,YAAY,iBAAiB;IAC7B,eAAe,qBAAqB;IACpC,QAAQ,aAAa;CACtB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Why the surface gate refused a command (exit 78). One gate, three reasons:
|
|
3
|
+
*
|
|
4
|
+
* - `experimental` — an experimental command not in `surface.enabled`
|
|
5
|
+
* - `tool-maintenance` — a command that maintains SharkCraft itself, run
|
|
6
|
+
* outside SharkCraft's own repository
|
|
7
|
+
* - `disabled` — denied by a `surface.disabled` selector
|
|
8
|
+
*
|
|
9
|
+
* None of them is a check failure.
|
|
10
|
+
*/
|
|
11
|
+
export var SurfaceRefusalReason;
|
|
12
|
+
(function (SurfaceRefusalReason) {
|
|
13
|
+
SurfaceRefusalReason["Experimental"] = "experimental";
|
|
14
|
+
SurfaceRefusalReason["ToolMaintenance"] = "tool-maintenance";
|
|
15
|
+
SurfaceRefusalReason["Disabled"] = "disabled";
|
|
16
|
+
})(SurfaceRefusalReason || (SurfaceRefusalReason = {}));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE surface selector matcher (round 11 §5.1#3) — the one answer to "does
|
|
3
|
+
* this `surface.hidden` / `surface.enabled` / `surface.disabled` entry name
|
|
4
|
+
* this command?". The tier resolver, the surface summary (flags + the
|
|
5
|
+
* unknown-selector warnings) and `surface deny` all read it, so a selector can
|
|
6
|
+
* never hide a command in one place and miss it in another.
|
|
7
|
+
*
|
|
8
|
+
* - an exact command path, or one of its alias spellings: `bundle list`
|
|
9
|
+
* - a GROUP selector — a path followed by ` *`: `bundle *` names `bundle`
|
|
10
|
+
* itself and every command below it (`bundle list`, `bundle replay …`)
|
|
11
|
+
*
|
|
12
|
+
* Back-compat is exact: no pre-round-11 selector ends in ` *`, and an exact
|
|
13
|
+
* selector still names exactly one path. A bare `*` is not a group selector
|
|
14
|
+
* (it names no command, so the summary warns `unknown-command`).
|
|
15
|
+
*/
|
|
16
|
+
export declare const GROUP_SELECTOR_SUFFIX = " *";
|
|
17
|
+
/** True for `<path> *` (a non-empty path followed by ` *`). */
|
|
18
|
+
export declare function isGroupSelector(selector: string): boolean;
|
|
19
|
+
/** Does `selector` name `command` (a path or an alias spelling)? */
|
|
20
|
+
export declare function matchesSurfaceSelector(selector: string, command: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The first selector in `selectors` that names any of `names` (a command path
|
|
23
|
+
* plus its alias spellings), or `undefined`.
|
|
24
|
+
*/
|
|
25
|
+
export declare function firstMatchingSelector(selectors: readonly string[] | undefined, names: readonly string[]): string | undefined;
|
|
26
|
+
//# sourceMappingURL=surface-selector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surface-selector.d.ts","sourceRoot":"","sources":["../../src/surface/surface-selector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAE1C,+DAA+D;AAC/D,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAGzD;AAED,oEAAoE;AACpE,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAQjF;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EACxC,KAAK,EAAE,SAAS,MAAM,EAAE,GACvB,MAAM,GAAG,SAAS,CAKpB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE surface selector matcher (round 11 §5.1#3) — the one answer to "does
|
|
3
|
+
* this `surface.hidden` / `surface.enabled` / `surface.disabled` entry name
|
|
4
|
+
* this command?". The tier resolver, the surface summary (flags + the
|
|
5
|
+
* unknown-selector warnings) and `surface deny` all read it, so a selector can
|
|
6
|
+
* never hide a command in one place and miss it in another.
|
|
7
|
+
*
|
|
8
|
+
* - an exact command path, or one of its alias spellings: `bundle list`
|
|
9
|
+
* - a GROUP selector — a path followed by ` *`: `bundle *` names `bundle`
|
|
10
|
+
* itself and every command below it (`bundle list`, `bundle replay …`)
|
|
11
|
+
*
|
|
12
|
+
* Back-compat is exact: no pre-round-11 selector ends in ` *`, and an exact
|
|
13
|
+
* selector still names exactly one path. A bare `*` is not a group selector
|
|
14
|
+
* (it names no command, so the summary warns `unknown-command`).
|
|
15
|
+
*/
|
|
16
|
+
export const GROUP_SELECTOR_SUFFIX = ' *';
|
|
17
|
+
/** True for `<path> *` (a non-empty path followed by ` *`). */
|
|
18
|
+
export function isGroupSelector(selector) {
|
|
19
|
+
const s = selector.trim();
|
|
20
|
+
return s.endsWith(GROUP_SELECTOR_SUFFIX) && s.slice(0, -GROUP_SELECTOR_SUFFIX.length).trim().length > 0;
|
|
21
|
+
}
|
|
22
|
+
/** Does `selector` name `command` (a path or an alias spelling)? */
|
|
23
|
+
export function matchesSurfaceSelector(selector, command) {
|
|
24
|
+
const want = selector.trim();
|
|
25
|
+
const name = command.trim();
|
|
26
|
+
if (isGroupSelector(want)) {
|
|
27
|
+
const group = want.slice(0, -GROUP_SELECTOR_SUFFIX.length).trim();
|
|
28
|
+
return name === group || name.startsWith(`${group} `);
|
|
29
|
+
}
|
|
30
|
+
return name === want;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The first selector in `selectors` that names any of `names` (a command path
|
|
34
|
+
* plus its alias spellings), or `undefined`.
|
|
35
|
+
*/
|
|
36
|
+
export function firstMatchingSelector(selectors, names) {
|
|
37
|
+
for (const selector of selectors ?? []) {
|
|
38
|
+
if (names.some((n) => matchesSurfaceSelector(selector, n)))
|
|
39
|
+
return selector;
|
|
40
|
+
}
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
@@ -1,20 +1,48 @@
|
|
|
1
|
-
import { CommandTier, type ICommandCatalogEntry } from '../commands/command-catalog.js';
|
|
1
|
+
import { CommandAudience, CommandTier, type ICommandCatalogEntry } from '../commands/command-catalog.js';
|
|
2
|
+
import { CommandDispatchKind } from './command-dispatch-kind.js';
|
|
3
|
+
import type { ICommandIndex } from './i-command-index.js';
|
|
4
|
+
import type { ISurfaceDenial } from './i-surface-denial.js';
|
|
2
5
|
import { TierSource, type ITierResolution, type ITierResolverContext } from './tier.js';
|
|
3
|
-
|
|
6
|
+
/**
|
|
7
|
+
* v2 (round 11): the summary iterates the COMMAND INDEX — every dispatchable
|
|
8
|
+
* verb, subverb and meta flag — instead of the catalog, and each row carries
|
|
9
|
+
* its real description, usage, dispatch kind, audience and folded flag
|
|
10
|
+
* variants. v1 listed catalog rows only (75 registered verbs were missing) and
|
|
11
|
+
* printed one placeholder sentence for every extended row.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SURFACE_SUMMARY_SCHEMA = "sharkcraft.surface.v2";
|
|
4
14
|
/** Per-command snapshot used in {@link ISurfaceSummary}. */
|
|
5
15
|
export interface ISurfaceCommandView {
|
|
6
16
|
command: string;
|
|
7
17
|
tier: CommandTier;
|
|
8
18
|
source: TierSource;
|
|
9
19
|
detail?: string;
|
|
20
|
+
/** One-line description (catalog ?? declared subverb ?? handler). */
|
|
21
|
+
description: string;
|
|
22
|
+
/** Usage line, when the handler or a declared subverb carries one. */
|
|
23
|
+
usage?: string;
|
|
24
|
+
/** How the command dispatches (trie handler, internal subverb, meta flag). */
|
|
25
|
+
dispatch: CommandDispatchKind;
|
|
26
|
+
/** True when a catalog row documents the command. */
|
|
27
|
+
catalogued: boolean;
|
|
28
|
+
audience: readonly CommandAudience[];
|
|
29
|
+
/** Catalog rows folded in because they only add flags / placeholders. */
|
|
30
|
+
variants: readonly string[];
|
|
10
31
|
/** Whether the command is callable in this project's surface configuration. */
|
|
11
32
|
callable: boolean;
|
|
12
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Whether the command shows in `--full-help`. THE answer — `--full-help`
|
|
35
|
+
* renders exactly the views that say `true` (round 11 §5.1#3).
|
|
36
|
+
*/
|
|
13
37
|
visibleInHelp: boolean;
|
|
14
|
-
/** True if `surface.hidden[]`
|
|
38
|
+
/** True if a `surface.hidden[]` selector names the command. */
|
|
15
39
|
hidden: boolean;
|
|
16
|
-
/** True if `surface.enabled[]`
|
|
40
|
+
/** True if a `surface.enabled[]` selector names the command. */
|
|
17
41
|
enabled: boolean;
|
|
42
|
+
/** True if a `surface.disabled[]` selector DENIES the command (source `disabled`). */
|
|
43
|
+
disabled: boolean;
|
|
44
|
+
/** The deny selector and its layer, when `disabled`. */
|
|
45
|
+
deniedBy?: ISurfaceDenial;
|
|
18
46
|
/** Pack contribution source, if any. */
|
|
19
47
|
pack?: string;
|
|
20
48
|
}
|
|
@@ -22,13 +50,21 @@ export interface ISurfaceTotals {
|
|
|
22
50
|
core: number;
|
|
23
51
|
extended: number;
|
|
24
52
|
experimental: number;
|
|
25
|
-
/**
|
|
53
|
+
/** Rows visible in `--full-help` (core + extended visibleInHelp). */
|
|
26
54
|
visible: number;
|
|
27
|
-
/**
|
|
55
|
+
/** Every callable row (core + extended + enabled experimental). */
|
|
28
56
|
callable: number;
|
|
57
|
+
/** Dispatchable rows no catalog row documents (`commands doctor` warns on each). */
|
|
58
|
+
uncatalogued: number;
|
|
29
59
|
}
|
|
30
60
|
export interface ISurfaceSummary {
|
|
31
61
|
schema: typeof SURFACE_SUMMARY_SCHEMA;
|
|
62
|
+
/**
|
|
63
|
+
* True when the rows are the dispatch table (built from the command
|
|
64
|
+
* registry). False only for a registry-less engine call, where the rows are
|
|
65
|
+
* the catalog relabelled — a partial inventory, and said so.
|
|
66
|
+
*/
|
|
67
|
+
registryBacked: boolean;
|
|
32
68
|
tiers: {
|
|
33
69
|
core: readonly ISurfaceCommandView[];
|
|
34
70
|
extended: readonly ISurfaceCommandView[];
|
|
@@ -37,29 +73,36 @@ export interface ISurfaceSummary {
|
|
|
37
73
|
totals: ISurfaceTotals;
|
|
38
74
|
/**
|
|
39
75
|
* Warnings — e.g. a `surface.enabled` entry that doesn't match any
|
|
40
|
-
*
|
|
76
|
+
* command, or an attempt to hide or disable a core command.
|
|
41
77
|
*/
|
|
42
78
|
warnings: readonly ISurfaceWarning[];
|
|
43
|
-
/** Stable hash of (
|
|
79
|
+
/** Stable hash of (index + context). Used in test snapshots. */
|
|
44
80
|
hash: string;
|
|
45
81
|
}
|
|
46
82
|
export interface ISurfaceWarning {
|
|
47
83
|
command: string;
|
|
48
|
-
code: 'unknown-command' | 'cannot-hide-core' | 'cannot-disable-core' | 'enable-noop' | 'tier-override-conflict';
|
|
84
|
+
code: 'unknown-command' | 'cannot-hide-core' | 'cannot-disable-core' | 'enable-noop' | 'enable-disable-conflict' | 'tier-override-conflict';
|
|
49
85
|
message: string;
|
|
50
86
|
}
|
|
51
87
|
/**
|
|
52
88
|
* Build the canonical surface summary used by `shrk surface list`
|
|
53
|
-
* (text + JSON), the `--about` landing,
|
|
54
|
-
* and the MCP gating layer.
|
|
89
|
+
* (text + JSON), the `--about` landing, `--help` / `--full-help`, the CLI
|
|
90
|
+
* surface gate and the MCP gating layer.
|
|
91
|
+
*
|
|
92
|
+
* `index` defaults to the ACTIVE command index (the registry this CLI run
|
|
93
|
+
* dispatches from). Outside `runCli` it falls back to the catalog, relabelled
|
|
94
|
+
* (`registryBacked: false`).
|
|
55
95
|
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
|
|
96
|
+
* Deterministic: same context + index → same summary, byte-for-byte. The
|
|
97
|
+
* `hash` field is the SHA-256 prefix of the canonical JSON form (sans the
|
|
98
|
+
* hash itself) — useful for cache keys and snapshot tests.
|
|
99
|
+
*/
|
|
100
|
+
export declare function buildSurfaceSummary(context: ITierResolverContext, index?: ICommandIndex): ISurfaceSummary;
|
|
101
|
+
/**
|
|
102
|
+
* Look up a single command's view from a summary. Accepts the command path,
|
|
103
|
+
* a folded flag variant (`architecture violations --changed-only`) or an alias
|
|
104
|
+
* spelling — the shapes callers (the surface gate, MCP `cliCommand`) hold.
|
|
60
105
|
*/
|
|
61
|
-
export declare function buildSurfaceSummary(context: ITierResolverContext): ISurfaceSummary;
|
|
62
|
-
/** Look up a single command's tier resolution from a summary. */
|
|
63
106
|
export declare function findCommandInSummary(summary: ISurfaceSummary, command: string): ISurfaceCommandView | undefined;
|
|
64
107
|
/** Resolve a single tier given a context (no summary needed). */
|
|
65
108
|
export declare function resolveTierForCommand(entry: ICommandCatalogEntry, context: ITierResolverContext): ITierResolution;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface-summary.d.ts","sourceRoot":"","sources":["../../src/surface/surface-summary.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EAGX,KAAK,oBAAoB,EAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,
|
|
1
|
+
{"version":3,"file":"surface-summary.d.ts","sourceRoot":"","sources":["../../src/surface/surface-summary.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,WAAW,EAGX,KAAK,oBAAoB,EAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAOL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC1B,MAAM,WAAW,CAAC;AAEnB;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,0BAA0B,CAAC;AAE9D,4DAA4D;AAC5D,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qEAAqE;IACrE,WAAW,EAAE,MAAM,CAAC;IACpB,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,qDAAqD;IACrD,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,SAAS,eAAe,EAAE,CAAC;IACrC,yEAAyE;IACzE,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,+EAA+E;IAC/E,QAAQ,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB,+DAA+D;IAC/D,MAAM,EAAE,OAAO,CAAC;IAChB,gEAAgE;IAChE,OAAO,EAAE,OAAO,CAAC;IACjB,sFAAsF;IACtF,QAAQ,EAAE,OAAO,CAAC;IAClB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,OAAO,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,OAAO,sBAAsB,CAAC;IACtC;;;;OAIG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB,KAAK,EAAE;QACL,IAAI,EAAE,SAAS,mBAAmB,EAAE,CAAC;QACrC,QAAQ,EAAE,SAAS,mBAAmB,EAAE,CAAC;QACzC,YAAY,EAAE,SAAS,mBAAmB,EAAE,CAAC;KAC9C,CAAC;IACF,MAAM,EAAE,cAAc,CAAC;IACvB;;;OAGG;IACH,QAAQ,EAAE,SAAS,eAAe,EAAE,CAAC;IACrC,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EACA,iBAAiB,GACjB,kBAAkB,GAClB,qBAAqB,GACrB,aAAa,GACb,yBAAyB,GACzB,wBAAwB,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;CACjB;AAKD;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,oBAAoB,EAC7B,KAAK,GAAE,aAA8D,GACpE,eAAe,CAoFjB;AA+ID;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,eAAe,EACxB,OAAO,EAAE,MAAM,GACd,mBAAmB,GAAG,SAAS,CAUjC;AAED,iEAAiE;AACjE,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,oBAAoB,EAC3B,OAAO,EAAE,oBAAoB,GAC5B,eAAe,CAEjB"}
|
|
@@ -1,45 +1,68 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { CommandAudience, CommandTier, defaultShowInHelp, isExplainFamily, } from "../commands/command-catalog.js";
|
|
3
|
+
import { CommandDispatchKind } from "./command-dispatch-kind.js";
|
|
4
|
+
import { buildCommandIndex, cleanCommandPath, getActiveCommandIndex } from "./command-index.js";
|
|
5
|
+
import { SurfaceLayer } from "./surface-layer.js";
|
|
6
|
+
import { firstMatchingSelector, matchesSurfaceSelector } from "./surface-selector.js";
|
|
7
|
+
import { BOOTSTRAP_COMMANDS, isBootstrapFamily, isCallable, isVisibleInDefaultHelp, resolveTier, resolveTierForPath, TierSource, } from "./tier.js";
|
|
8
|
+
/**
|
|
9
|
+
* v2 (round 11): the summary iterates the COMMAND INDEX — every dispatchable
|
|
10
|
+
* verb, subverb and meta flag — instead of the catalog, and each row carries
|
|
11
|
+
* its real description, usage, dispatch kind, audience and folded flag
|
|
12
|
+
* variants. v1 listed catalog rows only (75 registered verbs were missing) and
|
|
13
|
+
* printed one placeholder sentence for every extended row.
|
|
14
|
+
*/
|
|
15
|
+
export const SURFACE_SUMMARY_SCHEMA = 'sharkcraft.surface.v2';
|
|
16
|
+
/** The `surface{}` lists every selector warning is checked against, in report order. */
|
|
17
|
+
const SELECTOR_FIELDS = ['enabled', 'hidden', 'disabled'];
|
|
5
18
|
/**
|
|
6
19
|
* Build the canonical surface summary used by `shrk surface list`
|
|
7
|
-
* (text + JSON), the `--about` landing,
|
|
8
|
-
* and the MCP gating layer.
|
|
20
|
+
* (text + JSON), the `--about` landing, `--help` / `--full-help`, the CLI
|
|
21
|
+
* surface gate and the MCP gating layer.
|
|
9
22
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
23
|
+
* `index` defaults to the ACTIVE command index (the registry this CLI run
|
|
24
|
+
* dispatches from). Outside `runCli` it falls back to the catalog, relabelled
|
|
25
|
+
* (`registryBacked: false`).
|
|
26
|
+
*
|
|
27
|
+
* Deterministic: same context + index → same summary, byte-for-byte. The
|
|
28
|
+
* `hash` field is the SHA-256 prefix of the canonical JSON form (sans the
|
|
29
|
+
* hash itself) — useful for cache keys and snapshot tests.
|
|
14
30
|
*/
|
|
15
|
-
export function buildSurfaceSummary(context) {
|
|
31
|
+
export function buildSurfaceSummary(context, index = getActiveCommandIndex() ?? buildCommandIndex()) {
|
|
16
32
|
const core = [];
|
|
17
33
|
const extended = [];
|
|
18
34
|
const experimental = [];
|
|
19
35
|
const warnings = [];
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const view = makeCommandView(entry, context, hiddenSet, enabledSet, warnings);
|
|
36
|
+
// Every spelling a selector may name: paths, alias spellings, flag variants.
|
|
37
|
+
const knownNames = [...BOOTSTRAP_COMMANDS];
|
|
38
|
+
for (const entry of index.entries) {
|
|
39
|
+
knownNames.push(entry.path, ...entry.variants, ...entry.aliases);
|
|
40
|
+
const view = makeCommandView(entry, context, warnings);
|
|
26
41
|
pushIntoBucket(view, core, extended, experimental);
|
|
27
42
|
}
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
|
|
43
|
+
// Bootstrap names the index does not list (defensive: every bootstrap
|
|
44
|
+
// command is a registered handler or a meta flag today).
|
|
45
|
+
const indexed = new Set(knownNames);
|
|
31
46
|
for (const bootstrap of BOOTSTRAP_COMMANDS) {
|
|
32
|
-
if (
|
|
47
|
+
if (index.entries.some((e) => e.path === bootstrap || e.aliases.includes(bootstrap)))
|
|
48
|
+
continue;
|
|
49
|
+
if (!indexed.has(bootstrap))
|
|
33
50
|
continue;
|
|
34
51
|
core.push({
|
|
35
52
|
command: bootstrap,
|
|
36
53
|
tier: CommandTier.Core,
|
|
37
54
|
source: TierSource.Bootstrap,
|
|
38
55
|
detail: 'bootstrap meta-flag',
|
|
56
|
+
description: 'Bootstrap meta flag.',
|
|
57
|
+
dispatch: CommandDispatchKind.Meta,
|
|
58
|
+
catalogued: false,
|
|
59
|
+
audience: [CommandAudience.Human],
|
|
60
|
+
variants: [],
|
|
39
61
|
callable: true,
|
|
40
62
|
visibleInHelp: true,
|
|
41
63
|
hidden: false,
|
|
42
64
|
enabled: false,
|
|
65
|
+
disabled: false,
|
|
43
66
|
});
|
|
44
67
|
}
|
|
45
68
|
// Sort each bucket alphabetically for stable output.
|
|
@@ -47,36 +70,32 @@ export function buildSurfaceSummary(context) {
|
|
|
47
70
|
core.sort(sortByName);
|
|
48
71
|
extended.sort(sortByName);
|
|
49
72
|
experimental.sort(sortByName);
|
|
50
|
-
//
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if (!knownCommands.has(name) && !BOOTSTRAP_COMMANDS.includes(name)) {
|
|
62
|
-
warnings.push({
|
|
63
|
-
command: name,
|
|
64
|
-
code: 'unknown-command',
|
|
65
|
-
message: `surface.hidden[] references unknown command: ${name}`,
|
|
66
|
-
});
|
|
73
|
+
// A selector that names nothing is a silent no-op — say so. Group selectors
|
|
74
|
+
// (`bundle *`) go through the same matcher the resolver uses.
|
|
75
|
+
for (const field of SELECTOR_FIELDS) {
|
|
76
|
+
for (const selector of new Set(context.surfaceConfig?.[field] ?? [])) {
|
|
77
|
+
if (!knownNames.some((name) => matchesSurfaceSelector(selector, name))) {
|
|
78
|
+
warnings.push({
|
|
79
|
+
command: selector,
|
|
80
|
+
code: 'unknown-command',
|
|
81
|
+
message: `surface.${field}[] references unknown command: ${selector}`,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
67
84
|
}
|
|
68
85
|
}
|
|
86
|
+
const all = [...core, ...extended, ...experimental];
|
|
69
87
|
const totals = {
|
|
70
88
|
core: core.length,
|
|
71
89
|
extended: extended.length,
|
|
72
90
|
experimental: experimental.length,
|
|
73
91
|
visible: core.length + extended.filter((c) => c.visibleInHelp).length,
|
|
74
|
-
callable:
|
|
75
|
-
|
|
76
|
-
|
|
92
|
+
callable: all.filter((c) => c.callable).length,
|
|
93
|
+
uncatalogued: all.filter((c) => !c.catalogued && c.dispatch !== CommandDispatchKind.Meta)
|
|
94
|
+
.length,
|
|
77
95
|
};
|
|
78
96
|
const summaryWithoutHash = {
|
|
79
97
|
schema: SURFACE_SUMMARY_SCHEMA,
|
|
98
|
+
registryBacked: index.registryBacked,
|
|
80
99
|
tiers: { core, extended, experimental },
|
|
81
100
|
totals,
|
|
82
101
|
warnings,
|
|
@@ -87,56 +106,115 @@ export function buildSurfaceSummary(context) {
|
|
|
87
106
|
.slice(0, 16);
|
|
88
107
|
return { ...summaryWithoutHash, hash };
|
|
89
108
|
}
|
|
90
|
-
function makeCommandView(entry, context,
|
|
91
|
-
const
|
|
92
|
-
const
|
|
93
|
-
const
|
|
109
|
+
function makeCommandView(entry, context, warnings) {
|
|
110
|
+
const name = entry.path;
|
|
111
|
+
const names = [name, ...entry.aliases];
|
|
112
|
+
const catalogRow = entry.catalogEntry;
|
|
113
|
+
const resolution = entry.dispatch === CommandDispatchKind.Meta
|
|
114
|
+
? { tier: CommandTier.Core, source: TierSource.Bootstrap, detail: 'bootstrap meta-flag' }
|
|
115
|
+
: resolveTierForPath(name, catalogRow, context, entry.aliases);
|
|
116
|
+
const isHidden = firstMatchingSelector(context.surfaceConfig?.hidden, names) !== undefined;
|
|
117
|
+
const isEnabled = firstMatchingSelector(context.surfaceConfig?.enabled, names) !== undefined;
|
|
118
|
+
const denySelector = firstMatchingSelector(context.surfaceConfig?.disabled, names);
|
|
94
119
|
// Cross-check the config against the derived tier.
|
|
95
120
|
if (resolution.tier === CommandTier.Core) {
|
|
96
121
|
if (isHidden) {
|
|
97
122
|
warnings.push({
|
|
98
|
-
command:
|
|
123
|
+
command: name,
|
|
99
124
|
code: 'cannot-hide-core',
|
|
100
|
-
message: `Cannot hide core command: ${
|
|
125
|
+
message: `Cannot hide core command: ${name}. Remove from surface.hidden.`,
|
|
101
126
|
});
|
|
102
127
|
}
|
|
103
128
|
if (isEnabled) {
|
|
104
129
|
// Enabling a core command is harmless but pointless.
|
|
105
130
|
warnings.push({
|
|
106
|
-
command:
|
|
131
|
+
command: name,
|
|
107
132
|
code: 'enable-noop',
|
|
108
|
-
message: `Enabling a core command is a no-op: ${
|
|
133
|
+
message: `Enabling a core command is a no-op: ${name}`,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
// A deny that could not apply: a core command, or a bootstrap command's
|
|
138
|
+
// subverb (the verbs that undo a deny must stay reachable).
|
|
139
|
+
if (denySelector !== undefined &&
|
|
140
|
+
resolution.source !== TierSource.Disabled &&
|
|
141
|
+
(resolution.tier === CommandTier.Core || isBootstrapFamily(name))) {
|
|
142
|
+
warnings.push({
|
|
143
|
+
command: name,
|
|
144
|
+
code: 'cannot-disable-core',
|
|
145
|
+
message: `Cannot disable core command: ${name} (surface.disabled '${denySelector}'). It stays callable.`,
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
// A config deny and a config enable naming the same command: the deny wins.
|
|
149
|
+
if (resolution.deniedBy?.origin === SurfaceLayer.Config) {
|
|
150
|
+
const explicit = context.explicitSurface ?? context.surfaceConfig;
|
|
151
|
+
if (firstMatchingSelector(explicit?.enabled, names) !== undefined) {
|
|
152
|
+
warnings.push({
|
|
153
|
+
command: name,
|
|
154
|
+
code: 'enable-disable-conflict',
|
|
155
|
+
message: `surface.disabled ('${resolution.deniedBy.selector}') and surface.enabled both name ${name} — disabled wins.`,
|
|
109
156
|
});
|
|
110
157
|
}
|
|
111
158
|
}
|
|
112
159
|
// Cross-check explicit override against the resolver. If the catalog
|
|
113
160
|
// says Experimental but the resolver promoted to Core (spine /
|
|
114
161
|
// bootstrap), surface a warning so the override is corrected.
|
|
115
|
-
if (
|
|
116
|
-
|
|
117
|
-
resolution.source !== TierSource.Override
|
|
162
|
+
if (catalogRow?.tier !== undefined &&
|
|
163
|
+
catalogRow.tier !== resolution.tier &&
|
|
164
|
+
resolution.source !== TierSource.Override &&
|
|
165
|
+
resolution.source !== TierSource.Disabled &&
|
|
166
|
+
resolution.source !== TierSource.ToolMaintenance) {
|
|
118
167
|
warnings.push({
|
|
119
|
-
command:
|
|
168
|
+
command: name,
|
|
120
169
|
code: 'tier-override-conflict',
|
|
121
|
-
message: `Catalog declares tier=${
|
|
170
|
+
message: `Catalog declares tier=${catalogRow.tier} but mechanical derivation resolved to ${resolution.tier} (${resolution.source}). Remove the override.`,
|
|
122
171
|
});
|
|
123
172
|
}
|
|
124
173
|
const view = {
|
|
125
|
-
command:
|
|
174
|
+
command: name,
|
|
126
175
|
tier: resolution.tier,
|
|
127
176
|
source: resolution.source,
|
|
177
|
+
description: entry.description,
|
|
178
|
+
...(entry.usage ? { usage: entry.usage } : {}),
|
|
179
|
+
dispatch: entry.dispatch,
|
|
180
|
+
catalogued: entry.catalogued,
|
|
181
|
+
audience: entry.audience,
|
|
182
|
+
variants: entry.variants,
|
|
128
183
|
callable: isCallable(resolution),
|
|
129
|
-
visibleInHelp:
|
|
184
|
+
visibleInHelp: visibleInHelp(entry, catalogRow, resolution, isHidden),
|
|
130
185
|
hidden: isHidden,
|
|
131
186
|
enabled: isEnabled,
|
|
187
|
+
disabled: resolution.source === TierSource.Disabled,
|
|
132
188
|
};
|
|
189
|
+
if (resolution.deniedBy)
|
|
190
|
+
view.deniedBy = resolution.deniedBy;
|
|
133
191
|
if (resolution.detail)
|
|
134
192
|
view.detail = resolution.detail;
|
|
135
|
-
const pack = context.packContributions.get(
|
|
193
|
+
const pack = context.packContributions.get(name);
|
|
136
194
|
if (pack)
|
|
137
195
|
view.pack = pack;
|
|
138
196
|
return view;
|
|
139
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* THE `--help` visibility rule. `--full-help` lists exactly the views this
|
|
200
|
+
* returns `true` for: the rent-paying catalog surface (`defaultShowInHelp`)
|
|
201
|
+
* plus the explain / dry-run family `--full-help` lists in its own section —
|
|
202
|
+
* both subject to the tier (experimental is never listed) and to
|
|
203
|
+
* `surface.hidden`. Help used to decide from the catalog alone, so
|
|
204
|
+
* `surface.hidden` / profiles / gating never reached it and `surface explain`
|
|
205
|
+
* disagreed with the actual help output.
|
|
206
|
+
*/
|
|
207
|
+
function visibleInHelp(entry, catalogRow, resolution, isHidden) {
|
|
208
|
+
if (entry.dispatch === CommandDispatchKind.Meta)
|
|
209
|
+
return true;
|
|
210
|
+
// Help listings are catalog-curated: an uncatalogued command runs, but has
|
|
211
|
+
// no row for `--help` to surface.
|
|
212
|
+
if (!catalogRow)
|
|
213
|
+
return false;
|
|
214
|
+
if (!isVisibleInDefaultHelp(resolution, isHidden))
|
|
215
|
+
return false;
|
|
216
|
+
return defaultShowInHelp(catalogRow) || isExplainFamily(catalogRow);
|
|
217
|
+
}
|
|
140
218
|
function pushIntoBucket(view, core, extended, experimental) {
|
|
141
219
|
switch (view.tier) {
|
|
142
220
|
case CommandTier.Core:
|
|
@@ -150,11 +228,20 @@ function pushIntoBucket(view, core, extended, experimental) {
|
|
|
150
228
|
break;
|
|
151
229
|
}
|
|
152
230
|
}
|
|
153
|
-
/**
|
|
231
|
+
/**
|
|
232
|
+
* Look up a single command's view from a summary. Accepts the command path,
|
|
233
|
+
* a folded flag variant (`architecture violations --changed-only`) or an alias
|
|
234
|
+
* spelling — the shapes callers (the surface gate, MCP `cliCommand`) hold.
|
|
235
|
+
*/
|
|
154
236
|
export function findCommandInSummary(summary, command) {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
237
|
+
const views = [...summary.tiers.core, ...summary.tiers.extended, ...summary.tiers.experimental];
|
|
238
|
+
const want = command.trim();
|
|
239
|
+
const exact = views.find((c) => c.command === want);
|
|
240
|
+
if (exact)
|
|
241
|
+
return exact;
|
|
242
|
+
const clean = cleanCommandPath(want);
|
|
243
|
+
return ((clean.length > 0 ? views.find((c) => c.command === clean) : undefined) ??
|
|
244
|
+
views.find((c) => c.variants.includes(want)));
|
|
158
245
|
}
|
|
159
246
|
/** Resolve a single tier given a context (no summary needed). */
|
|
160
247
|
export function resolveTierForCommand(entry, context) {
|