@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/json-schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCrB,CAAC;AAEX,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwClB,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CpB,CAAC;AAEX,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmD3B,CAAC;AAEX,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"json-schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/json-schemas.ts"],"names":[],"mappings":"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"}
|
|
@@ -198,7 +198,79 @@ export const KnowledgeEntrySchema = {
|
|
|
198
198
|
appliesWhen: { type: 'array', items: { type: 'string' } },
|
|
199
199
|
content: { type: 'string' },
|
|
200
200
|
summary: { type: 'string' },
|
|
201
|
+
// Cross-reference ids (resolved by `shrk self-config doctor`).
|
|
202
|
+
related: { type: 'array', items: { type: 'string' } },
|
|
203
|
+
// Ids of any registered kind a reader should also look at.
|
|
204
|
+
seeAlso: { type: 'array', items: { type: 'string' } },
|
|
205
|
+
// Knowledge ids that replace this entry — non-empty means superseded.
|
|
206
|
+
supersededBy: { type: 'array', items: { type: 'string' } },
|
|
201
207
|
actionHints: { $ref: 'action-hints.json' },
|
|
208
|
+
references: {
|
|
209
|
+
type: 'array',
|
|
210
|
+
items: {
|
|
211
|
+
type: 'object',
|
|
212
|
+
required: ['kind'],
|
|
213
|
+
properties: {
|
|
214
|
+
kind: {
|
|
215
|
+
enum: [
|
|
216
|
+
'file',
|
|
217
|
+
'directory',
|
|
218
|
+
'symbol',
|
|
219
|
+
'command',
|
|
220
|
+
'template',
|
|
221
|
+
'playbook',
|
|
222
|
+
'construct',
|
|
223
|
+
'helper',
|
|
224
|
+
'policy',
|
|
225
|
+
'boundary-rule',
|
|
226
|
+
'path-convention',
|
|
227
|
+
'package',
|
|
228
|
+
'url',
|
|
229
|
+
],
|
|
230
|
+
},
|
|
231
|
+
path: { type: 'string' },
|
|
232
|
+
// `Name`, or `Owner.member` for a class / interface / enum / object member.
|
|
233
|
+
symbol: { type: 'string' },
|
|
234
|
+
id: { type: 'string' },
|
|
235
|
+
command: { type: 'string' },
|
|
236
|
+
required: { type: 'boolean' },
|
|
237
|
+
note: { type: 'string' },
|
|
238
|
+
// Content assertions (file / symbol references): a literal, a regex.
|
|
239
|
+
contains: { type: 'string', minLength: 1 },
|
|
240
|
+
matches: { type: 'string', minLength: 1 },
|
|
241
|
+
scan: { enum: ['all', 'code', 'strings', 'comments', 'code-and-templates'] },
|
|
242
|
+
// A number the entry claims, re-derived by the extraction DSL.
|
|
243
|
+
count: {
|
|
244
|
+
type: 'object',
|
|
245
|
+
required: ['source', 'expected'],
|
|
246
|
+
properties: {
|
|
247
|
+
source: { type: 'object' },
|
|
248
|
+
expected: { type: 'integer', minimum: 0 },
|
|
249
|
+
measure: { enum: ['ids', 'sites'] },
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
anchors: {
|
|
256
|
+
type: 'array',
|
|
257
|
+
items: {
|
|
258
|
+
type: 'object',
|
|
259
|
+
required: ['id', 'kind'],
|
|
260
|
+
properties: {
|
|
261
|
+
id: { type: 'string' },
|
|
262
|
+
kind: {
|
|
263
|
+
enum: ['file', 'symbol', 'command', 'construct', 'template', 'helper', 'playbook', 'policy'],
|
|
264
|
+
},
|
|
265
|
+
path: { type: 'string' },
|
|
266
|
+
symbol: { type: 'string' },
|
|
267
|
+
targetId: { type: 'string' },
|
|
268
|
+
description: { type: 'string' },
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
// The day an author last checked the entry against the code.
|
|
273
|
+
verifiedOn: { type: 'string', pattern: '^\\d{4}-\\d{2}-\\d{2}$' },
|
|
202
274
|
},
|
|
203
275
|
};
|
|
204
276
|
export const AdoptionStateSchema = {
|
|
@@ -488,7 +560,27 @@ export const ScaffoldPatternSchema = {
|
|
|
488
560
|
id: { type: 'string' },
|
|
489
561
|
title: { type: 'string' },
|
|
490
562
|
description: { type: 'string' },
|
|
491
|
-
|
|
563
|
+
// Round 13: an entry is a glob, or `{ pattern, expectEmpty: true, reason? }`
|
|
564
|
+
// — a path the pattern names before any file lives there (docs/intended-empty.md).
|
|
565
|
+
matchPaths: {
|
|
566
|
+
type: 'array',
|
|
567
|
+
minItems: 1,
|
|
568
|
+
items: {
|
|
569
|
+
oneOf: [
|
|
570
|
+
{ type: 'string' },
|
|
571
|
+
{
|
|
572
|
+
type: 'object',
|
|
573
|
+
required: ['pattern', 'expectEmpty'],
|
|
574
|
+
additionalProperties: false,
|
|
575
|
+
properties: {
|
|
576
|
+
pattern: { type: 'string', minLength: 1 },
|
|
577
|
+
expectEmpty: { const: true },
|
|
578
|
+
reason: { type: 'string', minLength: 1 },
|
|
579
|
+
},
|
|
580
|
+
},
|
|
581
|
+
],
|
|
582
|
+
},
|
|
583
|
+
},
|
|
492
584
|
excludePaths: { type: 'array', items: { type: 'string' } },
|
|
493
585
|
templateId: { type: 'string' },
|
|
494
586
|
variables: {
|
|
@@ -541,7 +633,9 @@ export const QualityReportSchema = {
|
|
|
541
633
|
type: 'object',
|
|
542
634
|
required: ['overall', 'gates', 'score'],
|
|
543
635
|
properties: {
|
|
544
|
-
|
|
636
|
+
// `not-verified`: no blocking gate failed, but a gate could not run,
|
|
637
|
+
// examined nothing while required, or examined only part of its scope.
|
|
638
|
+
overall: { enum: ['pass', 'warn', 'fail', 'not-verified'] },
|
|
545
639
|
blockers: { type: 'integer' },
|
|
546
640
|
warnings: { type: 'integer' },
|
|
547
641
|
score: { type: 'integer' },
|
|
@@ -550,6 +644,8 @@ export const QualityReportSchema = {
|
|
|
550
644
|
note: { type: 'string' },
|
|
551
645
|
nextCommand: { type: 'string' },
|
|
552
646
|
nextRecommendations: { type: 'array', items: { type: 'string' } },
|
|
647
|
+
coverage: { type: 'object' },
|
|
648
|
+
shortfalls: { type: 'array', items: { type: 'string' } },
|
|
553
649
|
},
|
|
554
650
|
};
|
|
555
651
|
export const SafetyAuditSchema = {
|
|
@@ -762,6 +858,13 @@ export const AreaMapSchema = {
|
|
|
762
858
|
projectRoot: { type: 'string' },
|
|
763
859
|
areas: { type: 'array' },
|
|
764
860
|
unclassifiedFiles: { type: 'integer' },
|
|
861
|
+
totalFiles: { type: 'integer' },
|
|
862
|
+
classifiedFiles: { type: 'integer' },
|
|
863
|
+
classificationRate: { type: 'number', minimum: 0, maximum: 1 },
|
|
864
|
+
minClassificationRate: { type: 'number', minimum: 0, maximum: 1 },
|
|
865
|
+
degraded: { type: 'boolean' },
|
|
866
|
+
unclassifiedSample: { type: 'array', items: { type: 'string' } },
|
|
867
|
+
patternSource: { enum: ['built-in', 'config', 'config+built-in'] },
|
|
765
868
|
},
|
|
766
869
|
};
|
|
767
870
|
export const ImpactAnalysisSchema = {
|
|
@@ -776,6 +879,14 @@ export const ImpactAnalysisSchema = {
|
|
|
776
879
|
risk: { type: 'string' },
|
|
777
880
|
affectedFiles: { type: 'array' },
|
|
778
881
|
affectedAreas: { type: 'array' },
|
|
882
|
+
areaCoverage: {
|
|
883
|
+
type: 'object',
|
|
884
|
+
properties: {
|
|
885
|
+
classificationRate: { type: 'number', minimum: 0, maximum: 1 },
|
|
886
|
+
degraded: { type: 'boolean' },
|
|
887
|
+
unclassifiedTargets: { type: 'array', items: { type: 'string' } },
|
|
888
|
+
},
|
|
889
|
+
},
|
|
779
890
|
},
|
|
780
891
|
};
|
|
781
892
|
export const TestImpactSchema = {
|
package/dist/shrk.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shrk.d.ts","sourceRoot":"","sources":["../src/shrk.ts"],"names":[],"mappings":""}
|
package/dist/shrk.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* This package's bin (round 13, 13.2): a bootstrap that loads `./main.ts`
|
|
4
|
+
* (emitted as `dist/main.js`) through a dynamic import, so a load failure of
|
|
5
|
+
* the entry's STATIC module graph reaches a handler at all. One case is
|
|
6
|
+
* rewritten — a workspace dependency of the installed tool that is not linked
|
|
7
|
+
* (Node's raw `ERR_MODULE_NOT_FOUND: Cannot find package '@shrkcrft/x'`
|
|
8
|
+
* resolver stack) — into one line naming the dependency, the package that
|
|
9
|
+
* needs it and where to run the install, exit 70 (EX_SOFTWARE: the tool's own
|
|
10
|
+
* install is broken; docs/exit-codes.md). Every other error is rethrown
|
|
11
|
+
* untouched: the same message, source line and exit code as running
|
|
12
|
+
* `dist/main.js` directly.
|
|
13
|
+
*
|
|
14
|
+
* node: builtins only, through the sibling ./bootstrap module — never an
|
|
15
|
+
* `@shrkcrft` import: that package's link could be the missing one. The CLI
|
|
16
|
+
* (`shrk`) and the MCP server (`shrk-mcp`) carry byte-identical copies of this
|
|
17
|
+
* file and of ./bootstrap/unlinked-workspace-dependency.ts;
|
|
18
|
+
* r77-bootstrap-rewrite.test.ts locks them together.
|
|
19
|
+
*/
|
|
20
|
+
import { unlinkedWorkspaceDependencyMessage } from "./bootstrap/unlinked-workspace-dependency.js";
|
|
21
|
+
try {
|
|
22
|
+
await import("./main.js");
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
const message = unlinkedWorkspaceDependencyMessage(error);
|
|
26
|
+
if (message === undefined)
|
|
27
|
+
throw error;
|
|
28
|
+
// Exit only once the line is flushed: stderr is asynchronous on a pipe.
|
|
29
|
+
process.stderr.write(`${message}\n`, () => process.exit(70));
|
|
30
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ICommandRecommendationReport } from '@shrkcrft/inspector';
|
|
2
|
+
import { type buildSurfaceSummary, type ISurfaceCommandView } from './surface-summary.js';
|
|
3
|
+
type SurfaceSummary = ReturnType<typeof buildSurfaceSummary>;
|
|
4
|
+
/**
|
|
5
|
+
* The surface view a recommended command string names: its first one or two
|
|
6
|
+
* command words after an optional `$` / `bun run` / `shrk` (the full path
|
|
7
|
+
* first, then the top-level token).
|
|
8
|
+
*/
|
|
9
|
+
export declare function surfaceViewForCommand(rawCommand: string, summary: SurfaceSummary): ISurfaceCommandView | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* A command that maintains SharkCraft itself, asked about outside SharkCraft's
|
|
12
|
+
* own repository: gated by AUDIENCE (exit 78), so it is no recommendation here
|
|
13
|
+
* at all — not "experimental, not enabled", and never an `Enable:` hint.
|
|
14
|
+
* Read off THE surface view (`source` is `tool-maintenance` only outside the
|
|
15
|
+
* tool repo), never a second host check.
|
|
16
|
+
*/
|
|
17
|
+
export declare function notApplicableHere(command: string, summary: SurfaceSummary): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* THE audience filter over a recommender report, for every surface that prints
|
|
20
|
+
* one (`shrk recommend`, `shrk context`'s "Top commands"): the rows, the ranked
|
|
21
|
+
* list and the uncertainty block's suggested commands lose every command that
|
|
22
|
+
* does not apply here, and `nextCommand` is re-picked by THE rule.
|
|
23
|
+
*/
|
|
24
|
+
export declare function dropNotApplicable(report: ICommandRecommendationReport, summary: SurfaceSummary): ICommandRecommendationReport;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=audience-applicability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audience-applicability.d.ts","sourceRoot":"","sources":["../../src/surface/audience-applicability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAwB,KAAK,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAGhH,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE7D;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,mBAAmB,GAAG,SAAS,CAgBlH;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAGnF;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,4BAA4B,EAAE,OAAO,EAAE,cAAc,GAAG,4BAA4B,CAU7H"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { pickNextCommand } from '@shrkcrft/inspector';
|
|
2
|
+
import { findCommandInSummary } from "./surface-summary.js";
|
|
3
|
+
import { TierSource } from "./tier.js";
|
|
4
|
+
/**
|
|
5
|
+
* The surface view a recommended command string names: its first one or two
|
|
6
|
+
* command words after an optional `$` / `bun run` / `shrk` (the full path
|
|
7
|
+
* first, then the top-level token).
|
|
8
|
+
*/
|
|
9
|
+
export function surfaceViewForCommand(rawCommand, summary) {
|
|
10
|
+
const tokens = rawCommand.trim().split(/\s+/).filter(Boolean);
|
|
11
|
+
if (tokens.length === 0)
|
|
12
|
+
return undefined;
|
|
13
|
+
let i = 0;
|
|
14
|
+
if (tokens[i] === '$')
|
|
15
|
+
i += 1;
|
|
16
|
+
if (tokens[i] === 'bun' && tokens[i + 1] === 'run')
|
|
17
|
+
i += 2;
|
|
18
|
+
if (tokens[i] === 'shrk')
|
|
19
|
+
i += 1;
|
|
20
|
+
const verbTokens = [];
|
|
21
|
+
for (let j = i; j < tokens.length; j += 1) {
|
|
22
|
+
const t = tokens[j];
|
|
23
|
+
if (t.startsWith('-') || t.startsWith('<') || t.startsWith('"'))
|
|
24
|
+
break;
|
|
25
|
+
verbTokens.push(t);
|
|
26
|
+
if (verbTokens.length >= 2)
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
if (verbTokens.length === 0)
|
|
30
|
+
return undefined;
|
|
31
|
+
return findCommandInSummary(summary, verbTokens.join(' ')) ?? findCommandInSummary(summary, verbTokens[0]);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A command that maintains SharkCraft itself, asked about outside SharkCraft's
|
|
35
|
+
* own repository: gated by AUDIENCE (exit 78), so it is no recommendation here
|
|
36
|
+
* at all — not "experimental, not enabled", and never an `Enable:` hint.
|
|
37
|
+
* Read off THE surface view (`source` is `tool-maintenance` only outside the
|
|
38
|
+
* tool repo), never a second host check.
|
|
39
|
+
*/
|
|
40
|
+
export function notApplicableHere(command, summary) {
|
|
41
|
+
const view = surfaceViewForCommand(command, summary);
|
|
42
|
+
return view !== undefined && !view.callable && view.source === TierSource.ToolMaintenance;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* THE audience filter over a recommender report, for every surface that prints
|
|
46
|
+
* one (`shrk recommend`, `shrk context`'s "Top commands"): the rows, the ranked
|
|
47
|
+
* list and the uncertainty block's suggested commands lose every command that
|
|
48
|
+
* does not apply here, and `nextCommand` is re-picked by THE rule.
|
|
49
|
+
*/
|
|
50
|
+
export function dropNotApplicable(report, summary) {
|
|
51
|
+
const applicable = (command) => !notApplicableHere(command, summary);
|
|
52
|
+
const recommendations = report.recommendations.filter((r) => applicable(r.command));
|
|
53
|
+
return {
|
|
54
|
+
...report,
|
|
55
|
+
recommendations,
|
|
56
|
+
ranked: report.ranked.filter((c) => applicable(c.command)),
|
|
57
|
+
uncertainty: { ...report.uncertainty, suggestedCommands: report.uncertainty.suggestedCommands.filter(applicable) },
|
|
58
|
+
nextCommand: pickNextCommand(recommendations, report.confident),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ICommandSafety } from '@shrkcrft/inspector';
|
|
2
|
+
import type { ICommandIndex } from './i-command-index.js';
|
|
3
|
+
/**
|
|
4
|
+
* THE declared safety of a command string, from COMMAND_CATALOG — what the
|
|
5
|
+
* CLI injects into the recommendation ranker (`IRecommendationRankingOptions
|
|
6
|
+
* .safetyOf`), so a recommended command is labelled and withheld by what its
|
|
7
|
+
* catalog row DECLARES, never by a regex guess.
|
|
8
|
+
*
|
|
9
|
+
* The string is resolved through THE command resolver (`resolveCommandString`
|
|
10
|
+
* over the command index). The base row of the matched path applies, plus any
|
|
11
|
+
* flag-variant row whose flags the string carries (`check wiring --fix` over
|
|
12
|
+
* `check wiring`); the most dangerous row wins. `writesSource` is the catalog
|
|
13
|
+
* audit's own predicate: `writesSource || safetyLevel === writes-source`.
|
|
14
|
+
* `undefined` for a string the catalog does not document (the ranker then
|
|
15
|
+
* falls back to the regex).
|
|
16
|
+
*/
|
|
17
|
+
export declare function catalogCommandSafety(raw: string, index?: ICommandIndex): ICommandSafety | undefined;
|
|
18
|
+
//# sourceMappingURL=catalog-command-safety.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-command-safety.d.ts","sourceRoot":"","sources":["../../src/surface/catalog-command-safety.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGnF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAe1D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,aAAa,GAAG,cAAc,GAAG,SAAS,CA8BnG"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { CommandResolutionStatus } from '@shrkcrft/inspector';
|
|
2
|
+
import { COMMAND_CATALOG, SafetyLevel } from "../commands/command-catalog.js";
|
|
3
|
+
import { buildCommandIndex, findCommandIndexEntry, getActiveCommandIndex } from "./command-index.js";
|
|
4
|
+
import { resolveCommandString } from "./resolve-command-string.js";
|
|
5
|
+
/** Most to least dangerous — the most dangerous applicable catalog row wins. */
|
|
6
|
+
const SAFETY_RANK = {
|
|
7
|
+
[SafetyLevel.ReadOnly]: 0,
|
|
8
|
+
[SafetyLevel.WritesSessionOnly]: 1,
|
|
9
|
+
[SafetyLevel.WritesDraftsOnly]: 2,
|
|
10
|
+
[SafetyLevel.RunsShell]: 3,
|
|
11
|
+
[SafetyLevel.WritesSource]: 4,
|
|
12
|
+
};
|
|
13
|
+
let catalogByCommand;
|
|
14
|
+
let fallbackIndex;
|
|
15
|
+
/**
|
|
16
|
+
* THE declared safety of a command string, from COMMAND_CATALOG — what the
|
|
17
|
+
* CLI injects into the recommendation ranker (`IRecommendationRankingOptions
|
|
18
|
+
* .safetyOf`), so a recommended command is labelled and withheld by what its
|
|
19
|
+
* catalog row DECLARES, never by a regex guess.
|
|
20
|
+
*
|
|
21
|
+
* The string is resolved through THE command resolver (`resolveCommandString`
|
|
22
|
+
* over the command index). The base row of the matched path applies, plus any
|
|
23
|
+
* flag-variant row whose flags the string carries (`check wiring --fix` over
|
|
24
|
+
* `check wiring`); the most dangerous row wins. `writesSource` is the catalog
|
|
25
|
+
* audit's own predicate: `writesSource || safetyLevel === writes-source`.
|
|
26
|
+
* `undefined` for a string the catalog does not document (the ranker then
|
|
27
|
+
* falls back to the regex).
|
|
28
|
+
*/
|
|
29
|
+
export function catalogCommandSafety(raw, index) {
|
|
30
|
+
const idx = index ?? getActiveCommandIndex() ?? (fallbackIndex ??= buildCommandIndex());
|
|
31
|
+
const resolution = resolveCommandString(idx, raw);
|
|
32
|
+
if (resolution.matched === undefined ||
|
|
33
|
+
(resolution.status !== CommandResolutionStatus.Ok && resolution.status !== CommandResolutionStatus.PrefixOnly)) {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
const entry = findCommandIndexEntry(idx, resolution.matched);
|
|
37
|
+
if (!entry?.catalogEntry)
|
|
38
|
+
return undefined;
|
|
39
|
+
catalogByCommand ??= new Map(COMMAND_CATALOG.map((e) => [e.command, e]));
|
|
40
|
+
const tokens = new Set(raw.trim().split(/\s+/).map((t) => t.split('=')[0]));
|
|
41
|
+
const rows = [entry.catalogEntry];
|
|
42
|
+
for (const variant of entry.variants) {
|
|
43
|
+
const flags = variant
|
|
44
|
+
.split(/\s+/)
|
|
45
|
+
.slice(entry.tokens.length)
|
|
46
|
+
.filter((t) => t.startsWith('--'));
|
|
47
|
+
if (flags.length === 0 || !flags.every((f) => tokens.has(f)))
|
|
48
|
+
continue;
|
|
49
|
+
const row = catalogByCommand.get(variant);
|
|
50
|
+
if (row)
|
|
51
|
+
rows.push(row);
|
|
52
|
+
}
|
|
53
|
+
let level = entry.catalogEntry.safetyLevel;
|
|
54
|
+
let writesSource = false;
|
|
55
|
+
for (const row of rows) {
|
|
56
|
+
if ((SAFETY_RANK[row.safetyLevel] ?? 0) > (SAFETY_RANK[level] ?? 0))
|
|
57
|
+
level = row.safetyLevel;
|
|
58
|
+
if (row.writesSource === true || row.safetyLevel === SafetyLevel.WritesSource)
|
|
59
|
+
writesSource = true;
|
|
60
|
+
}
|
|
61
|
+
return { safetyLevel: level, writesSource };
|
|
62
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ICommandResolution, type ICommandResolveOptions, type ISharkcraftInspection } from '@shrkcrft/inspector';
|
|
2
|
+
import type { ICommandIndex } from './i-command-index.js';
|
|
3
|
+
import type { ICommandStringContext } from './i-command-string-context.js';
|
|
4
|
+
/** Root package.json script names, or `undefined` when there is none to read. */
|
|
5
|
+
export declare function readPackageScripts(projectRoot: string): ReadonlySet<string> | undefined;
|
|
6
|
+
/** The non-shrk sets the resolver checks against, for `projectRoot`. */
|
|
7
|
+
export declare function loadCommandStringContext(projectRoot: string): Promise<ICommandStringContext>;
|
|
8
|
+
/**
|
|
9
|
+
* A memoised `(raw, options?) => ICommandResolution` over the active command
|
|
10
|
+
* index, or `undefined` outside a CLI run (no index) — the inspector then
|
|
11
|
+
* reports every command reference NOT VERIFIED rather than guessing. The memo
|
|
12
|
+
* keys on the reading too: `doctor` as a command reference and as free shell
|
|
13
|
+
* text are two different questions.
|
|
14
|
+
*/
|
|
15
|
+
export declare function cliCommandResolver(projectRoot: string, index?: ICommandIndex | undefined): Promise<((raw: string, options?: ICommandResolveOptions) => ICommandResolution) | undefined>;
|
|
16
|
+
/**
|
|
17
|
+
* `warmReferenceRegistries` plus the injected command resolver. THE warm call
|
|
18
|
+
* for CLI code: a bare warm leaves every `command` reference Unverifiable.
|
|
19
|
+
*/
|
|
20
|
+
export declare function warmCliReferenceRegistries(inspection: ISharkcraftInspection): Promise<void>;
|
|
21
|
+
//# sourceMappingURL=cli-command-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-command-resolver.d.ts","sourceRoot":"","sources":["../../src/surface/cli-command-resolver.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC3B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAsC3E,iFAAiF;AACjF,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CASvF;AAED,wEAAwE;AACxE,wBAAsB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAQlG;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,MAAM,EACnB,KAAK,GAAE,aAAa,GAAG,SAAmC,GACzD,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,sBAAsB,KAAK,kBAAkB,CAAC,GAAG,SAAS,CAAC,CAY9F;AAED;;;GAGG;AACH,wBAAsB,0BAA0B,CAAC,UAAU,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAGjG"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { warmReferenceRegistries, } from '@shrkcrft/inspector';
|
|
4
|
+
import { getActiveCommandIndex } from "./command-index.js";
|
|
5
|
+
import { resolveCommandString } from "./resolve-command-string.js";
|
|
6
|
+
/**
|
|
7
|
+
* The CLI side of the inspector's command-resolver seam.
|
|
8
|
+
*
|
|
9
|
+
* The inspector cannot import the CLI (layer order), so it answers `command`
|
|
10
|
+
* references through a resolver the CLI injects — built here from the ACTIVE
|
|
11
|
+
* command index (the registry this run dispatches from). Every CLI site that
|
|
12
|
+
* warms the reference registries goes through {@link warmCliReferenceRegistries},
|
|
13
|
+
* so a knowledge reference, a doctor probe and an agent-test expectation are
|
|
14
|
+
* all answered by the same function.
|
|
15
|
+
*/
|
|
16
|
+
let toolNames;
|
|
17
|
+
/** Registered MCP tool names (loaded once per process, lazily). */
|
|
18
|
+
function loadMcpToolNames() {
|
|
19
|
+
toolNames ??= importMcpToolNames();
|
|
20
|
+
return toolNames;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The lazy import behind {@link loadMcpToolNames}; a failed import reads as
|
|
24
|
+
* "no MCP tool names". Written as `await import()` — the `import(…).then(…)`
|
|
25
|
+
* shape is read by `shrk check imports` as an inline type import (an error
|
|
26
|
+
* that fails release preflight).
|
|
27
|
+
*/
|
|
28
|
+
async function importMcpToolNames() {
|
|
29
|
+
let mcp;
|
|
30
|
+
try {
|
|
31
|
+
mcp = await import('@shrkcrft/mcp-server');
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
return new Set(mcp.ALL_TOOLS.map((t) => t.name));
|
|
37
|
+
}
|
|
38
|
+
/** Root package.json script names, or `undefined` when there is none to read. */
|
|
39
|
+
export function readPackageScripts(projectRoot) {
|
|
40
|
+
try {
|
|
41
|
+
const pkg = JSON.parse(readFileSync(join(projectRoot, 'package.json'), 'utf8'));
|
|
42
|
+
return new Set(Object.keys(pkg.scripts ?? {}));
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/** The non-shrk sets the resolver checks against, for `projectRoot`. */
|
|
49
|
+
export async function loadCommandStringContext(projectRoot) {
|
|
50
|
+
const scripts = readPackageScripts(projectRoot);
|
|
51
|
+
const mcpToolNames = await loadMcpToolNames();
|
|
52
|
+
return {
|
|
53
|
+
...(scripts ? { scripts } : {}),
|
|
54
|
+
...(mcpToolNames ? { mcpToolNames } : {}),
|
|
55
|
+
root: projectRoot,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* A memoised `(raw, options?) => ICommandResolution` over the active command
|
|
60
|
+
* index, or `undefined` outside a CLI run (no index) — the inspector then
|
|
61
|
+
* reports every command reference NOT VERIFIED rather than guessing. The memo
|
|
62
|
+
* keys on the reading too: `doctor` as a command reference and as free shell
|
|
63
|
+
* text are two different questions.
|
|
64
|
+
*/
|
|
65
|
+
export async function cliCommandResolver(projectRoot, index = getActiveCommandIndex()) {
|
|
66
|
+
if (!index)
|
|
67
|
+
return undefined;
|
|
68
|
+
const ctx = await loadCommandStringContext(projectRoot);
|
|
69
|
+
const memo = new Map();
|
|
70
|
+
return (raw, options = {}) => {
|
|
71
|
+
const key = [options.assumeShrk === true ? 'ref' : 'sh', raw].join(String.fromCharCode(0));
|
|
72
|
+
const hit = memo.get(key);
|
|
73
|
+
if (hit)
|
|
74
|
+
return hit;
|
|
75
|
+
const resolution = resolveCommandString(index, raw, ctx, options);
|
|
76
|
+
memo.set(key, resolution);
|
|
77
|
+
return resolution;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* `warmReferenceRegistries` plus the injected command resolver. THE warm call
|
|
82
|
+
* for CLI code: a bare warm leaves every `command` reference Unverifiable.
|
|
83
|
+
*/
|
|
84
|
+
export async function warmCliReferenceRegistries(inspection) {
|
|
85
|
+
const commandResolver = await cliCommandResolver(inspection.projectRoot);
|
|
86
|
+
await warmReferenceRegistries(inspection, commandResolver ? { commandResolver } : {});
|
|
87
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a command-index entry is dispatched.
|
|
3
|
+
*
|
|
4
|
+
* - `Trie` — a registered handler path (`CommandRegistry.listAll()`).
|
|
5
|
+
* - `Subverb` — dispatched internally by a parent handler on a positional
|
|
6
|
+
* (`check wiring`, `graph status`): declared on the handler's
|
|
7
|
+
* `subverbs`, or documented by a catalog row under a real
|
|
8
|
+
* handler.
|
|
9
|
+
* - `Meta` — a bootstrap meta flag handled before dispatch (`--about`,
|
|
10
|
+
* `--help`, `--full-help`, `--version`).
|
|
11
|
+
* - `Catalog` — registry-less fallback only: documented by the catalog, but
|
|
12
|
+
* no command registry was available to prove it dispatches.
|
|
13
|
+
*/
|
|
14
|
+
export declare enum CommandDispatchKind {
|
|
15
|
+
Trie = "trie",
|
|
16
|
+
Subverb = "subverb",
|
|
17
|
+
Meta = "meta",
|
|
18
|
+
Catalog = "catalog"
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=command-dispatch-kind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-dispatch-kind.d.ts","sourceRoot":"","sources":["../../src/surface/command-dispatch-kind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,oBAAY,mBAAmB;IAC7B,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,OAAO,YAAY;CACpB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a command-index entry is dispatched.
|
|
3
|
+
*
|
|
4
|
+
* - `Trie` — a registered handler path (`CommandRegistry.listAll()`).
|
|
5
|
+
* - `Subverb` — dispatched internally by a parent handler on a positional
|
|
6
|
+
* (`check wiring`, `graph status`): declared on the handler's
|
|
7
|
+
* `subverbs`, or documented by a catalog row under a real
|
|
8
|
+
* handler.
|
|
9
|
+
* - `Meta` — a bootstrap meta flag handled before dispatch (`--about`,
|
|
10
|
+
* `--help`, `--full-help`, `--version`).
|
|
11
|
+
* - `Catalog` — registry-less fallback only: documented by the catalog, but
|
|
12
|
+
* no command registry was available to prove it dispatches.
|
|
13
|
+
*/
|
|
14
|
+
export var CommandDispatchKind;
|
|
15
|
+
(function (CommandDispatchKind) {
|
|
16
|
+
CommandDispatchKind["Trie"] = "trie";
|
|
17
|
+
CommandDispatchKind["Subverb"] = "subverb";
|
|
18
|
+
CommandDispatchKind["Meta"] = "meta";
|
|
19
|
+
CommandDispatchKind["Catalog"] = "catalog";
|
|
20
|
+
})(CommandDispatchKind || (CommandDispatchKind = {}));
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { CommandAudience, ICommandCatalogEntry } from '../commands/command-catalog.js';
|
|
2
|
+
import type { PositionalMode } from '../dispatch/positional-mode.js';
|
|
3
|
+
import type { CommandDispatchKind } from './command-dispatch-kind.js';
|
|
4
|
+
/**
|
|
5
|
+
* One dispatchable command — a row of the command index.
|
|
6
|
+
*
|
|
7
|
+
* The index is the ONE answer to "does this command exist, what does it do,
|
|
8
|
+
* who is it for": `surface list`, `help`, `commands doctor`, the surface gate
|
|
9
|
+
* and the command-string resolver all read it.
|
|
10
|
+
*/
|
|
11
|
+
export interface ICommandIndexEntry {
|
|
12
|
+
/** Clean command path, space-joined (`knowledge stale-check`, `check wiring`). */
|
|
13
|
+
readonly path: string;
|
|
14
|
+
readonly tokens: readonly string[];
|
|
15
|
+
readonly dispatch: CommandDispatchKind;
|
|
16
|
+
/** Catalog description ?? declared-subverb description ?? handler description. */
|
|
17
|
+
readonly description: string;
|
|
18
|
+
/** Declared-subverb usage ?? handler usage (catalog-only subverbs have none). */
|
|
19
|
+
readonly usage?: string;
|
|
20
|
+
/** True when a COMMAND_CATALOG row documents this path. */
|
|
21
|
+
readonly catalogued: boolean;
|
|
22
|
+
/** The base catalog row (the one whose `command` is exactly the clean path, else the first). */
|
|
23
|
+
readonly catalogEntry?: ICommandCatalogEntry;
|
|
24
|
+
/**
|
|
25
|
+
* Catalog rows folded into this entry because they only add flags or
|
|
26
|
+
* placeholders (`architecture violations --changed-only`, `impact <input>`).
|
|
27
|
+
* Full `command` strings, sorted.
|
|
28
|
+
*/
|
|
29
|
+
readonly variants: readonly string[];
|
|
30
|
+
/** Catalog aliases plus registry alias spellings of this path. */
|
|
31
|
+
readonly aliases: readonly string[];
|
|
32
|
+
readonly audience: readonly CommandAudience[];
|
|
33
|
+
/** For `Subverb`: the handler path that dispatches it. */
|
|
34
|
+
readonly parent?: string;
|
|
35
|
+
/** For `Subverb`: declared on the handler (`subverbs`) rather than only documented by the catalog. */
|
|
36
|
+
readonly declared?: boolean;
|
|
37
|
+
/** What a non-subverb positional[0] means for this command, when declared. */
|
|
38
|
+
readonly positionals?: PositionalMode;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=command-index-entry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-index-entry.d.ts","sourceRoot":"","sources":["../../src/surface/command-index-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAC5F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,kFAAkF;IAClF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IACvC,kFAAkF;IAClF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,iFAAiF;IACjF,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,2DAA2D;IAC3D,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,gGAAgG;IAChG,QAAQ,CAAC,YAAY,CAAC,EAAE,oBAAoB,CAAC;IAC7C;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,kEAAkE;IAClE,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,SAAS,eAAe,EAAE,CAAC;IAC9C,0DAA0D;IAC1D,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,sGAAsG;IACtG,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,8EAA8E;IAC9E,QAAQ,CAAC,WAAW,CAAC,EAAE,cAAc,CAAC;CACvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|