@shrkcrft/inspector 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/acceptance-replay.js +1 -1
- package/dist/agent-contract-templates.js +6 -6
- package/dist/agent-contract.d.ts.map +1 -1
- package/dist/agent-contract.js +13 -8
- package/dist/agent-orchestration.js +2 -2
- package/dist/agent-task-prep.d.ts +16 -0
- package/dist/agent-task-prep.d.ts.map +1 -1
- package/dist/agent-task-prep.js +51 -4
- package/dist/ai-readiness.d.ts.map +1 -1
- package/dist/ai-readiness.js +21 -3
- package/dist/architecture-map.d.ts +16 -0
- package/dist/architecture-map.d.ts.map +1 -1
- package/dist/architecture-map.js +42 -26
- package/dist/area-explore.d.ts +2 -2
- package/dist/area-explore.d.ts.map +1 -1
- package/dist/area-explore.js +36 -16
- package/dist/area-map.d.ts +56 -11
- package/dist/area-map.d.ts.map +1 -1
- package/dist/area-map.js +106 -25
- package/dist/asset-doctor-proposed-exit.d.ts +21 -0
- package/dist/asset-doctor-proposed-exit.d.ts.map +1 -0
- package/dist/asset-doctor-proposed-exit.js +22 -0
- package/dist/asset-provenance.js +1 -1
- package/dist/boundaries-changed-only.d.ts +24 -1
- package/dist/boundaries-changed-only.d.ts.map +1 -1
- package/dist/boundaries-changed-only.js +12 -2
- package/dist/boundary-check-options.model.d.ts +40 -0
- package/dist/boundary-check-options.model.d.ts.map +1 -0
- package/dist/boundary-check-options.model.js +1 -0
- package/dist/boundary-check-result.model.d.ts +89 -0
- package/dist/boundary-check-result.model.d.ts.map +1 -0
- package/dist/boundary-check-result.model.js +1 -0
- package/dist/boundary-configuration-status.d.ts +38 -0
- package/dist/boundary-configuration-status.d.ts.map +1 -0
- package/dist/boundary-configuration-status.js +118 -0
- package/dist/boundary-configuration-status.model.d.ts +37 -0
- package/dist/boundary-configuration-status.model.d.ts.map +1 -0
- package/dist/boundary-configuration-status.model.js +1 -0
- package/dist/boundary-load-issue.model.d.ts +30 -0
- package/dist/boundary-load-issue.model.d.ts.map +1 -0
- package/dist/boundary-load-issue.model.js +1 -0
- package/dist/boundary-rule-check.model.d.ts +44 -0
- package/dist/boundary-rule-check.model.d.ts.map +1 -0
- package/dist/boundary-rule-check.model.js +1 -0
- package/dist/boundary-rule-invalidation.model.d.ts +31 -0
- package/dist/boundary-rule-invalidation.model.d.ts.map +1 -0
- package/dist/boundary-rule-invalidation.model.js +1 -0
- package/dist/boundary-rule-set-diff.model.d.ts +75 -0
- package/dist/boundary-rule-set-diff.model.d.ts.map +1 -0
- package/dist/boundary-rule-set-diff.model.js +1 -0
- package/dist/boundary-rule-sources.d.ts +28 -0
- package/dist/boundary-rule-sources.d.ts.map +1 -0
- package/dist/boundary-rule-sources.js +110 -0
- package/dist/boundary-stale-exception-finding.model.d.ts +12 -0
- package/dist/boundary-stale-exception-finding.model.d.ts.map +1 -0
- package/dist/boundary-stale-exception-finding.model.js +1 -0
- package/dist/boundary-unit-liveness.d.ts +35 -0
- package/dist/boundary-unit-liveness.d.ts.map +1 -0
- package/dist/boundary-unit-liveness.js +71 -0
- package/dist/change-intent.d.ts +3 -0
- package/dist/change-intent.d.ts.map +1 -1
- package/dist/change-intent.js +61 -27
- package/dist/changes-summary.d.ts.map +1 -1
- package/dist/changes-summary.js +19 -9
- package/dist/ci-integrity-report.js +1 -1
- package/dist/ci-predict.d.ts.map +1 -1
- package/dist/ci-predict.js +38 -5
- package/dist/code-intelligence-doctor.d.ts +6 -0
- package/dist/code-intelligence-doctor.d.ts.map +1 -1
- package/dist/code-intelligence-doctor.js +22 -7
- package/dist/command-recommender.d.ts +45 -2
- package/dist/command-recommender.d.ts.map +1 -1
- package/dist/command-recommender.js +41 -263
- package/dist/command-resolution-status.d.ts +44 -0
- package/dist/command-resolution-status.d.ts.map +1 -0
- package/dist/command-resolution-status.js +44 -0
- package/dist/command-safety-level.d.ts +15 -0
- package/dist/command-safety-level.d.ts.map +1 -0
- package/dist/command-safety-level.js +43 -0
- package/dist/command-taxonomy.js +1 -1
- package/dist/compliance-evidence.js +1 -1
- package/dist/compliance-profiles.js +1 -1
- package/dist/construct-registry.d.ts +40 -0
- package/dist/construct-registry.d.ts.map +1 -1
- package/dist/construct-registry.js +186 -82
- package/dist/context-tuning.d.ts +4 -0
- package/dist/context-tuning.d.ts.map +1 -1
- package/dist/context-tuning.js +10 -7
- package/dist/contract-template-registry.d.ts +10 -0
- package/dist/contract-template-registry.d.ts.map +1 -1
- package/dist/contract-template-registry.js +59 -33
- package/dist/contribution-kind.d.ts +52 -0
- package/dist/contribution-kind.d.ts.map +1 -0
- package/dist/contribution-kind.js +52 -0
- package/dist/contribution-load-failures.d.ts +106 -0
- package/dist/contribution-load-failures.d.ts.map +1 -0
- package/dist/contribution-load-failures.js +575 -0
- package/dist/contributions-report.d.ts +28 -0
- package/dist/contributions-report.d.ts.map +1 -0
- package/dist/contributions-report.js +242 -0
- package/dist/convention-registry.d.ts +22 -0
- package/dist/convention-registry.d.ts.map +1 -1
- package/dist/convention-registry.js +79 -39
- package/dist/coverage-report.d.ts.map +1 -1
- package/dist/coverage-report.js +6 -6
- package/dist/custom-checks.d.ts +60 -1
- package/dist/custom-checks.d.ts.map +1 -1
- package/dist/custom-checks.js +159 -6
- package/dist/dashboard/dashboard-data.d.ts +6 -0
- package/dist/dashboard/dashboard-data.d.ts.map +1 -1
- package/dist/dashboard/dashboard-data.js +99 -8
- package/dist/dashboard/dashboard-knowledge.d.ts.map +1 -1
- package/dist/dashboard/dashboard-knowledge.js +14 -2
- package/dist/decision-records.d.ts +20 -0
- package/dist/decision-records.d.ts.map +1 -1
- package/dist/decision-records.js +68 -20
- package/dist/declared-cross-references.d.ts +61 -0
- package/dist/declared-cross-references.d.ts.map +1 -0
- package/dist/declared-cross-references.js +550 -0
- package/dist/declared-gate-plane-rules.d.ts +24 -0
- package/dist/declared-gate-plane-rules.d.ts.map +1 -0
- package/dist/declared-gate-plane-rules.js +39 -0
- package/dist/declared-reference-coverage.d.ts +27 -0
- package/dist/declared-reference-coverage.d.ts.map +1 -0
- package/dist/declared-reference-coverage.js +50 -0
- package/dist/declared-xref-status.d.ts +19 -0
- package/dist/declared-xref-status.d.ts.map +1 -0
- package/dist/declared-xref-status.js +19 -0
- package/dist/delegate-pack-recipes.d.ts +13 -2
- package/dist/delegate-pack-recipes.d.ts.map +1 -1
- package/dist/delegate-pack-recipes.js +45 -14
- package/dist/demo-package.js +2 -2
- package/dist/demo-script.js +2 -2
- package/dist/demo-workflow.js +3 -3
- package/dist/dev-cycle.js +1 -1
- package/dist/dev-session.js +1 -1
- package/dist/doc-references.d.ts +23 -2
- package/dist/doc-references.d.ts.map +1 -1
- package/dist/doc-references.js +96 -17
- package/dist/doctor-result.d.ts +8 -0
- package/dist/doctor-result.d.ts.map +1 -1
- package/dist/doctor-verdict-kind.d.ts +19 -0
- package/dist/doctor-verdict-kind.d.ts.map +1 -0
- package/dist/doctor-verdict-kind.js +19 -0
- package/dist/doctor-verdict.d.ts +18 -0
- package/dist/doctor-verdict.d.ts.map +1 -0
- package/dist/doctor-verdict.js +28 -0
- package/dist/drift.d.ts +17 -0
- package/dist/drift.d.ts.map +1 -1
- package/dist/drift.js +40 -10
- package/dist/entrypoint-matrix.d.ts.map +1 -1
- package/dist/entrypoint-matrix.js +4 -1
- package/dist/feedback-ingestion.d.ts +28 -2
- package/dist/feedback-ingestion.d.ts.map +1 -1
- package/dist/feedback-ingestion.js +68 -19
- package/dist/fix-preview.d.ts.map +1 -1
- package/dist/fix-preview.js +9 -5
- package/dist/framework-extractor-outcomes.d.ts +27 -0
- package/dist/framework-extractor-outcomes.d.ts.map +1 -0
- package/dist/framework-extractor-outcomes.js +83 -0
- package/dist/fuzzy-impact.js +1 -1
- package/dist/healing-plan.d.ts.map +1 -1
- package/dist/healing-plan.js +3 -4
- package/dist/helper-catalog.d.ts +25 -0
- package/dist/helper-catalog.d.ts.map +1 -0
- package/dist/helper-catalog.js +91 -0
- package/dist/helper-registry.d.ts.map +1 -1
- package/dist/helper-registry.js +17 -1
- package/dist/helper-view.d.ts +33 -0
- package/dist/helper-view.d.ts.map +1 -0
- package/dist/helper-view.js +1 -0
- package/dist/i-asset-doctor-flags.d.ts +16 -0
- package/dist/i-asset-doctor-flags.d.ts.map +1 -0
- package/dist/i-asset-doctor-flags.js +1 -0
- package/dist/i-command-resolution.d.ts +22 -0
- package/dist/i-command-resolution.d.ts.map +1 -0
- package/dist/i-command-resolution.js +1 -0
- package/dist/i-command-resolve-options.d.ts +24 -0
- package/dist/i-command-resolve-options.d.ts.map +1 -0
- package/dist/i-command-resolve-options.js +1 -0
- package/dist/i-command-safety.d.ts +13 -0
- package/dist/i-command-safety.d.ts.map +1 -0
- package/dist/i-command-safety.js +1 -0
- package/dist/i-contribution-accepted-entry.d.ts +18 -0
- package/dist/i-contribution-accepted-entry.d.ts.map +1 -0
- package/dist/i-contribution-accepted-entry.js +1 -0
- package/dist/i-contribution-entry-rejection.d.ts +21 -0
- package/dist/i-contribution-entry-rejection.d.ts.map +1 -0
- package/dist/i-contribution-entry-rejection.js +1 -0
- package/dist/i-contribution-file-issue.d.ts +18 -0
- package/dist/i-contribution-file-issue.d.ts.map +1 -0
- package/dist/i-contribution-file-issue.js +1 -0
- package/dist/i-contribution-file-report.d.ts +40 -0
- package/dist/i-contribution-file-report.d.ts.map +1 -0
- package/dist/i-contribution-file-report.js +1 -0
- package/dist/i-contribution-file-validation.d.ts +24 -0
- package/dist/i-contribution-file-validation.d.ts.map +1 -0
- package/dist/i-contribution-file-validation.js +1 -0
- package/dist/i-contributions-report.d.ts +31 -0
- package/dist/i-contributions-report.d.ts.map +1 -0
- package/dist/i-contributions-report.js +1 -0
- package/dist/i-declared-xref-field.d.ts +25 -0
- package/dist/i-declared-xref-field.d.ts.map +1 -0
- package/dist/i-declared-xref-field.js +1 -0
- package/dist/i-declared-xref-issue.d.ts +25 -0
- package/dist/i-declared-xref-issue.d.ts.map +1 -0
- package/dist/i-declared-xref-issue.js +1 -0
- package/dist/i-declared-xref-report.d.ts +48 -0
- package/dist/i-declared-xref-report.d.ts.map +1 -0
- package/dist/i-declared-xref-report.js +1 -0
- package/dist/i-declared-xref-row.d.ts +29 -0
- package/dist/i-declared-xref-row.d.ts.map +1 -0
- package/dist/i-declared-xref-row.js +1 -0
- package/dist/i-doctor-verdict.d.ts +10 -0
- package/dist/i-doctor-verdict.d.ts.map +1 -0
- package/dist/i-doctor-verdict.js +1 -0
- package/dist/i-kind-outcomes.d.ts +13 -0
- package/dist/i-kind-outcomes.d.ts.map +1 -0
- package/dist/i-kind-outcomes.js +1 -0
- package/dist/i-pack-doctor-verdict.d.ts +15 -0
- package/dist/i-pack-doctor-verdict.d.ts.map +1 -0
- package/dist/i-pack-doctor-verdict.js +1 -0
- package/dist/i-probed-id-field.d.ts +17 -0
- package/dist/i-probed-id-field.d.ts.map +1 -0
- package/dist/i-probed-id-field.js +1 -0
- package/dist/i-reference-kind-declaration.d.ts +38 -0
- package/dist/i-reference-kind-declaration.d.ts.map +1 -0
- package/dist/i-reference-kind-declaration.js +1 -0
- package/dist/i-reference-warm-options.d.ts +21 -0
- package/dist/i-reference-warm-options.d.ts.map +1 -0
- package/dist/i-reference-warm-options.js +1 -0
- package/dist/i-registry-outcomes.d.ts +16 -0
- package/dist/i-registry-outcomes.d.ts.map +1 -0
- package/dist/i-registry-outcomes.js +1 -0
- package/dist/i-scaffold-pattern-doctor-report.d.ts +35 -0
- package/dist/i-scaffold-pattern-doctor-report.d.ts.map +1 -0
- package/dist/i-scaffold-pattern-doctor-report.js +1 -0
- package/dist/i-search-tuning-key-probe.d.ts +30 -0
- package/dist/i-search-tuning-key-probe.d.ts.map +1 -0
- package/dist/i-search-tuning-key-probe.js +1 -0
- package/dist/i-search-tuning-lint-issue.d.ts +61 -0
- package/dist/i-search-tuning-lint-issue.d.ts.map +1 -0
- package/dist/i-search-tuning-lint-issue.js +1 -0
- package/dist/i-search-tuning-lint-report.d.ts +38 -0
- package/dist/i-search-tuning-lint-report.d.ts.map +1 -0
- package/dist/i-search-tuning-lint-report.js +1 -0
- package/dist/i-unresolvable-reference-scan.d.ts +14 -0
- package/dist/i-unresolvable-reference-scan.d.ts.map +1 -0
- package/dist/i-unresolvable-reference-scan.js +1 -0
- package/dist/i-unresolvable-reference.d.ts +29 -0
- package/dist/i-unresolvable-reference.d.ts.map +1 -0
- package/dist/i-unresolvable-reference.js +1 -0
- package/dist/i-workspace-profile-payload.d.ts +12 -0
- package/dist/i-workspace-profile-payload.d.ts.map +1 -0
- package/dist/i-workspace-profile-payload.js +1 -0
- package/dist/impact-analysis.d.ts +15 -0
- package/dist/impact-analysis.d.ts.map +1 -1
- package/dist/impact-analysis.js +58 -13
- package/dist/impact-render.d.ts.map +1 -1
- package/dist/impact-render.js +22 -0
- package/dist/import-hygiene.d.ts +35 -1
- package/dist/import-hygiene.d.ts.map +1 -1
- package/dist/import-hygiene.js +107 -13
- package/dist/index.d.ts +141 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +172 -0
- package/dist/inspection-discovery.d.ts +45 -0
- package/dist/inspection-discovery.d.ts.map +1 -0
- package/dist/inspection-discovery.js +70 -0
- package/dist/knowledge-advisory-code.d.ts +17 -0
- package/dist/knowledge-advisory-code.d.ts.map +1 -0
- package/dist/knowledge-advisory-code.js +17 -0
- package/dist/knowledge-aged-entry.d.ts +10 -0
- package/dist/knowledge-aged-entry.d.ts.map +1 -0
- package/dist/knowledge-aged-entry.js +1 -0
- package/dist/knowledge-authoring.d.ts +24 -1
- package/dist/knowledge-authoring.d.ts.map +1 -1
- package/dist/knowledge-authoring.js +46 -7
- package/dist/knowledge-entry-verdict-record.d.ts +22 -0
- package/dist/knowledge-entry-verdict-record.d.ts.map +1 -0
- package/dist/knowledge-entry-verdict-record.js +1 -0
- package/dist/knowledge-entry-verdict.d.ts +17 -0
- package/dist/knowledge-entry-verdict.d.ts.map +1 -0
- package/dist/knowledge-entry-verdict.js +17 -0
- package/dist/knowledge-graph.d.ts +6 -0
- package/dist/knowledge-graph.d.ts.map +1 -1
- package/dist/knowledge-graph.js +18 -7
- package/dist/knowledge-kind-bucket.d.ts +19 -0
- package/dist/knowledge-kind-bucket.d.ts.map +1 -0
- package/dist/knowledge-kind-bucket.js +1 -0
- package/dist/knowledge-load-failure.d.ts +23 -0
- package/dist/knowledge-load-failure.d.ts.map +1 -0
- package/dist/knowledge-load-failure.js +1 -0
- package/dist/knowledge-reference-kind-bucket.d.ts +11 -0
- package/dist/knowledge-reference-kind-bucket.d.ts.map +1 -0
- package/dist/knowledge-reference-kind-bucket.js +1 -0
- package/dist/knowledge-stale-advisory.d.ts +14 -0
- package/dist/knowledge-stale-advisory.d.ts.map +1 -0
- package/dist/knowledge-stale-advisory.js +1 -0
- package/dist/knowledge-stale-coverage.d.ts +19 -0
- package/dist/knowledge-stale-coverage.d.ts.map +1 -0
- package/dist/knowledge-stale-coverage.js +1 -0
- package/dist/knowledge-stale-gate-flags.d.ts +33 -0
- package/dist/knowledge-stale-gate-flags.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-flags.js +1 -0
- package/dist/knowledge-stale-gate-input.d.ts +46 -0
- package/dist/knowledge-stale-gate-input.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-input.js +1 -0
- package/dist/knowledge-stale-gate-result.d.ts +33 -0
- package/dist/knowledge-stale-gate-result.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-result.js +1 -0
- package/dist/knowledge-stale-gate-rule.d.ts +33 -0
- package/dist/knowledge-stale-gate-rule.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-rule.js +1 -0
- package/dist/knowledge-stale-gate-violation.d.ts +13 -0
- package/dist/knowledge-stale-gate-violation.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-violation.js +1 -0
- package/dist/knowledge-stale-gate.d.ts +83 -0
- package/dist/knowledge-stale-gate.d.ts.map +1 -0
- package/dist/knowledge-stale-gate.js +429 -0
- package/dist/knowledge-stale-quality-gate.d.ts +26 -0
- package/dist/knowledge-stale-quality-gate.d.ts.map +1 -0
- package/dist/knowledge-stale-quality-gate.js +110 -0
- package/dist/knowledge-stale.d.ts +122 -9
- package/dist/knowledge-stale.d.ts.map +1 -1
- package/dist/knowledge-stale.js +996 -291
- package/dist/knowledge-unverifiable-reason.d.ts +12 -0
- package/dist/knowledge-unverifiable-reason.d.ts.map +1 -0
- package/dist/knowledge-unverifiable-reason.js +12 -0
- package/dist/loader-diagnostics.d.ts +14 -2
- package/dist/loader-diagnostics.d.ts.map +1 -1
- package/dist/match-terms.d.ts +48 -0
- package/dist/match-terms.d.ts.map +1 -0
- package/dist/match-terms.js +155 -0
- package/dist/migration-profile-registry.d.ts +10 -0
- package/dist/migration-profile-registry.d.ts.map +1 -1
- package/dist/migration-profile-registry.js +57 -34
- package/dist/migration-readiness.d.ts.map +1 -1
- package/dist/migration-readiness.js +1 -3
- package/dist/nearest-id.d.ts +10 -26
- package/dist/nearest-id.d.ts.map +1 -1
- package/dist/nearest-id.js +9 -59
- package/dist/pack-asset-freshness.d.ts +65 -0
- package/dist/pack-asset-freshness.d.ts.map +1 -0
- package/dist/pack-asset-freshness.js +340 -0
- package/dist/pack-author-ux.d.ts +24 -3
- package/dist/pack-author-ux.d.ts.map +1 -1
- package/dist/pack-author-ux.js +87 -93
- package/dist/pack-contributions-inventory.d.ts +79 -39
- package/dist/pack-contributions-inventory.d.ts.map +1 -1
- package/dist/pack-contributions-inventory.js +443 -286
- package/dist/pack-doctor-verdict.d.ts +29 -0
- package/dist/pack-doctor-verdict.d.ts.map +1 -0
- package/dist/pack-doctor-verdict.js +45 -0
- package/dist/pack-doctor.d.ts +74 -1
- package/dist/pack-doctor.d.ts.map +1 -1
- package/dist/pack-doctor.js +281 -1
- package/dist/pack-helper-plan.d.ts +24 -0
- package/dist/pack-helper-plan.d.ts.map +1 -0
- package/dist/pack-helper-plan.js +77 -0
- package/dist/pack-helper-registry.d.ts +14 -0
- package/dist/pack-helper-registry.d.ts.map +1 -1
- package/dist/pack-helper-registry.js +76 -37
- package/dist/pack-manifest-reader.d.ts +8 -0
- package/dist/pack-manifest-reader.d.ts.map +1 -0
- package/dist/pack-manifest-reader.js +79 -0
- package/dist/pack-release-check.d.ts +14 -1
- package/dist/pack-release-check.d.ts.map +1 -1
- package/dist/pack-release-check.js +23 -1
- package/dist/pack-signature-status.d.ts +18 -6
- package/dist/pack-signature-status.d.ts.map +1 -1
- package/dist/pack-signature-status.js +59 -105
- package/dist/pack-test-runner.d.ts +27 -5
- package/dist/pack-test-runner.d.ts.map +1 -1
- package/dist/pack-test-runner.js +91 -35
- package/dist/pack-typecheck.d.ts +8 -0
- package/dist/pack-typecheck.d.ts.map +1 -0
- package/dist/pack-typecheck.js +76 -0
- package/dist/plan-review.d.ts +2 -0
- package/dist/plan-review.d.ts.map +1 -1
- package/dist/plan-review.js +17 -5
- package/dist/plan-simulation.d.ts.map +1 -1
- package/dist/plan-simulation.js +16 -5
- package/dist/playbook-load-issue.d.ts +16 -0
- package/dist/playbook-load-issue.d.ts.map +1 -0
- package/dist/playbook-load-issue.js +1 -0
- package/dist/playbook-registry.d.ts +32 -1
- package/dist/playbook-registry.d.ts.map +1 -1
- package/dist/playbook-registry.js +144 -55
- package/dist/policy-declaration.d.ts +18 -0
- package/dist/policy-declaration.d.ts.map +1 -0
- package/dist/policy-declaration.js +1 -0
- package/dist/policy-engine.d.ts +8 -0
- package/dist/policy-engine.d.ts.map +1 -1
- package/dist/policy-engine.js +26 -9
- package/dist/policy-overrides.d.ts.map +1 -1
- package/dist/policy-overrides.js +4 -4
- package/dist/policy-registry.d.ts +27 -0
- package/dist/policy-registry.d.ts.map +1 -1
- package/dist/policy-registry.js +87 -20
- package/dist/probed-id-fields.d.ts +21 -0
- package/dist/probed-id-fields.d.ts.map +1 -0
- package/dist/probed-id-fields.js +25 -0
- package/dist/probed-id-source.d.ts +11 -0
- package/dist/probed-id-source.d.ts.map +1 -0
- package/dist/probed-id-source.js +11 -0
- package/dist/profile-registry.d.ts +25 -2
- package/dist/profile-registry.d.ts.map +1 -1
- package/dist/profile-registry.js +59 -6
- package/dist/quality-gate-examination.d.ts +15 -0
- package/dist/quality-gate-examination.d.ts.map +1 -0
- package/dist/quality-gate-examination.js +15 -0
- package/dist/quality-gate-row-status.d.ts +19 -0
- package/dist/quality-gate-row-status.d.ts.map +1 -0
- package/dist/quality-gate-row-status.js +28 -0
- package/dist/quality-gate-status.d.ts +16 -0
- package/dist/quality-gate-status.d.ts.map +1 -0
- package/dist/quality-gate-status.js +16 -0
- package/dist/quality-html.d.ts.map +1 -1
- package/dist/quality-html.js +14 -3
- package/dist/quality-report-coverage.d.ts +26 -0
- package/dist/quality-report-coverage.d.ts.map +1 -0
- package/dist/quality-report-coverage.js +48 -0
- package/dist/quality-report.d.ts +28 -1
- package/dist/quality-report.d.ts.map +1 -1
- package/dist/quality-report.js +263 -35
- package/dist/query-intent-kind.d.ts +18 -0
- package/dist/query-intent-kind.d.ts.map +1 -0
- package/dist/query-intent-kind.js +18 -0
- package/dist/query-intent-result.d.ts +23 -0
- package/dist/query-intent-result.d.ts.map +1 -0
- package/dist/query-intent-result.js +1 -0
- package/dist/query-intent.d.ts +18 -0
- package/dist/query-intent.d.ts.map +1 -0
- package/dist/query-intent.js +336 -0
- package/dist/query-resolver.d.ts +18 -0
- package/dist/query-resolver.d.ts.map +1 -1
- package/dist/query-resolver.js +7 -4
- package/dist/ranked-recommendations.d.ts +36 -0
- package/dist/ranked-recommendations.d.ts.map +1 -0
- package/dist/ranked-recommendations.js +1 -0
- package/dist/ranker-explainability.d.ts.map +1 -1
- package/dist/ranker-explainability.js +38 -10
- package/dist/recommend-recipe.d.ts +17 -0
- package/dist/recommend-recipe.d.ts.map +1 -0
- package/dist/recommend-recipe.js +1 -0
- package/dist/recommend-recipes.d.ts +9 -0
- package/dist/recommend-recipes.d.ts.map +1 -0
- package/dist/recommend-recipes.js +106 -0
- package/dist/recommendation-candidate.d.ts +30 -0
- package/dist/recommendation-candidate.d.ts.map +1 -0
- package/dist/recommendation-candidate.js +1 -0
- package/dist/recommendation-confidence.d.ts +27 -0
- package/dist/recommendation-confidence.d.ts.map +1 -0
- package/dist/recommendation-confidence.js +1 -0
- package/dist/recommendation-ranking-options.d.ts +24 -0
- package/dist/recommendation-ranking-options.d.ts.map +1 -0
- package/dist/recommendation-ranking-options.js +1 -0
- package/dist/recommendation-ranking.d.ts +50 -0
- package/dist/recommendation-ranking.d.ts.map +1 -0
- package/dist/recommendation-ranking.js +527 -0
- package/dist/recommendation-source.d.ts +23 -0
- package/dist/recommendation-source.d.ts.map +1 -0
- package/dist/recommendation-source.js +23 -0
- package/dist/recommendation-suppression.d.ts +14 -0
- package/dist/recommendation-suppression.d.ts.map +1 -0
- package/dist/recommendation-suppression.js +14 -0
- package/dist/reference-asset-kind.d.ts +14 -0
- package/dist/reference-asset-kind.d.ts.map +1 -0
- package/dist/reference-asset-kind.js +14 -0
- package/dist/reference-content-check.d.ts +32 -0
- package/dist/reference-content-check.d.ts.map +1 -0
- package/dist/reference-content-check.js +143 -0
- package/dist/reference-failure.d.ts +31 -0
- package/dist/reference-failure.d.ts.map +1 -0
- package/dist/reference-failure.js +31 -0
- package/dist/reference-id-status.d.ts +15 -0
- package/dist/reference-id-status.d.ts.map +1 -0
- package/dist/reference-id-status.js +15 -0
- package/dist/reference-kind-declarations.d.ts +42 -0
- package/dist/reference-kind-declarations.d.ts.map +1 -0
- package/dist/reference-kind-declarations.js +142 -0
- package/dist/reference-lookup.d.ts +6 -0
- package/dist/reference-lookup.d.ts.map +1 -1
- package/dist/reference-lookup.js +13 -5
- package/dist/reference-registry.d.ts +109 -11
- package/dist/reference-registry.d.ts.map +1 -1
- package/dist/reference-registry.js +186 -30
- package/dist/reference-subject.d.ts +20 -0
- package/dist/reference-subject.d.ts.map +1 -0
- package/dist/reference-subject.js +1 -0
- package/dist/registration-hint-discovery-status.d.ts +25 -0
- package/dist/registration-hint-discovery-status.d.ts.map +1 -0
- package/dist/registration-hint-discovery-status.js +25 -0
- package/dist/registration-hint-registry.d.ts +80 -0
- package/dist/registration-hint-registry.d.ts.map +1 -1
- package/dist/registration-hint-registry.js +356 -138
- package/dist/registry-lifecycle.d.ts +200 -19
- package/dist/registry-lifecycle.d.ts.map +1 -1
- package/dist/registry-lifecycle.js +526 -136
- package/dist/release-readiness.d.ts.map +1 -1
- package/dist/release-readiness.js +10 -7
- package/dist/release-smoke.d.ts.map +1 -1
- package/dist/release-smoke.js +11 -7
- package/dist/report-site.d.ts.map +1 -1
- package/dist/report-site.js +25 -7
- package/dist/repository-intelligence.d.ts.map +1 -1
- package/dist/repository-intelligence.js +3 -2
- package/dist/repository-knowledge-model.d.ts.map +1 -1
- package/dist/repository-knowledge-model.js +18 -5
- package/dist/resolve-project-config.d.ts +64 -0
- package/dist/resolve-project-config.d.ts.map +1 -1
- package/dist/resolve-project-config.js +240 -32
- package/dist/reuse/compute-reuse-coverage.d.ts +29 -0
- package/dist/reuse/compute-reuse-coverage.d.ts.map +1 -0
- package/dist/reuse/compute-reuse-coverage.js +198 -0
- package/dist/reuse/rank-reuse-candidates.d.ts +38 -0
- package/dist/reuse/rank-reuse-candidates.d.ts.map +1 -0
- package/dist/reuse/rank-reuse-candidates.js +212 -0
- package/dist/reuse/rank-reuse-options.d.ts +20 -0
- package/dist/reuse/rank-reuse-options.d.ts.map +1 -0
- package/dist/reuse/rank-reuse-options.js +1 -0
- package/dist/reuse/rank-reuse-suggestions.d.ts +15 -0
- package/dist/reuse/rank-reuse-suggestions.d.ts.map +1 -0
- package/dist/reuse/rank-reuse-suggestions.js +31 -0
- package/dist/reuse/resolve-curated-reuse.d.ts +43 -0
- package/dist/reuse/resolve-curated-reuse.d.ts.map +1 -0
- package/dist/reuse/resolve-curated-reuse.js +115 -0
- package/dist/reuse/reuse-candidate.d.ts +29 -0
- package/dist/reuse/reuse-candidate.d.ts.map +1 -0
- package/dist/reuse/reuse-candidate.js +1 -0
- package/dist/reuse/reuse-coverage-report.d.ts +74 -0
- package/dist/reuse/reuse-coverage-report.d.ts.map +1 -0
- package/dist/reuse/reuse-coverage-report.js +1 -0
- package/dist/reuse/reuse-curated-coverage.d.ts +36 -0
- package/dist/reuse/reuse-curated-coverage.d.ts.map +1 -0
- package/dist/reuse/reuse-curated-coverage.js +1 -0
- package/dist/reuse/reuse-curated-resolution.d.ts +36 -0
- package/dist/reuse/reuse-curated-resolution.d.ts.map +1 -0
- package/dist/reuse/reuse-curated-resolution.js +1 -0
- package/dist/reuse/reuse-curated-status.d.ts +21 -0
- package/dist/reuse/reuse-curated-status.d.ts.map +1 -0
- package/dist/reuse/reuse-curated-status.js +21 -0
- package/dist/reuse/reuse-match-detail.d.ts +15 -0
- package/dist/reuse/reuse-match-detail.d.ts.map +1 -0
- package/dist/reuse/reuse-match-detail.js +1 -0
- package/dist/reuse/reuse-ranking.d.ts +37 -0
- package/dist/reuse/reuse-ranking.d.ts.map +1 -0
- package/dist/reuse/reuse-ranking.js +1 -0
- package/dist/reuse/reuse-suggestion.d.ts +19 -0
- package/dist/reuse/reuse-suggestion.d.ts.map +1 -0
- package/dist/reuse/reuse-suggestion.js +1 -0
- package/dist/reuse/reuse-symbol-lookup.d.ts +28 -0
- package/dist/reuse/reuse-symbol-lookup.d.ts.map +1 -0
- package/dist/reuse/reuse-symbol-lookup.js +1 -0
- package/dist/reuse/reuse-tokenize.d.ts +11 -0
- package/dist/reuse/reuse-tokenize.d.ts.map +1 -0
- package/dist/reuse/reuse-tokenize.js +26 -0
- package/dist/reuse/score-reuse-name.d.ts +16 -0
- package/dist/reuse/score-reuse-name.d.ts.map +1 -0
- package/dist/reuse/score-reuse-name.js +35 -0
- package/dist/reuse/score-reuse-primitive.d.ts +33 -0
- package/dist/reuse/score-reuse-primitive.d.ts.map +1 -0
- package/dist/reuse/score-reuse-primitive.js +92 -0
- package/dist/review-packet.d.ts +2 -0
- package/dist/review-packet.d.ts.map +1 -1
- package/dist/review-packet.js +13 -6
- package/dist/role-views.d.ts.map +1 -1
- package/dist/role-views.js +16 -16
- package/dist/routing-recommends-channels.d.ts +24 -0
- package/dist/routing-recommends-channels.d.ts.map +1 -0
- package/dist/routing-recommends-channels.js +19 -0
- package/dist/run-boundary-check.d.ts +118 -0
- package/dist/run-boundary-check.d.ts.map +1 -0
- package/dist/run-boundary-check.js +592 -0
- package/dist/safety-audit.js +1 -1
- package/dist/scaffold-coverage.js +1 -1
- package/dist/scaffold-pattern-doctor-report.d.ts +19 -0
- package/dist/scaffold-pattern-doctor-report.d.ts.map +1 -0
- package/dist/scaffold-pattern-doctor-report.js +54 -0
- package/dist/scaffold-patterns.d.ts +75 -1
- package/dist/scaffold-patterns.d.ts.map +1 -1
- package/dist/scaffold-patterns.js +375 -84
- package/dist/schema-inventory.d.ts.map +1 -1
- package/dist/schema-inventory.js +4 -3
- package/dist/search-document-id.d.ts +52 -0
- package/dist/search-document-id.d.ts.map +1 -0
- package/dist/search-document-id.js +72 -0
- package/dist/search-document-prefix.d.ts +7 -0
- package/dist/search-document-prefix.d.ts.map +1 -0
- package/dist/search-document-prefix.js +1 -0
- package/dist/search-index.d.ts.map +1 -1
- package/dist/search-index.js +20 -23
- package/dist/search-tuning-explain.d.ts +6 -0
- package/dist/search-tuning-explain.d.ts.map +1 -1
- package/dist/search-tuning-explain.js +19 -17
- package/dist/search-tuning-key-probes.d.ts +16 -0
- package/dist/search-tuning-key-probes.d.ts.map +1 -0
- package/dist/search-tuning-key-probes.js +65 -0
- package/dist/search-tuning-key-resolution.d.ts +25 -0
- package/dist/search-tuning-key-resolution.d.ts.map +1 -0
- package/dist/search-tuning-key-resolution.js +1 -0
- package/dist/search-tuning-key-resolver.d.ts +4 -0
- package/dist/search-tuning-key-resolver.d.ts.map +1 -0
- package/dist/search-tuning-key-resolver.js +107 -0
- package/dist/search-tuning-key-status.d.ts +24 -0
- package/dist/search-tuning-key-status.d.ts.map +1 -0
- package/dist/search-tuning-key-status.js +24 -0
- package/dist/search-tuning-lint.d.ts +9 -0
- package/dist/search-tuning-lint.d.ts.map +1 -0
- package/dist/search-tuning-lint.js +468 -0
- package/dist/search-tuning-registry.d.ts +43 -0
- package/dist/search-tuning-registry.d.ts.map +1 -1
- package/dist/search-tuning-registry.js +214 -49
- package/dist/self-audit.d.ts +12 -0
- package/dist/self-audit.d.ts.map +1 -1
- package/dist/self-audit.js +36 -10
- package/dist/self-config-doctor-v2.d.ts +145 -3
- package/dist/self-config-doctor-v2.d.ts.map +1 -1
- package/dist/self-config-doctor-v2.js +1304 -181
- package/dist/self-config-doctor.d.ts +20 -1
- package/dist/self-config-doctor.d.ts.map +1 -1
- package/dist/self-config-doctor.js +53 -280
- package/dist/settled-unit-states.d.ts +9 -0
- package/dist/settled-unit-states.d.ts.map +1 -0
- package/dist/settled-unit-states.js +14 -0
- package/dist/sharkcraft-inspector.d.ts +34 -0
- package/dist/sharkcraft-inspector.d.ts.map +1 -1
- package/dist/sharkcraft-inspector.js +273 -26
- package/dist/spec/spec-evidence.d.ts.map +1 -1
- package/dist/spec/spec-evidence.js +14 -20
- package/dist/split-identifier.d.ts +21 -0
- package/dist/split-identifier.d.ts.map +1 -0
- package/dist/split-identifier.js +27 -0
- package/dist/start-here.d.ts.map +1 -1
- package/dist/start-here.js +1 -2
- package/dist/substitute-placeholders.d.ts +8 -0
- package/dist/substitute-placeholders.d.ts.map +1 -0
- package/dist/substitute-placeholders.js +9 -0
- package/dist/symbol-index.d.ts +33 -0
- package/dist/symbol-index.d.ts.map +1 -1
- package/dist/symbol-index.js +241 -3
- package/dist/symbol-member-entry.d.ts +26 -0
- package/dist/symbol-member-entry.d.ts.map +1 -0
- package/dist/symbol-member-entry.js +1 -0
- package/dist/symbol-member-kind.d.ts +14 -0
- package/dist/symbol-member-kind.d.ts.map +1 -0
- package/dist/symbol-member-kind.js +14 -0
- package/dist/task-packet.d.ts.map +1 -1
- package/dist/task-packet.js +52 -9
- package/dist/task-ranker.d.ts +8 -0
- package/dist/task-ranker.d.ts.map +1 -1
- package/dist/task-ranker.js +25 -13
- package/dist/task-risk.js +1 -1
- package/dist/task-routing-hint-registry.d.ts +20 -1
- package/dist/task-routing-hint-registry.d.ts.map +1 -1
- package/dist/task-routing-hint-registry.js +186 -42
- package/dist/template-drift.d.ts.map +1 -1
- package/dist/template-drift.js +30 -9
- package/dist/template-lint.d.ts.map +1 -1
- package/dist/template-lint.js +160 -2
- package/dist/term-query.d.ts +10 -0
- package/dist/term-query.d.ts.map +1 -0
- package/dist/term-query.js +1 -0
- package/dist/test-definitions.d.ts +6 -3
- package/dist/test-definitions.d.ts.map +1 -1
- package/dist/test-runner.d.ts +95 -10
- package/dist/test-runner.d.ts.map +1 -1
- package/dist/test-runner.js +309 -308
- package/dist/tuning-query-tokens.d.ts +29 -0
- package/dist/tuning-query-tokens.d.ts.map +1 -0
- package/dist/tuning-query-tokens.js +51 -0
- package/dist/typecheck-files.d.ts +36 -0
- package/dist/typecheck-files.d.ts.map +1 -0
- package/dist/typecheck-files.js +158 -0
- package/dist/uncertainty.js +1 -1
- package/dist/universal-search.d.ts.map +1 -1
- package/dist/universal-search.js +5 -3
- package/dist/unregistered-exports.d.ts +19 -0
- package/dist/unregistered-exports.d.ts.map +1 -0
- package/dist/unregistered-exports.js +141 -0
- package/dist/unresolvable-reason.d.ts +11 -0
- package/dist/unresolvable-reason.d.ts.map +1 -0
- package/dist/unresolvable-reason.js +11 -0
- package/dist/upgrade-advisor.d.ts.map +1 -1
- package/dist/upgrade-advisor.js +16 -9
- package/dist/validate-contribution-file.d.ts +4 -0
- package/dist/validate-contribution-file.d.ts.map +1 -0
- package/dist/validate-contribution-file.js +228 -0
- package/dist/why-file.d.ts +3 -0
- package/dist/why-file.d.ts.map +1 -1
- package/dist/why-file.js +7 -3
- package/package.json +17 -17
|
@@ -1,277 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Given an input ("what I want to do" or stderr blob), surface the
|
|
5
|
-
* most relevant commands from the catalog + diagnostics + start-here
|
|
6
|
-
* flow + intent classification. No AI, no embeddings.
|
|
7
|
-
*/
|
|
8
|
-
import { classifyChangeIntent, ChangeIntentKind } from "./change-intent.js";
|
|
9
|
-
import { buildDiagnosticByCode, listDiagnostics } from "./failure-diagnostics.js";
|
|
10
|
-
import { rankAll } from "./task-ranker.js";
|
|
11
|
-
import { buildUncertaintyReport, } from "./uncertainty-report.js";
|
|
1
|
+
import { rankRecommendationCandidates } from "./recommendation-ranking.js";
|
|
2
|
+
import { buildUncertaintyReport } from "./uncertainty-report.js";
|
|
12
3
|
export const COMMAND_RECOMMENDER_SCHEMA = 'sharkcraft.command-recommender/v1';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{ command: 'shrk dev start "<task>"', why: 'Start a tracked dev session.' },
|
|
27
|
-
{ command: 'shrk intent "<task>"', why: 'Classify the change intent first.' },
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
match: /publish|release|tag|alpha|beta/i,
|
|
32
|
-
recommendations: [
|
|
33
|
-
{ command: 'shrk release readiness --strict', why: 'Confirm release gates.' },
|
|
34
|
-
{ command: 'shrk release smoke --scenario all', why: 'Validate the release smoke matrix.' },
|
|
35
|
-
{ command: 'bun run release:preflight', why: 'Run the full preflight.' },
|
|
36
|
-
],
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
match: /pack/i,
|
|
40
|
-
recommendations: [
|
|
41
|
-
{ command: 'shrk packs doctor --release --require-signatures', why: 'Validate discovered packs.' },
|
|
42
|
-
{ command: 'shrk packs compat <pack> --consumer-root .', why: 'Detect helper/symbol-missing issues.' },
|
|
43
|
-
{ command: 'shrk packs quality <path>', why: 'Score pack maturity.' },
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
match: /boundary|architecture|layer/i,
|
|
48
|
-
recommendations: [
|
|
49
|
-
{ command: 'shrk architecture map', why: 'Layered architecture summary.' },
|
|
50
|
-
{ command: 'shrk check boundaries', why: 'Boundary scan.' },
|
|
51
|
-
{ command: 'shrk drift', why: 'Drift report.' },
|
|
52
|
-
],
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
match: /code[-\s]?intel|code intelligence|code graph|graph status|graph health|import cycle|unresolved import|blast radius|callers|dependents|who calls|who uses|where is .*\bused|find usages|usages? of|is .*\bwired|wired (up|to)|wire[ds]? .*\bto\b|path (from|between)|reach(es|able)|connected to|who implements|implementations? of|subclass|subtype|load[-\s]?bearing|\bhubs?\b|most[-\s](depended|imported|referenced)|what.*change carefully|important.*\b(code|files?|symbols?)|what breaks if|what calls|call sites?|trace .*\b(symbol|function|usage)/i,
|
|
56
|
-
recommendations: [
|
|
57
|
-
{ command: 'shrk graph callers <symbol>', why: 'Who calls / references a symbol, as path:line — the grep replacement for "who calls X / where is X used".' },
|
|
58
|
-
{ command: 'shrk graph path <from> <to>', why: 'Is code A actually wired to code B? Shortest import/call/implements path between two files or symbols — the deterministic answer to "is X wired to Y".' },
|
|
59
|
-
{ command: 'shrk graph hubs', why: 'The most-depended-on symbols/files (biggest blast radius) — what to change carefully or understand first when onboarding.' },
|
|
60
|
-
{ command: 'shrk graph context <file-or-symbol>', why: 'Inspect one file or symbol with imports, callers, subtypes/supertypes, bridge context, and framework hits — answers "is X wired".' },
|
|
61
|
-
{ command: 'shrk graph impact <file-or-symbol> --full', why: 'What breaks if you change it: graph-backed dependents, caller files, rules, and likely tests.' },
|
|
62
|
-
{ command: 'shrk code-intel', why: 'One-shot health view across the code graph, bridge, and quality gates.' },
|
|
63
|
-
{ command: 'shrk graph status', why: 'Check whether the code graph is present, fresh, and internally consistent.' },
|
|
64
|
-
{ command: 'shrk graph unresolved', why: 'Find unresolved imports that undercut graph accuracy.' },
|
|
65
|
-
],
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
match: /delegate|mechanical (edit|task|change|refactor)|grunt (work|task)|boilerplate|repetitive edit|hand (this|it|off) (off |over )?to (a |the )?(local |worker|model)|add (a |an )?(barrel )?(export|import)\b|local (llm|model) (do|handle|make)/i,
|
|
69
|
-
recommendations: [
|
|
70
|
-
{ command: 'shrk delegate list', why: 'See the MECHANICAL task recipes a local-LLM worker can handle (the engine verifies the result + auto-reverts on failure). Each is fenced to specific files + op kinds.' },
|
|
71
|
-
{ command: 'shrk delegate run "<task>" --recipe <id> --apply', why: 'Hand a mechanical, deterministically-verifiable edit to the LOCAL worker — you pay for a compact brief + result instead of reading the whole file and writing the edit. The edit lands only if it passes the recipe verification.' },
|
|
72
|
-
{ command: 'shrk delegate explain <id>', why: 'Audit a recipe before trusting it: the allowed ops, guardrail globs, and whether its verification is bound.' },
|
|
73
|
-
],
|
|
74
|
-
},
|
|
75
|
-
];
|
|
76
|
-
function safetyLevelFor(command) {
|
|
77
|
-
if (/^shrk delegate run/i.test(command))
|
|
78
|
-
return 'writes-source';
|
|
79
|
-
if (/^shrk (gen|init|apply|import|presets apply --write|packs (sign|new))/i.test(command))
|
|
80
|
-
return 'writes-source';
|
|
81
|
-
if (/^shrk (onboard|brief|dev start|handoff|export|report site|impact|ci scaffold|simulate|orchestrate)/i.test(command))
|
|
82
|
-
return 'writes-drafts';
|
|
83
|
-
if (/^shrk (session|dev report)/i.test(command))
|
|
84
|
-
return 'writes-session';
|
|
85
|
-
if (/^bun |^npm |^node |^git /i.test(command))
|
|
86
|
-
return 'runs-shell';
|
|
87
|
-
return 'read-only';
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Minimum `rankAll` template score to treat the shared ranker's top template as
|
|
91
|
-
* a strong, intent-confirmed structured match. Real template matches score well
|
|
92
|
-
* into double digits; unrelated templates don't match at all — so this bar
|
|
93
|
-
* cleanly separates a genuine scaffold target from noise. Above it, a keyword
|
|
94
|
-
* recipe that only overlapped a single word no longer gets to headline.
|
|
95
|
-
*/
|
|
96
|
-
const RANKER_TEMPLATE_PROMOTE_THRESHOLD = 6;
|
|
97
|
-
/**
|
|
98
|
-
* Minimum `rankAll` pipeline score to let the matched pipeline lead. Higher than
|
|
99
|
-
* the template bar: a generic catch-all pipeline scores low on noise but high on
|
|
100
|
-
* a real scaffolding task, so the bar excludes that baseline.
|
|
101
|
-
*/
|
|
102
|
-
const RANKER_PIPELINE_PROMOTE_THRESHOLD = 8;
|
|
103
|
-
const SCAFFOLD_VERBS = new Set([
|
|
104
|
-
'create', 'build', 'add', 'generate', 'scaffold', 'implement', 'make', 'new', 'introduce', 'write',
|
|
105
|
-
]);
|
|
106
|
-
/**
|
|
107
|
-
* Does the query read like create/build/scaffold work? Gate for ranker-driven
|
|
108
|
-
* `gen <template>` promotion: a strong template token-overlap on a NON-scaffold
|
|
109
|
-
* verb (e.g. "document the cli-command template") must not be routed to a
|
|
110
|
-
* generator. Mirrors the CLI's `looksLikeCreateBuild` (kept local — the
|
|
111
|
-
* inspector layer cannot import the cli layer).
|
|
112
|
-
*/
|
|
113
|
-
function looksLikeScaffolding(query) {
|
|
114
|
-
const tokens = query
|
|
115
|
-
.toLowerCase()
|
|
116
|
-
.replace(/[^a-z0-9\s]/g, ' ')
|
|
117
|
-
.split(/\s+/)
|
|
118
|
-
.filter((t) => t.length > 0);
|
|
119
|
-
if (tokens.length === 0)
|
|
120
|
-
return false;
|
|
121
|
-
if (SCAFFOLD_VERBS.has(tokens[0]))
|
|
122
|
-
return true;
|
|
123
|
-
for (let i = 1; i < Math.min(4, tokens.length); i++) {
|
|
124
|
-
if (SCAFFOLD_VERBS.has(tokens[i]))
|
|
125
|
-
return true;
|
|
126
|
-
}
|
|
127
|
-
return false;
|
|
4
|
+
/** One report row from a ranked candidate. */
|
|
5
|
+
export function toCommandRecommendation(c) {
|
|
6
|
+
return {
|
|
7
|
+
command: c.command,
|
|
8
|
+
why: c.why,
|
|
9
|
+
safetyLevel: c.safetyLevel,
|
|
10
|
+
...(c.docsLink ? { docsLink: c.docsLink } : {}),
|
|
11
|
+
source: c.source,
|
|
12
|
+
...(c.sourceId !== undefined ? { sourceId: c.sourceId } : {}),
|
|
13
|
+
score: c.normalisedScore,
|
|
14
|
+
weak: c.weak,
|
|
15
|
+
attribution: c.attribution,
|
|
16
|
+
};
|
|
128
17
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
// Recipe matching by query.
|
|
134
|
-
for (const r of RECIPES) {
|
|
135
|
-
if (r.match.test(trimmed)) {
|
|
136
|
-
for (const rec of r.recommendations)
|
|
137
|
-
recommendations.push({ ...rec, safetyLevel: safetyLevelFor(rec.command) });
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
// ── Ranker arbitration ────────────────────────────────────────────────
|
|
141
|
-
// A keyword recipe matches on a single overlapping word (e.g. "release" in
|
|
142
|
-
// "create a cli command for the release tooling"), which would otherwise
|
|
143
|
-
// route a scaffolding intent to unrelated review/release tooling. Consult
|
|
144
|
-
// the SAME shared ranker that `brief`/`task` use: when it confirms a concrete
|
|
145
|
-
// template/pipeline for a create/build query, promote `shrk gen <template>`
|
|
146
|
-
// (or the pipeline packet) to the HEADLINE so the recipe keyword no longer
|
|
147
|
-
// hijacks the route. Mirrors the CLI's R1 routing-hint promotion.
|
|
148
|
-
let promotedRanker;
|
|
149
|
-
if (trimmed.length > 0 && looksLikeScaffolding(trimmed)) {
|
|
150
|
-
try {
|
|
151
|
-
const ranking = rankAll(inspection, trimmed);
|
|
152
|
-
const topTemplate = ranking.templates[0];
|
|
153
|
-
const topPipeline = ranking.pipelines[0];
|
|
154
|
-
if (topTemplate && topTemplate.score >= RANKER_TEMPLATE_PROMOTE_THRESHOLD) {
|
|
155
|
-
promotedRanker = {
|
|
156
|
-
kind: 'template',
|
|
157
|
-
id: topTemplate.item.id,
|
|
158
|
-
label: topTemplate.item.name,
|
|
159
|
-
score: topTemplate.score,
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
else if (topPipeline && topPipeline.score >= RANKER_PIPELINE_PROMOTE_THRESHOLD) {
|
|
163
|
-
promotedRanker = {
|
|
164
|
-
kind: 'pipeline',
|
|
165
|
-
id: topPipeline.item.id,
|
|
166
|
-
label: topPipeline.item.title,
|
|
167
|
-
score: topPipeline.score,
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
catch {
|
|
172
|
-
// The ranker is advisory — fall back to recipe/intent output on failure.
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
if (promotedRanker) {
|
|
176
|
-
const command = promotedRanker.kind === 'template'
|
|
177
|
-
? `shrk gen ${promotedRanker.id} <name> --dry-run`
|
|
178
|
-
: `shrk task "${trimmed.replace(/"/g, '\\"')}"`;
|
|
179
|
-
const why = promotedRanker.kind === 'template'
|
|
180
|
-
? `Ranker matched template "${promotedRanker.label}" (score ${promotedRanker.score}) — the project scaffold for this create/build task, ahead of the keyword recipe.`
|
|
181
|
-
: `Ranker matched pipeline "${promotedRanker.label}" (score ${promotedRanker.score}) — run the full task packet for this create/build task, ahead of the keyword recipe.`;
|
|
182
|
-
// Headline: unshift so it leads; dedup below keeps this first occurrence.
|
|
183
|
-
recommendations.unshift({ command, why, safetyLevel: safetyLevelFor(command) });
|
|
184
|
-
}
|
|
185
|
-
// If a stderr-like input was provided, do a diagnostic-suggest pass.
|
|
186
|
-
if (options.fromError && options.fromError.length > 0) {
|
|
187
|
-
for (const e of listDiagnostics()) {
|
|
188
|
-
const built = buildDiagnosticByCode(e.code, {});
|
|
189
|
-
if (new RegExp(e.code, 'i').test(options.fromError) || new RegExp(built.problem.slice(0, 20), 'i').test(options.fromError)) {
|
|
190
|
-
recommendations.push({
|
|
191
|
-
command: built.nextCommand,
|
|
192
|
-
why: `Diagnostic match: ${e.code}.`,
|
|
193
|
-
safetyLevel: safetyLevelFor(built.nextCommand),
|
|
194
|
-
...(built.docsLink ? { docsLink: built.docsLink } : {}),
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
// Intent-driven fallback.
|
|
200
|
-
if (recommendations.length === 0) {
|
|
201
|
-
const intent = await classifyChangeIntent(trimmed, inspection);
|
|
202
|
-
recommendations.push({
|
|
203
|
-
command: intent.suggestedFirstCommand,
|
|
204
|
-
why: `Intent fallback (${intent.kind}, confidence ${intent.confidence}).`,
|
|
205
|
-
safetyLevel: safetyLevelFor(intent.suggestedFirstCommand),
|
|
206
|
-
});
|
|
207
|
-
if (intent.kind === ChangeIntentKind.Unknown) {
|
|
208
|
-
recommendations.push({ command: 'shrk start-here', why: 'No clear intent — start here.', safetyLevel: 'read-only' });
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
// Dedup by command (keep first).
|
|
212
|
-
const seen = new Set();
|
|
213
|
-
recommendations = recommendations.filter((r) => (seen.has(r.command) ? false : (seen.add(r.command), true)));
|
|
214
|
-
// Top of list = first recommendation.
|
|
215
|
-
const nextCommand = recommendations[0]?.command ?? 'shrk start-here';
|
|
216
|
-
// Build an uncertainty report from the recommendation signals.
|
|
217
|
-
const usedRecipe = RECIPES.some((r) => r.match.test(trimmed));
|
|
218
|
-
let confidence = 'medium';
|
|
219
|
-
const reasons = [];
|
|
220
|
-
const missing = [];
|
|
221
|
-
const conflicting = [];
|
|
222
|
-
const increase = [];
|
|
223
|
-
if (usedRecipe && promotedRanker) {
|
|
224
|
-
// Divergent signals: a keyword recipe fired AND a stronger ranker
|
|
225
|
-
// template/pipeline match was promoted to the headline. Keyword overlap
|
|
226
|
-
// alone is NOT enough for HIGH — emit a medium confidence + review note so
|
|
227
|
-
// the agent confirms the corrected route rather than trusting it blindly.
|
|
228
|
-
confidence = 'medium';
|
|
229
|
-
reasons.push(`Keyword recipe matched "${trimmed}", but the shared ranker found a stronger ${promotedRanker.kind} "${promotedRanker.id}" (score ${promotedRanker.score}) and now headlines it — review which fits.`);
|
|
230
|
-
conflicting.push({
|
|
231
|
-
id: 'conflict-recipe-vs-ranker',
|
|
232
|
-
message: `Recipe keyword overlap competes with ranker ${promotedRanker.kind} "${promotedRanker.id}". The headline was routed to the ranker match; confirm the intended target.`,
|
|
233
|
-
});
|
|
234
|
-
increase.push('Tighten the recipe regex or add a routing hint so the keyword stops overlapping unrelated tooling.');
|
|
235
|
-
warnings.push(`review: recipe keyword overlap was outranked by ranker ${promotedRanker.kind} "${promotedRanker.id}" — headline routed to the scaffold; confirm before applying.`);
|
|
236
|
-
}
|
|
237
|
-
else if (usedRecipe) {
|
|
238
|
-
// Pure-recipe case (no competing ranker match) — HIGH stays appropriate.
|
|
239
|
-
confidence = 'high';
|
|
240
|
-
reasons.push(`Recipe matched the query "${trimmed}".`);
|
|
241
|
-
}
|
|
242
|
-
else if (promotedRanker) {
|
|
243
|
-
// A clean, intent-confirmed structured match with no competing keyword
|
|
244
|
-
// recipe — the ranker is the engine's confident answer.
|
|
245
|
-
confidence = 'high';
|
|
246
|
-
reasons.push(`Shared ranker matched ${promotedRanker.kind} "${promotedRanker.id}" (score ${promotedRanker.score}).`);
|
|
247
|
-
}
|
|
248
|
-
else if (recommendations.length > 0 && recommendations[0]?.why.startsWith('Intent fallback')) {
|
|
249
|
-
confidence = 'low';
|
|
250
|
-
reasons.push('No recipe matched — fell back to intent classification.');
|
|
251
|
-
missing.push({ id: 'no-recipe-match', message: 'No recommender recipe matched the query.' });
|
|
252
|
-
increase.push('Add a routing hint or recommender recipe for this task class.');
|
|
253
|
-
}
|
|
254
|
-
else if (recommendations.length === 0) {
|
|
255
|
-
confidence = 'unknown';
|
|
256
|
-
reasons.push('No recommendations could be produced.');
|
|
257
|
-
}
|
|
18
|
+
/** The report for a ranked list — no re-ranking, no re-derivation. */
|
|
19
|
+
export function recommendationReportFromRanking(ranked, options = {}) {
|
|
20
|
+
const c = ranked.confidence;
|
|
21
|
+
const recommendations = ranked.recommendations.map(toCommandRecommendation);
|
|
258
22
|
const uncertainty = buildUncertaintyReport({
|
|
259
|
-
confidence,
|
|
260
|
-
reasons,
|
|
261
|
-
missingSignals:
|
|
262
|
-
conflictingSignals:
|
|
23
|
+
confidence: c.level,
|
|
24
|
+
reasons: c.reasons,
|
|
25
|
+
missingSignals: c.missingSignals,
|
|
26
|
+
conflictingSignals: c.conflictingSignals,
|
|
263
27
|
suggestedCommands: recommendations.slice(0, 3).map((r) => r.command),
|
|
264
28
|
safeFallbackCommand: 'shrk start-here',
|
|
265
|
-
whatWouldIncreaseConfidence:
|
|
29
|
+
whatWouldIncreaseConfidence: c.whatWouldIncreaseConfidence,
|
|
266
30
|
});
|
|
267
31
|
return {
|
|
268
32
|
schema: COMMAND_RECOMMENDER_SCHEMA,
|
|
269
33
|
generatedAt: new Date().toISOString(),
|
|
270
|
-
query:
|
|
34
|
+
query: ranked.query,
|
|
271
35
|
...(options.role ? { role: options.role } : {}),
|
|
272
36
|
recommendations,
|
|
273
|
-
nextCommand,
|
|
274
|
-
warnings,
|
|
37
|
+
nextCommand: ranked.nextCommand,
|
|
38
|
+
warnings: [...c.warnings],
|
|
275
39
|
uncertainty,
|
|
40
|
+
confident: c.confident,
|
|
41
|
+
verdict: c.verdict,
|
|
42
|
+
floor: c.floor,
|
|
43
|
+
bestScore: c.bestScore,
|
|
44
|
+
...(c.bestSource ? { bestSource: c.bestSource } : {}),
|
|
45
|
+
intent: ranked.intent,
|
|
46
|
+
ranked: ranked.candidates,
|
|
276
47
|
};
|
|
277
48
|
}
|
|
49
|
+
export async function recommendCommands(inspection, query, options = {}) {
|
|
50
|
+
const ranked = await rankRecommendationCandidates(inspection, query, {
|
|
51
|
+
...(options.fromError ? { fromError: options.fromError } : {}),
|
|
52
|
+
...(options.minScore !== undefined ? { minScore: options.minScore } : {}),
|
|
53
|
+
});
|
|
54
|
+
return recommendationReportFromRanking(ranked, options.role ? { role: options.role } : {});
|
|
55
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ONE vocabulary for "does this command string resolve?".
|
|
3
|
+
*
|
|
4
|
+
* The command table lives in the CLI package, above this layer, so the
|
|
5
|
+
* inspector never answers the question itself: the CLI builds its command
|
|
6
|
+
* index and injects a resolver through `warmReferenceRegistries(inspection,
|
|
7
|
+
* { commandResolver })`. The CLI resolver (`resolveCommandString`) returns
|
|
8
|
+
* these same members — there is exactly one definition, here.
|
|
9
|
+
*
|
|
10
|
+
* - `Ok` — the verb chain dispatches (a trie path, a declared or
|
|
11
|
+
* catalog-documented subverb, a meta flag), or
|
|
12
|
+
* `<pm> run <x>` names a real package script, or a bare
|
|
13
|
+
* MCP tool id names a registered tool.
|
|
14
|
+
* - `PrefixOnly` — the verb chain is proven, but the handler dispatches
|
|
15
|
+
* its tail internally and the tail cannot be proven from
|
|
16
|
+
* the trie + catalog (it may be a free positional).
|
|
17
|
+
* Counted, never flagged.
|
|
18
|
+
* - `UnknownVerb` — no registered verb matches the first token.
|
|
19
|
+
* - `UnknownSubverb` — the parent is proven and provably takes no free
|
|
20
|
+
* positional, and the next token is not one of its
|
|
21
|
+
* subverbs (or a path-mode token is verb-shaped and
|
|
22
|
+
* names neither a subverb nor a file).
|
|
23
|
+
* - `UnknownFlag` — the verb chain is proven, but the dispatcher refuses a
|
|
24
|
+
* flag before anything runs (outside a declared set, or
|
|
25
|
+
* named by none of the command's documentation).
|
|
26
|
+
* - `UnknownScript` — `<pm> run <x>` and the root package.json has no `x`.
|
|
27
|
+
* - `UnknownTool` — a bare MCP-tool-shaped id that no tool registers.
|
|
28
|
+
* - `NotShrk` — not a command this engine can check (git, tsc, …).
|
|
29
|
+
* Skipped and counted.
|
|
30
|
+
* - `Unverified` — no resolver was injected (outside the CLI), so the
|
|
31
|
+
* string was NOT checked. Never read as a pass.
|
|
32
|
+
*/
|
|
33
|
+
export declare enum CommandResolutionStatus {
|
|
34
|
+
Ok = "ok",
|
|
35
|
+
PrefixOnly = "prefix-only",
|
|
36
|
+
UnknownVerb = "unknown-verb",
|
|
37
|
+
UnknownSubverb = "unknown-subverb",
|
|
38
|
+
UnknownFlag = "unknown-flag",
|
|
39
|
+
UnknownScript = "unknown-script",
|
|
40
|
+
UnknownTool = "unknown-tool",
|
|
41
|
+
NotShrk = "not-shrk",
|
|
42
|
+
Unverified = "unverified"
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=command-resolution-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-resolution-status.d.ts","sourceRoot":"","sources":["../src/command-resolution-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,oBAAY,uBAAuB;IACjC,EAAE,OAAO;IACT,UAAU,gBAAgB;IAC1B,WAAW,iBAAiB;IAC5B,cAAc,oBAAoB;IAClC,WAAW,iBAAiB;IAC5B,aAAa,mBAAmB;IAChC,WAAW,iBAAiB;IAC5B,OAAO,aAAa;IACpB,UAAU,eAAe;CAC1B"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ONE vocabulary for "does this command string resolve?".
|
|
3
|
+
*
|
|
4
|
+
* The command table lives in the CLI package, above this layer, so the
|
|
5
|
+
* inspector never answers the question itself: the CLI builds its command
|
|
6
|
+
* index and injects a resolver through `warmReferenceRegistries(inspection,
|
|
7
|
+
* { commandResolver })`. The CLI resolver (`resolveCommandString`) returns
|
|
8
|
+
* these same members — there is exactly one definition, here.
|
|
9
|
+
*
|
|
10
|
+
* - `Ok` — the verb chain dispatches (a trie path, a declared or
|
|
11
|
+
* catalog-documented subverb, a meta flag), or
|
|
12
|
+
* `<pm> run <x>` names a real package script, or a bare
|
|
13
|
+
* MCP tool id names a registered tool.
|
|
14
|
+
* - `PrefixOnly` — the verb chain is proven, but the handler dispatches
|
|
15
|
+
* its tail internally and the tail cannot be proven from
|
|
16
|
+
* the trie + catalog (it may be a free positional).
|
|
17
|
+
* Counted, never flagged.
|
|
18
|
+
* - `UnknownVerb` — no registered verb matches the first token.
|
|
19
|
+
* - `UnknownSubverb` — the parent is proven and provably takes no free
|
|
20
|
+
* positional, and the next token is not one of its
|
|
21
|
+
* subverbs (or a path-mode token is verb-shaped and
|
|
22
|
+
* names neither a subverb nor a file).
|
|
23
|
+
* - `UnknownFlag` — the verb chain is proven, but the dispatcher refuses a
|
|
24
|
+
* flag before anything runs (outside a declared set, or
|
|
25
|
+
* named by none of the command's documentation).
|
|
26
|
+
* - `UnknownScript` — `<pm> run <x>` and the root package.json has no `x`.
|
|
27
|
+
* - `UnknownTool` — a bare MCP-tool-shaped id that no tool registers.
|
|
28
|
+
* - `NotShrk` — not a command this engine can check (git, tsc, …).
|
|
29
|
+
* Skipped and counted.
|
|
30
|
+
* - `Unverified` — no resolver was injected (outside the CLI), so the
|
|
31
|
+
* string was NOT checked. Never read as a pass.
|
|
32
|
+
*/
|
|
33
|
+
export var CommandResolutionStatus;
|
|
34
|
+
(function (CommandResolutionStatus) {
|
|
35
|
+
CommandResolutionStatus["Ok"] = "ok";
|
|
36
|
+
CommandResolutionStatus["PrefixOnly"] = "prefix-only";
|
|
37
|
+
CommandResolutionStatus["UnknownVerb"] = "unknown-verb";
|
|
38
|
+
CommandResolutionStatus["UnknownSubverb"] = "unknown-subverb";
|
|
39
|
+
CommandResolutionStatus["UnknownFlag"] = "unknown-flag";
|
|
40
|
+
CommandResolutionStatus["UnknownScript"] = "unknown-script";
|
|
41
|
+
CommandResolutionStatus["UnknownTool"] = "unknown-tool";
|
|
42
|
+
CommandResolutionStatus["NotShrk"] = "not-shrk";
|
|
43
|
+
CommandResolutionStatus["Unverified"] = "unverified";
|
|
44
|
+
})(CommandResolutionStatus || (CommandResolutionStatus = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The FALLBACK safety classification of a recommended command — for a surface
|
|
3
|
+
* with no command catalog (MCP `recommend_commands`, which cannot import the
|
|
4
|
+
* CLI) and for uncatalogued / free-text strings. The CLI injects the catalog's
|
|
5
|
+
* DECLARED per-command safety into the ranker (`safetyOf`, see
|
|
6
|
+
* `IRecommendationRankingOptions`), which wins over this regex; a lock
|
|
7
|
+
* (r75-safety-one-authority) holds this regex equal to the catalog on every
|
|
8
|
+
* row the catalog's own audit counts as writing source, so the not-confident
|
|
9
|
+
* withhold gate reads the same answer on both surfaces.
|
|
10
|
+
*
|
|
11
|
+
* A `shrk` invocation behind a package-manager prefix is classified by the
|
|
12
|
+
* `shrk` verb, never as a shell command.
|
|
13
|
+
*/
|
|
14
|
+
export declare function commandSafetyLevel(command: string): 'read-only' | 'writes-drafts' | 'writes-session' | 'writes-source' | 'runs-shell';
|
|
15
|
+
//# sourceMappingURL=command-safety-level.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-safety-level.d.ts","sourceRoot":"","sources":["../src/command-safety-level.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,GACd,WAAW,GAAG,eAAe,GAAG,gBAAgB,GAAG,eAAe,GAAG,YAAY,CA2BnF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The FALLBACK safety classification of a recommended command — for a surface
|
|
3
|
+
* with no command catalog (MCP `recommend_commands`, which cannot import the
|
|
4
|
+
* CLI) and for uncatalogued / free-text strings. The CLI injects the catalog's
|
|
5
|
+
* DECLARED per-command safety into the ranker (`safetyOf`, see
|
|
6
|
+
* `IRecommendationRankingOptions`), which wins over this regex; a lock
|
|
7
|
+
* (r75-safety-one-authority) holds this regex equal to the catalog on every
|
|
8
|
+
* row the catalog's own audit counts as writing source, so the not-confident
|
|
9
|
+
* withhold gate reads the same answer on both surfaces.
|
|
10
|
+
*
|
|
11
|
+
* A `shrk` invocation behind a package-manager prefix is classified by the
|
|
12
|
+
* `shrk` verb, never as a shell command.
|
|
13
|
+
*/
|
|
14
|
+
export function commandSafetyLevel(command) {
|
|
15
|
+
const c = command
|
|
16
|
+
.trim()
|
|
17
|
+
.replace(/^\$\s+/, '')
|
|
18
|
+
.replace(/^(?:bun run|bun x|bunx|npx|pnpm exec|pnpm|yarn)\s+(?=shrk\b)/i, '');
|
|
19
|
+
if (/^shrk delegate(?:\s|$)/i.test(c))
|
|
20
|
+
return 'writes-source';
|
|
21
|
+
if (/^shrk (?:gen|init|apply|import|migrate|spike|presets apply --write|packs (?:sign|new)|(?:baseline|generated) update)(?:\s|$)/i.test(c)) {
|
|
22
|
+
return 'writes-source';
|
|
23
|
+
}
|
|
24
|
+
// `surface` and its config-mutating verbs write sharkcraft.config.ts; `surface
|
|
25
|
+
// list` / `explain` / `profiles` read.
|
|
26
|
+
if (/^shrk surface(?:\s+(?:enable|disable|hide|unhide|deny|allow|reset)(?:\s|$)|\s*$)/i.test(c))
|
|
27
|
+
return 'writes-source';
|
|
28
|
+
// `check wiring --fix` edits sink files; plain `check wiring` reads.
|
|
29
|
+
if (/^shrk check wiring\b.*\s--fix(?:\s|=|$)/i.test(c))
|
|
30
|
+
return 'writes-source';
|
|
31
|
+
// The base GitHub workflow scaffold writes source; its `--with-*` variants
|
|
32
|
+
// are declared drafts-only (the catalog rows), which the rule below keeps.
|
|
33
|
+
if (/^shrk ci scaffold github-actions(?:\s|$)/i.test(c) && !/\s--with-/i.test(c))
|
|
34
|
+
return 'writes-source';
|
|
35
|
+
if (/^shrk (?:onboard|brief|dev start|handoff|export|report site|impact|ci scaffold|simulate|orchestrate|spec)\b/i.test(c)) {
|
|
36
|
+
return 'writes-drafts';
|
|
37
|
+
}
|
|
38
|
+
if (/^shrk (?:session|dev report)\b/i.test(c))
|
|
39
|
+
return 'writes-session';
|
|
40
|
+
if (/^(?:bun|bunx|npm|npx|pnpm|yarn|node|git|nx) /i.test(c))
|
|
41
|
+
return 'runs-shell';
|
|
42
|
+
return 'read-only';
|
|
43
|
+
}
|
package/dist/command-taxonomy.js
CHANGED
|
@@ -74,7 +74,7 @@ const GROUP_DEFS = [
|
|
|
74
74
|
title: 'Diagnostics and troubleshooting',
|
|
75
75
|
description: 'self audit, diagnostics, upgrade.',
|
|
76
76
|
match: /^(self audit|diagnostics|upgrade|api)/,
|
|
77
|
-
primary: ['self audit', 'diagnostics
|
|
77
|
+
primary: ['self audit', 'diagnostics list', 'upgrade check'],
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
id: 'advanced',
|
|
@@ -173,7 +173,7 @@ export function previewComplianceEvidencePacket(profileId) {
|
|
|
173
173
|
'(if present) release-smoke.json',
|
|
174
174
|
'(if present) self-audit.json',
|
|
175
175
|
],
|
|
176
|
-
nextCommand:
|
|
176
|
+
nextCommand: 'shrk release readiness --report',
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
179
|
export function verifyComplianceEvidencePacket(targetPathOrDir) {
|
|
@@ -83,7 +83,7 @@ export async function runComplianceCheck(inspection, profileId) {
|
|
|
83
83
|
profileId,
|
|
84
84
|
ruleId: 'unknown-profile',
|
|
85
85
|
severity: 'error',
|
|
86
|
-
message: `Compliance profile "${profileId}" not found.
|
|
86
|
+
message: `Compliance profile "${profileId}" not found. Known profiles: ${listComplianceProfiles().map((p) => p.id).join(', ')}.`,
|
|
87
87
|
},
|
|
88
88
|
],
|
|
89
89
|
summary: { errors: 1, warnings: 0, info: 0 },
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { IConstructFacetInput, IConstructFacetValue, IConstructInput } from '@shrkcrft/plugin-api';
|
|
2
2
|
import type { ISharkcraftInspection } from './sharkcraft-inspector.js';
|
|
3
|
+
import { type IRejectedEntry } from '@shrkcrft/core';
|
|
4
|
+
import type { IContributionFileIssue } from './i-contribution-file-issue.js';
|
|
3
5
|
export declare const CONSTRUCT_REGISTRY_SCHEMA = "sharkcraft.construct-registry/v1";
|
|
4
6
|
export interface IConstruct extends IConstructInput {
|
|
5
7
|
source: 'local' | 'pack';
|
|
@@ -8,6 +10,44 @@ export interface IConstruct extends IConstructInput {
|
|
|
8
10
|
}
|
|
9
11
|
export interface IConstructFacet extends IConstructFacetInput {
|
|
10
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* THE construct acceptance predicate (round 12, 12.1 / 12.1d): a non-empty
|
|
15
|
+
* string `id` and a string `type` — `[]` means accepted. An id-less construct
|
|
16
|
+
* used to be dropped silently, and one without `type` was ACCEPTED and then
|
|
17
|
+
* crashed `constructs list` (`c.type.padEnd`).
|
|
18
|
+
*/
|
|
19
|
+
export declare function constructRejectionReasons(raw: unknown): readonly string[];
|
|
20
|
+
/**
|
|
21
|
+
* THE construct-facet SHAPE predicate: `id`, `constructId`, `kind`, `value`,
|
|
22
|
+
* each a string — `[]` means the shape is accepted. (A well-shaped facet whose
|
|
23
|
+
* `constructId` names no loaded construct is refused at fold time.)
|
|
24
|
+
*/
|
|
25
|
+
export declare function constructFacetRejectionReasons(raw: unknown): readonly string[];
|
|
26
|
+
/**
|
|
27
|
+
* Load every local and pack construct (and fold loose facets into them), with
|
|
28
|
+
* what did not take effect: files that failed to import (they used to be
|
|
29
|
+
* swallowed — `catch { /* ignore *\/ }` — so a broken `constructs.ts` read as a
|
|
30
|
+
* smaller registry), and every declared construct / facet the loader refused
|
|
31
|
+
* (round 12, 12.1).
|
|
32
|
+
*/
|
|
33
|
+
export declare function loadConstructsWithIssues(inspection: ISharkcraftInspection): Promise<{
|
|
34
|
+
readonly constructs: readonly IConstruct[];
|
|
35
|
+
/** Every facet folded into a construct, attributed to its file. */
|
|
36
|
+
readonly facets: readonly {
|
|
37
|
+
readonly id: string;
|
|
38
|
+
readonly constructId: string;
|
|
39
|
+
readonly file: string;
|
|
40
|
+
readonly packageName?: string;
|
|
41
|
+
}[];
|
|
42
|
+
/** Construct files that failed to import / are missing. */
|
|
43
|
+
readonly issues: readonly IContributionFileIssue[];
|
|
44
|
+
/** Every declared construct the loader refused. */
|
|
45
|
+
readonly rejected: readonly IRejectedEntry[];
|
|
46
|
+
/** Facet files that failed to import / are missing. */
|
|
47
|
+
readonly facetIssues: readonly IContributionFileIssue[];
|
|
48
|
+
/** Every declared facet the loader refused (malformed, or its construct is not loaded). */
|
|
49
|
+
readonly facetRejected: readonly IRejectedEntry[];
|
|
50
|
+
}>;
|
|
11
51
|
export declare function loadConstructs(inspection: ISharkcraftInspection): Promise<readonly IConstruct[]>;
|
|
12
52
|
/** Synchronous accessor — falls back to a snapshot cached from the last
|
|
13
53
|
* async load. Used by search-index which needs to be sync-friendly. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"construct-registry.d.ts","sourceRoot":"","sources":["../src/construct-registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"construct-registry.d.ts","sourceRoot":"","sources":["../src/construct-registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAE7E,eAAO,MAAM,yBAAyB,qCAAqC,CAAC;AAE5E,MAAM,WAAW,UAAW,SAAQ,eAAe;IACjD,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAgB,SAAQ,oBAAoB;CAAG;AA+BhE;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAOzE;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAM9E;AA+BD;;;;;;GAMG;AACH,wBAAsB,wBAAwB,CAAC,UAAU,EAAE,qBAAqB,GAAG,OAAO,CAAC;IACzF,QAAQ,CAAC,UAAU,EAAE,SAAS,UAAU,EAAE,CAAC;IAC3C,mEAAmE;IACnE,QAAQ,CAAC,MAAM,EAAE,SAAS;QACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;KAC/B,EAAE,CAAC;IACJ,2DAA2D;IAC3D,QAAQ,CAAC,MAAM,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACnD,mDAAmD;IACnD,QAAQ,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;IAC7C,uDAAuD;IACvD,QAAQ,CAAC,WAAW,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACxD,2FAA2F;IAC3F,QAAQ,CAAC,aAAa,EAAE,SAAS,cAAc,EAAE,CAAC;CACnD,CAAC,CA0LD;AAED,wBAAsB,cAAc,CAClC,UAAU,EAAE,qBAAqB,GAChC,OAAO,CAAC,SAAS,UAAU,EAAE,CAAC,CAEhC;AAED;wEACwE;AACxE,wBAAgB,cAAc,CAAC,UAAU,EAAE,qBAAqB,GAAG,SAAS,UAAU,EAAE,CAGvF;AAED,wEAAwE;AACxE,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEzF;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,UAAU,CAAC;IACtB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,oBAAoB,EAAE,CAAC,CAAC;IACxD,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,UAAU,GAAG,eAAe,CAmBrE"}
|