@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
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ReuseImportStyle } from '@shrkcrft/core';
|
|
2
|
+
/**
|
|
3
|
+
* One curated `reusePrimitives[]` entry resolved against the code — THE record
|
|
4
|
+
* `shrk reuse` prints a curated row from and `shrk reuse coverage` judges it
|
|
5
|
+
* by (`resolveCuratedReuse`), so the two can never disagree about which
|
|
6
|
+
* construct an entry names or whether its import compiles.
|
|
7
|
+
*/
|
|
8
|
+
export interface IReuseCuratedResolution {
|
|
9
|
+
/**
|
|
10
|
+
* The declaration the entry names: the construct its `importPath` resolves
|
|
11
|
+
* to, else (among the name's declarations) one on the public surface, then an
|
|
12
|
+
* exported one, then the first by path. Absent when nothing declares it (or
|
|
13
|
+
* there is no graph to ask).
|
|
14
|
+
*/
|
|
15
|
+
readonly declaration?: {
|
|
16
|
+
readonly path: string;
|
|
17
|
+
readonly symbolId: string;
|
|
18
|
+
readonly isExported: boolean;
|
|
19
|
+
readonly line?: number;
|
|
20
|
+
readonly declKind?: string;
|
|
21
|
+
};
|
|
22
|
+
/** Other files declaring the same name (exported ones when any are). */
|
|
23
|
+
readonly alternates: readonly string[];
|
|
24
|
+
/** How the printed import binds the symbol (set whenever `importPath` is). */
|
|
25
|
+
readonly importStyle?: ReuseImportStyle;
|
|
26
|
+
/** The copy-paste import line (set whenever `importPath` is). */
|
|
27
|
+
readonly importLine?: string;
|
|
28
|
+
/**
|
|
29
|
+
* `true` / `false` when `importPath` was checked: does the module it names
|
|
30
|
+
* export the symbol, so `importLine` compiles? Absent when it could not be
|
|
31
|
+
* checked (see `importPathNote`) or there is no graph.
|
|
32
|
+
*/
|
|
33
|
+
readonly importPathAgrees?: boolean;
|
|
34
|
+
readonly importPathNote?: string;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=reuse-curated-resolution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reuse-curated-resolution.d.ts","sourceRoot":"","sources":["../../src/reuse/reuse-curated-resolution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE;QACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;QAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,wEAAwE;IACxE,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,8EAA8E;IAC9E,QAAQ,CAAC,WAAW,CAAC,EAAE,gBAAgB,CAAC;IACxC,iEAAiE;IACjE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a curated `reusePrimitives[]` entry stands against the code.
|
|
3
|
+
*
|
|
4
|
+
* - `public` — on a workspace package's public export surface.
|
|
5
|
+
* - `exported-not-public` — exported from its file, but no package entry
|
|
6
|
+
* reaches it (a consumer cannot import it from a package root).
|
|
7
|
+
* - `not-exported` — declared, never exported.
|
|
8
|
+
* - `not-found` — no declaration of that name anywhere in the index:
|
|
9
|
+
* a dead entry (a rename, a typo) that every `shrk reuse` answer would
|
|
10
|
+
* still recommend. Fails `shrk reuse coverage`.
|
|
11
|
+
* - `ambiguous` — several exported declarations and none public,
|
|
12
|
+
* so which one the entry means is unknowable.
|
|
13
|
+
*/
|
|
14
|
+
export declare enum ReuseCuratedStatus {
|
|
15
|
+
Public = "public",
|
|
16
|
+
ExportedNotPublic = "exported-not-public",
|
|
17
|
+
NotExported = "not-exported",
|
|
18
|
+
NotFound = "not-found",
|
|
19
|
+
Ambiguous = "ambiguous"
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=reuse-curated-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reuse-curated-status.d.ts","sourceRoot":"","sources":["../../src/reuse/reuse-curated-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,oBAAY,kBAAkB;IAC5B,MAAM,WAAW;IACjB,iBAAiB,wBAAwB;IACzC,WAAW,iBAAiB;IAC5B,QAAQ,cAAc;IACtB,SAAS,cAAc;CACxB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a curated `reusePrimitives[]` entry stands against the code.
|
|
3
|
+
*
|
|
4
|
+
* - `public` — on a workspace package's public export surface.
|
|
5
|
+
* - `exported-not-public` — exported from its file, but no package entry
|
|
6
|
+
* reaches it (a consumer cannot import it from a package root).
|
|
7
|
+
* - `not-exported` — declared, never exported.
|
|
8
|
+
* - `not-found` — no declaration of that name anywhere in the index:
|
|
9
|
+
* a dead entry (a rename, a typo) that every `shrk reuse` answer would
|
|
10
|
+
* still recommend. Fails `shrk reuse coverage`.
|
|
11
|
+
* - `ambiguous` — several exported declarations and none public,
|
|
12
|
+
* so which one the entry means is unknowable.
|
|
13
|
+
*/
|
|
14
|
+
export var ReuseCuratedStatus;
|
|
15
|
+
(function (ReuseCuratedStatus) {
|
|
16
|
+
ReuseCuratedStatus["Public"] = "public";
|
|
17
|
+
ReuseCuratedStatus["ExportedNotPublic"] = "exported-not-public";
|
|
18
|
+
ReuseCuratedStatus["NotExported"] = "not-exported";
|
|
19
|
+
ReuseCuratedStatus["NotFound"] = "not-found";
|
|
20
|
+
ReuseCuratedStatus["Ambiguous"] = "ambiguous";
|
|
21
|
+
})(ReuseCuratedStatus || (ReuseCuratedStatus = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReuseMatchSource, ReuseNameMatch } from '@shrkcrft/core';
|
|
2
|
+
/** How one curated reuse primitive matched an intent — the evidence behind its score. */
|
|
3
|
+
export interface IReuseMatchDetail {
|
|
4
|
+
/** +1 per distinct intent token that hit any field, +0.5 per role an intent token hit. */
|
|
5
|
+
readonly score: number;
|
|
6
|
+
/** The distinct intent tokens that hit — the evidence behind the score. */
|
|
7
|
+
readonly matched: readonly string[];
|
|
8
|
+
/** An intent token equals one of the symbol NAME's tokens (the strongest signal). */
|
|
9
|
+
readonly symbolHit: boolean;
|
|
10
|
+
/** Which fields the tokens hit, in fixed order symbol → role → keyword → description. */
|
|
11
|
+
readonly matchedVia: readonly ReuseMatchSource[];
|
|
12
|
+
/** The name-level match, by token equality. */
|
|
13
|
+
readonly nameMatch: ReuseNameMatch;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=reuse-match-detail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reuse-match-detail.d.ts","sourceRoot":"","sources":["../../src/reuse/reuse-match-detail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEvE,yFAAyF;AACzF,MAAM,WAAW,iBAAiB;IAChC,0FAA0F;IAC1F,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,qFAAqF;IACrF,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,yFAAyF;IACzF,QAAQ,CAAC,UAAU,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACjD,+CAA+C;IAC/C,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { MatchConfidenceVerdict } from '@shrkcrft/core';
|
|
2
|
+
import type { IReuseCandidate } from './reuse-candidate.js';
|
|
3
|
+
import type { IReuseSuggestion } from './reuse-suggestion.js';
|
|
4
|
+
/** The reuse engine's answer to one intent. */
|
|
5
|
+
export interface IReuseRanking {
|
|
6
|
+
/** The normalised intent tokens every score is computed over. */
|
|
7
|
+
readonly tokens: readonly string[];
|
|
8
|
+
/** Shared confidence vocabulary: at least one candidate cleared the floor. */
|
|
9
|
+
readonly confident: boolean;
|
|
10
|
+
readonly verdict: MatchConfidenceVerdict;
|
|
11
|
+
/** Distinct intent tokens a metadata-only match must hit (a name match always clears it). */
|
|
12
|
+
readonly floor: number;
|
|
13
|
+
/** Best score among results and suggestions; 0 when nothing shares a term. */
|
|
14
|
+
readonly bestScore: number;
|
|
15
|
+
/** Confident answers, tier-ordered, capped at the limit. */
|
|
16
|
+
readonly results: readonly IReuseCandidate[];
|
|
17
|
+
/** Weak did-you-mean rows — only when `results` is empty. */
|
|
18
|
+
readonly suggestions: readonly IReuseSuggestion[];
|
|
19
|
+
/** Exports that matched by name but a curated entry's `supersedes` steers away from. */
|
|
20
|
+
readonly superseded: readonly {
|
|
21
|
+
readonly symbol: string;
|
|
22
|
+
readonly package: string;
|
|
23
|
+
readonly supersededBy: readonly string[];
|
|
24
|
+
}[];
|
|
25
|
+
/**
|
|
26
|
+
* An uncurated export answers by name (exact / covers) while the best curated
|
|
27
|
+
* candidate names it only in part, or matched only through metadata — the
|
|
28
|
+
* curated index does not cover this intent. `isReuseCurationGap`, the same
|
|
29
|
+
* predicate `shrk reuse coverage` lists `shadowed` by.
|
|
30
|
+
*/
|
|
31
|
+
readonly curationGap: boolean;
|
|
32
|
+
/** Some candidate matched by NAME (tiers 1–3). False is the miss path. */
|
|
33
|
+
readonly nameAnswered: boolean;
|
|
34
|
+
/** The export surface was searched (a surface was given and not curated-only). */
|
|
35
|
+
readonly surfaceSearched: boolean;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=reuse-ranking.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reuse-ranking.d.ts","sourceRoot":"","sources":["../../src/reuse/reuse-ranking.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,+CAA+C;AAC/C,MAAM,WAAW,aAAa;IAC5B,iEAAiE;IACjE,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,8EAA8E;IAC9E,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,sBAAsB,CAAC;IACzC,6FAA6F;IAC7F,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8EAA8E;IAC9E,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;IAC7C,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAClD,wFAAwF;IACxF,QAAQ,CAAC,UAAU,EAAE,SAAS;QAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;KAC1C,EAAE,CAAC;IACJ;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,0EAA0E;IAC1E,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,kFAAkF;IAClF,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;CACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReuseCandidateSource, ReuseMatchSource, ReuseNameMatch } from '@shrkcrft/core';
|
|
2
|
+
/** A weak (below-confidence) candidate offered as a did-you-mean, never as an answer. */
|
|
3
|
+
export interface IReuseSuggestion {
|
|
4
|
+
readonly symbol: string;
|
|
5
|
+
readonly score: number;
|
|
6
|
+
/** Fraction of distinct intent tokens that hit (0..1). */
|
|
7
|
+
readonly confidence: number;
|
|
8
|
+
readonly matched: readonly string[];
|
|
9
|
+
/** Curated roles; `[]` for an uncurated export-surface suggestion. */
|
|
10
|
+
readonly roles: readonly string[];
|
|
11
|
+
readonly source: ReuseCandidateSource;
|
|
12
|
+
readonly nameMatch: ReuseNameMatch;
|
|
13
|
+
readonly matchedVia: readonly ReuseMatchSource[];
|
|
14
|
+
/** Export-surface suggestions: the package that exposes it. */
|
|
15
|
+
readonly package?: string;
|
|
16
|
+
/** Export-surface suggestions: the declaring file. */
|
|
17
|
+
readonly declaredIn?: string;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=reuse-suggestion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reuse-suggestion.d.ts","sourceRoot":"","sources":["../../src/reuse/reuse-suggestion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE7F,yFAAyF;AACzF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,0DAA0D;IAC1D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,sEAAsE;IACtE,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACjD,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,sDAAsD;IACtD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { IPublicExport } from '@shrkcrft/core';
|
|
2
|
+
/**
|
|
3
|
+
* The code-graph questions the reuse engine asks, INJECTED by the caller (the
|
|
4
|
+
* CLI answers them from `GraphQueryApi`) — the inspector never imports the
|
|
5
|
+
* graph, so the engine stays pure and MCP-callable.
|
|
6
|
+
*/
|
|
7
|
+
export interface IReuseSymbolLookup {
|
|
8
|
+
/** Every indexed declaration of exactly `name`. */
|
|
9
|
+
declarationsOf(name: string): readonly {
|
|
10
|
+
readonly path: string;
|
|
11
|
+
readonly symbolId: string;
|
|
12
|
+
readonly isExported: boolean;
|
|
13
|
+
readonly line?: number;
|
|
14
|
+
readonly declKind?: string;
|
|
15
|
+
}[];
|
|
16
|
+
/** Real consumer files of a declaration. Optional. */
|
|
17
|
+
consumerCount?(symbolId: string): number;
|
|
18
|
+
/**
|
|
19
|
+
* What `import … from '<specifier>'` binds under the name `symbol`: the
|
|
20
|
+
* specifier resolved the way consumers' imports of it resolved, then walked
|
|
21
|
+
* with the SAME ESM export walk as the public surface — so a default export
|
|
22
|
+
* reads as one (`isDefault`), and a name `export *` does not forward reads as
|
|
23
|
+
* absent. `null` = the module does not export it. `undefined` = no indexed
|
|
24
|
+
* import resolves the specifier, so it could not be checked.
|
|
25
|
+
*/
|
|
26
|
+
specifierExport?(specifier: string, symbol: string): Pick<IPublicExport, 'symbolId' | 'declaredIn' | 'line' | 'declKind' | 'isDefault'> | null | undefined;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=reuse-symbol-lookup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reuse-symbol-lookup.d.ts","sourceRoot":"","sources":["../../src/reuse/reuse-symbol-lookup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,mDAAmD;IACnD,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS;QACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;QAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;KAC5B,EAAE,CAAC;IACJ,sDAAsD;IACtD,aAAa,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IACzC;;;;;;;OAOG;IACH,eAAe,CAAC,CACd,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,IAAI,CAAC,aAAa,EAAE,UAAU,GAAG,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,WAAW,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;CAC1G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The distinct tokens a reuse lookup matches on — for the INTENT and for a
|
|
3
|
+
* construct's NAME alike, so the two sides are normalised identically.
|
|
4
|
+
*
|
|
5
|
+
* Words are split by THE identifier tokenizer (`splitIdentifierTokens`), so
|
|
6
|
+
* an intent typed as an identifier (`DateRangePicker`) and the same words
|
|
7
|
+
* typed apart (`date range picker`) are the same query. Stop words and
|
|
8
|
+
* fragments under {@link MIN_TOKEN_LENGTH} are dropped; order is kept.
|
|
9
|
+
*/
|
|
10
|
+
export declare function tokenizeReuseIntent(text: string): string[];
|
|
11
|
+
//# sourceMappingURL=reuse-tokenize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reuse-tokenize.d.ts","sourceRoot":"","sources":["../../src/reuse/reuse-tokenize.ts"],"names":[],"mappings":"AAeA;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAM1D"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { splitIdentifierTokens } from "../split-identifier.js";
|
|
2
|
+
/** Words that name no construct in a reuse intent ("I want to add a …"). */
|
|
3
|
+
const STOP = new Set([
|
|
4
|
+
'the', 'a', 'an', 'to', 'for', 'of', 'and', 'or', 'with', 'in', 'on', 'into', 'my',
|
|
5
|
+
'add', 'use', 'using', 'create', 'make', 'new', 'build', 'want', 'need', 'how', 'do',
|
|
6
|
+
]);
|
|
7
|
+
/**
|
|
8
|
+
* Minimum token length. 2-char tokens (`ui`, `id`) substring-match unrelated
|
|
9
|
+
* text (`guidance`, `valid`) in the curated metadata fields, which are still
|
|
10
|
+
* matched by containment.
|
|
11
|
+
*/
|
|
12
|
+
const MIN_TOKEN_LENGTH = 3;
|
|
13
|
+
/**
|
|
14
|
+
* The distinct tokens a reuse lookup matches on — for the INTENT and for a
|
|
15
|
+
* construct's NAME alike, so the two sides are normalised identically.
|
|
16
|
+
*
|
|
17
|
+
* Words are split by THE identifier tokenizer (`splitIdentifierTokens`), so
|
|
18
|
+
* an intent typed as an identifier (`DateRangePicker`) and the same words
|
|
19
|
+
* typed apart (`date range picker`) are the same query. Stop words and
|
|
20
|
+
* fragments under {@link MIN_TOKEN_LENGTH} are dropped; order is kept.
|
|
21
|
+
*/
|
|
22
|
+
export function tokenizeReuseIntent(text) {
|
|
23
|
+
return [
|
|
24
|
+
...new Set(splitIdentifierTokens(text).filter((t) => t.length >= MIN_TOKEN_LENGTH && !STOP.has(t))),
|
|
25
|
+
];
|
|
26
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReuseNameMatch } from '@shrkcrft/core';
|
|
2
|
+
/**
|
|
3
|
+
* How `symbol`'s NAME matches the intent `tokens` — by token EQUALITY on the
|
|
4
|
+
* split identifier, never substring: `ran` does not match `DateRange`.
|
|
5
|
+
*
|
|
6
|
+
* The name goes through the same normaliser as the intent
|
|
7
|
+
* ({@link tokenizeReuseIntent}), so a prefix the intent can never carry (the
|
|
8
|
+
* `I` of `IDateRangePickerOptions`, a `use` of `useDebounce`) does not stop
|
|
9
|
+
* an exact match.
|
|
10
|
+
*/
|
|
11
|
+
export declare function scoreReuseName(symbol: string, tokens: readonly string[]): ReuseNameMatch;
|
|
12
|
+
/** The intent tokens (in intent order) that equal one of `symbol`'s name tokens. */
|
|
13
|
+
export declare function reuseNameHits(symbol: string, tokens: readonly string[]): string[];
|
|
14
|
+
/** How many of `symbol`'s name tokens the intent did NOT name — 0 is the closest name. */
|
|
15
|
+
export declare function reuseNameExtraTokens(symbol: string, tokens: readonly string[]): number;
|
|
16
|
+
//# sourceMappingURL=score-reuse-name.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"score-reuse-name.d.ts","sourceRoot":"","sources":["../../src/reuse/score-reuse-name.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,cAAc,CASxF;AAED,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAGjF;AAED,0FAA0F;AAC1F,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAEtF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ReuseNameMatch } from '@shrkcrft/core';
|
|
2
|
+
import { tokenizeReuseIntent } from "./reuse-tokenize.js";
|
|
3
|
+
/**
|
|
4
|
+
* How `symbol`'s NAME matches the intent `tokens` — by token EQUALITY on the
|
|
5
|
+
* split identifier, never substring: `ran` does not match `DateRange`.
|
|
6
|
+
*
|
|
7
|
+
* The name goes through the same normaliser as the intent
|
|
8
|
+
* ({@link tokenizeReuseIntent}), so a prefix the intent can never carry (the
|
|
9
|
+
* `I` of `IDateRangePickerOptions`, a `use` of `useDebounce`) does not stop
|
|
10
|
+
* an exact match.
|
|
11
|
+
*/
|
|
12
|
+
export function scoreReuseName(symbol, tokens) {
|
|
13
|
+
const intent = new Set(tokens);
|
|
14
|
+
if (intent.size === 0)
|
|
15
|
+
return ReuseNameMatch.None;
|
|
16
|
+
const name = new Set(tokenizeReuseIntent(symbol));
|
|
17
|
+
let hits = 0;
|
|
18
|
+
for (const t of intent)
|
|
19
|
+
if (name.has(t))
|
|
20
|
+
hits += 1;
|
|
21
|
+
if (hits === 0)
|
|
22
|
+
return ReuseNameMatch.None;
|
|
23
|
+
if (hits < intent.size)
|
|
24
|
+
return ReuseNameMatch.Partial;
|
|
25
|
+
return name.size === intent.size ? ReuseNameMatch.Exact : ReuseNameMatch.Covers;
|
|
26
|
+
}
|
|
27
|
+
/** The intent tokens (in intent order) that equal one of `symbol`'s name tokens. */
|
|
28
|
+
export function reuseNameHits(symbol, tokens) {
|
|
29
|
+
const name = new Set(tokenizeReuseIntent(symbol));
|
|
30
|
+
return [...new Set(tokens)].filter((t) => name.has(t));
|
|
31
|
+
}
|
|
32
|
+
/** How many of `symbol`'s name tokens the intent did NOT name — 0 is the closest name. */
|
|
33
|
+
export function reuseNameExtraTokens(symbol, tokens) {
|
|
34
|
+
return new Set(tokenizeReuseIntent(symbol)).size - reuseNameHits(symbol, tokens).length;
|
|
35
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type IReusePrimitive } from '@shrkcrft/core';
|
|
2
|
+
import type { IReuseMatchDetail } from './reuse-match-detail.js';
|
|
3
|
+
/**
|
|
4
|
+
* Score one curated primitive against the intent tokens, keeping WHICH field
|
|
5
|
+
* each token hit — so a match through `keywords`/`description` alone is never
|
|
6
|
+
* reported the same way as a match on the symbol's name.
|
|
7
|
+
*
|
|
8
|
+
* - symbol: token EQUALITY on the split name (`debounce` hits `useDebounce`;
|
|
9
|
+
* `ran` does not hit `DateRange`).
|
|
10
|
+
* - roles / keywords / description: substring containment, as before. Moving
|
|
11
|
+
* those to token overlap belongs to the shared normaliser (round 11 §2.5), so
|
|
12
|
+
* reuse and the recommender switch together.
|
|
13
|
+
*
|
|
14
|
+
* The numeric score keeps its historical meaning: +1 per distinct intent token
|
|
15
|
+
* that hit any field, +0.5 per role an intent token hit.
|
|
16
|
+
*/
|
|
17
|
+
export declare function scoreReusePrimitive(p: IReusePrimitive, tokens: readonly string[]): IReuseMatchDetail;
|
|
18
|
+
/**
|
|
19
|
+
* Confidence floor: a keyword collision is not a match. A hit is only
|
|
20
|
+
* "confident" when it matched the symbol NAME, OR matched ≥2 distinct intent
|
|
21
|
+
* tokens, OR the intent was a single token and that token hit. A single
|
|
22
|
+
* generic keyword hit on a multi-token intent is a weak match — surfaced as a
|
|
23
|
+
* did-you-mean, never as a confident answer.
|
|
24
|
+
*/
|
|
25
|
+
export declare function isConfidentReuseMatch(detail: IReuseMatchDetail, queryTokenCount: number): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The confidence floor, in distinct intent tokens a METADATA-only (non-name)
|
|
28
|
+
* match must hit: 2, or 1 for a single-token intent. A name match always
|
|
29
|
+
* clears it. This is the `floor` reuse reports in the shared confidence
|
|
30
|
+
* vocabulary.
|
|
31
|
+
*/
|
|
32
|
+
export declare function reuseConfidenceFloor(queryTokenCount: number): number;
|
|
33
|
+
//# sourceMappingURL=score-reuse-primitive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"score-reuse-primitive.d.ts","sourceRoot":"","sources":["../../src/reuse/score-reuse-primitive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAWjE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,iBAAiB,CA0CpG;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAKjG;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAEpE"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { ReuseMatchSource } from '@shrkcrft/core';
|
|
2
|
+
import { scoreReuseName } from "./score-reuse-name.js";
|
|
3
|
+
import { tokenizeReuseIntent } from "./reuse-tokenize.js";
|
|
4
|
+
const SOURCE_ORDER = [
|
|
5
|
+
ReuseMatchSource.Symbol,
|
|
6
|
+
ReuseMatchSource.Role,
|
|
7
|
+
ReuseMatchSource.Keyword,
|
|
8
|
+
ReuseMatchSource.Description,
|
|
9
|
+
];
|
|
10
|
+
/**
|
|
11
|
+
* Score one curated primitive against the intent tokens, keeping WHICH field
|
|
12
|
+
* each token hit — so a match through `keywords`/`description` alone is never
|
|
13
|
+
* reported the same way as a match on the symbol's name.
|
|
14
|
+
*
|
|
15
|
+
* - symbol: token EQUALITY on the split name (`debounce` hits `useDebounce`;
|
|
16
|
+
* `ran` does not hit `DateRange`).
|
|
17
|
+
* - roles / keywords / description: substring containment, as before. Moving
|
|
18
|
+
* those to token overlap belongs to the shared normaliser (round 11 §2.5), so
|
|
19
|
+
* reuse and the recommender switch together.
|
|
20
|
+
*
|
|
21
|
+
* The numeric score keeps its historical meaning: +1 per distinct intent token
|
|
22
|
+
* that hit any field, +0.5 per role an intent token hit.
|
|
23
|
+
*/
|
|
24
|
+
export function scoreReusePrimitive(p, tokens) {
|
|
25
|
+
const nameTokens = new Set(tokenizeReuseIntent(p.symbol));
|
|
26
|
+
const roles = (p.roles ?? []).map((r) => r.toLowerCase());
|
|
27
|
+
const keywords = (p.keywords ?? []).map((k) => k.toLowerCase());
|
|
28
|
+
const description = (p.description ?? '').toLowerCase();
|
|
29
|
+
const via = new Set();
|
|
30
|
+
const matched = [];
|
|
31
|
+
let score = 0;
|
|
32
|
+
for (const t of tokens) {
|
|
33
|
+
let hit = false;
|
|
34
|
+
if (nameTokens.has(t)) {
|
|
35
|
+
via.add(ReuseMatchSource.Symbol);
|
|
36
|
+
hit = true;
|
|
37
|
+
}
|
|
38
|
+
if (roles.some((r) => r.includes(t))) {
|
|
39
|
+
via.add(ReuseMatchSource.Role);
|
|
40
|
+
hit = true;
|
|
41
|
+
}
|
|
42
|
+
if (keywords.some((k) => k.includes(t))) {
|
|
43
|
+
via.add(ReuseMatchSource.Keyword);
|
|
44
|
+
hit = true;
|
|
45
|
+
}
|
|
46
|
+
if (description.includes(t)) {
|
|
47
|
+
via.add(ReuseMatchSource.Description);
|
|
48
|
+
hit = true;
|
|
49
|
+
}
|
|
50
|
+
if (hit) {
|
|
51
|
+
score += 1;
|
|
52
|
+
matched.push(t);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// A role the intent mentions is a strong signal; re-weight role hits.
|
|
56
|
+
for (const role of roles) {
|
|
57
|
+
if (role.length >= 3 && tokens.some((t) => role.includes(t)))
|
|
58
|
+
score += 0.5;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
score,
|
|
62
|
+
matched,
|
|
63
|
+
symbolHit: via.has(ReuseMatchSource.Symbol),
|
|
64
|
+
matchedVia: SOURCE_ORDER.filter((s) => via.has(s)),
|
|
65
|
+
nameMatch: scoreReuseName(p.symbol, tokens),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Confidence floor: a keyword collision is not a match. A hit is only
|
|
70
|
+
* "confident" when it matched the symbol NAME, OR matched ≥2 distinct intent
|
|
71
|
+
* tokens, OR the intent was a single token and that token hit. A single
|
|
72
|
+
* generic keyword hit on a multi-token intent is a weak match — surfaced as a
|
|
73
|
+
* did-you-mean, never as a confident answer.
|
|
74
|
+
*/
|
|
75
|
+
export function isConfidentReuseMatch(detail, queryTokenCount) {
|
|
76
|
+
if (detail.matched.length === 0)
|
|
77
|
+
return false;
|
|
78
|
+
if (detail.symbolHit)
|
|
79
|
+
return true;
|
|
80
|
+
if (detail.matched.length >= reuseConfidenceFloor(queryTokenCount))
|
|
81
|
+
return true;
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The confidence floor, in distinct intent tokens a METADATA-only (non-name)
|
|
86
|
+
* match must hit: 2, or 1 for a single-token intent. A name match always
|
|
87
|
+
* clears it. This is the `floor` reuse reports in the shared confidence
|
|
88
|
+
* vocabulary.
|
|
89
|
+
*/
|
|
90
|
+
export function reuseConfidenceFloor(queryTokenCount) {
|
|
91
|
+
return Math.max(1, Math.min(2, queryTokenCount));
|
|
92
|
+
}
|
package/dist/review-packet.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export interface IReviewPacket {
|
|
|
27
27
|
severity: string;
|
|
28
28
|
message: string;
|
|
29
29
|
}[];
|
|
30
|
+
/** Why `boundaryViolations` is not the full answer for the changed files (THE boundary verdict's shortfalls). */
|
|
31
|
+
boundaryShortfalls?: readonly string[];
|
|
30
32
|
/** Heuristic: missing tests for any changed `src/**` files. */
|
|
31
33
|
missingTestsHeuristic: readonly string[];
|
|
32
34
|
/** Verification commands recommended for the change set. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-packet.d.ts","sourceRoot":"","sources":["../src/review-packet.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"review-packet.d.ts","sourceRoot":"","sources":["../src/review-packet.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAKvE,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,kEAAkE;IAClE,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,8CAA8C;IAC9C,aAAa,EAAE,SAAS;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACxE,2CAA2C;IAC3C,iBAAiB,EAAE,SAAS;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC3D,iBAAiB,EAAE,SAAS;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5D,2DAA2D;IAC3D,kBAAkB,EAAE,SAAS;QAC3B,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,eAAe,EAAE,MAAM,CAAC;QACxB,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;IACJ,iHAAiH;IACjH,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,+DAA+D;IAC/D,qBAAqB,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,4DAA4D;IAC5D,oBAAoB,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,mEAAmE;IACnE,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,yBAAyB;IACxC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAwCD,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,qBAAqB,EACjC,OAAO,GAAE,yBAA8B,GACtC,aAAa,CAqFf"}
|
package/dist/review-packet.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChangedScopeMode } from "./boundaries-changed-only.js";
|
|
2
|
+
import { runBoundaryCheck } from "./run-boundary-check.js";
|
|
2
3
|
import { matchAffectedConventions } from '@shrkcrft/paths';
|
|
3
4
|
import { resolveVerificationCommands } from "./resolve-verification-commands.js";
|
|
4
5
|
import { rankAll } from "./task-ranker.js";
|
|
@@ -55,14 +56,19 @@ export function buildReviewPacket(inspection, options = {}) {
|
|
|
55
56
|
// (directory-prefix match against each convention's metadata.path), not a
|
|
56
57
|
// free-text substring of the description.
|
|
57
58
|
const affectedPaths = matchAffectedConventions(inspection.pathService.list(), changedFiles).map((p) => p.id);
|
|
58
|
-
// Boundary violations restricted to changed files
|
|
59
|
+
// Boundary violations restricted to changed files — through THE boundary
|
|
60
|
+
// orchestrator in changed-scope mode, the call `check boundaries
|
|
61
|
+
// --changed-only` makes (round 11 review R11-GAP-3): a governed changed file
|
|
62
|
+
// it could not read is named in `boundaryShortfalls`, never a silent 0.
|
|
59
63
|
let boundaryViolations = [];
|
|
64
|
+
let boundaryShortfalls = [];
|
|
60
65
|
if (inspection.boundaryRegistry.size() > 0 && changedFiles.length > 0) {
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
const evalResult = evaluateBoundaries(scan, inspection.boundaryRegistry.list(), {
|
|
64
|
-
...(tsconfigPaths.aliases.size > 0 ? { tsconfigPaths } : {}),
|
|
66
|
+
const evalResult = runBoundaryCheck(inspection, {
|
|
67
|
+
changed: { mode: ChangedScopeMode.Files, files: changedFiles },
|
|
65
68
|
});
|
|
69
|
+
if (evalResult.verdict === 'not-verified' && evalResult.selectedRuleIds.length > 0) {
|
|
70
|
+
boundaryShortfalls = evalResult.shortfalls;
|
|
71
|
+
}
|
|
66
72
|
const changedSet = new Set(changedFiles);
|
|
67
73
|
boundaryViolations = evalResult.violations
|
|
68
74
|
.filter((v) => changedSet.has(v.file))
|
|
@@ -115,6 +121,7 @@ export function buildReviewPacket(inspection, options = {}) {
|
|
|
115
121
|
title: p.item.title,
|
|
116
122
|
})),
|
|
117
123
|
boundaryViolations,
|
|
124
|
+
...(boundaryShortfalls.length > 0 ? { boundaryShortfalls } : {}),
|
|
118
125
|
missingTestsHeuristic: missingTestsHeuristic(changedFiles),
|
|
119
126
|
verificationCommands,
|
|
120
127
|
reviewerInstructions,
|
package/dist/role-views.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role-views.d.ts","sourceRoot":"","sources":["../src/role-views.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAwB,gBAAgB,EAAsB,MAAM,oBAAoB,CAAC;AAChG,OAAO,EAAuB,aAAa,EAAwB,MAAM,gBAAgB,CAAC;AAC1F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,eAAO,MAAM,gBAAgB,4BAA4B,CAAC;AAE1D,oBAAY,MAAM;IAChB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,cAAc,oBAAoB;IAClC,QAAQ,aAAa;IACrB,OAAO,aAAa;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,OAAO,gBAAgB,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,gBAAgB,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,aAAa,CAAC;IAC7B,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,YAAY,CAAC,EAAE,qBAAqB,CAAC;CACtC;
|
|
1
|
+
{"version":3,"file":"role-views.d.ts","sourceRoot":"","sources":["../src/role-views.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAwB,gBAAgB,EAAsB,MAAM,oBAAoB,CAAC;AAChG,OAAO,EAAuB,aAAa,EAAwB,MAAM,gBAAgB,CAAC;AAC1F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,eAAO,MAAM,gBAAgB,4BAA4B,CAAC;AAE1D,oBAAY,MAAM;IAChB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,cAAc,oBAAoB;IAClC,QAAQ,aAAa;IACrB,OAAO,aAAa;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,OAAO,gBAAgB,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,gBAAgB,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,aAAa,CAAC;IAC7B,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,YAAY,CAAC,EAAE,qBAAqB,CAAC;CACtC;AAsGD,wBAAgB,aAAa,IAAI,SAAS,SAAS,EAAE,CAEpD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAE/D;AA6ID,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,qBAAqB,GAChC,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC,CA8BzC;AAED,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,kBAAkB,GAAG,MAAM,CAqCzE"}
|