@shrkcrft/inspector 0.1.0-alpha.29 → 0.1.0-alpha.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +40 -0
- package/dist/code-intelligence-doctor.d.ts.map +1 -1
- package/dist/code-intelligence-doctor.js +86 -12
- 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 +80 -0
- package/dist/doc-references.d.ts.map +1 -0
- package/dist/doc-references.js +269 -0
- 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.d.ts.map +1 -1
- package/dist/fuzzy-impact.js +12 -21
- 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 +145 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +176 -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 +1002 -316
- 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 +14 -0
- package/dist/nearest-id.d.ts.map +1 -0
- package/dist/nearest-id.js +12 -0
- 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 +42 -0
- package/dist/policy-registry.d.ts.map +1 -0
- package/dist/policy-registry.js +131 -0
- 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 +15 -12
- 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 +210 -0
- package/dist/reference-registry.d.ts.map +1 -0
- package/dist/reference-registry.js +395 -0
- 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 +258 -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 +1329 -255
- 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 +65 -309
- 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 +47 -1
- package/dist/sharkcraft-inspector.d.ts.map +1 -1
- package/dist/sharkcraft-inspector.js +278 -29
- 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 -318
- 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,9 @@
|
|
|
1
|
+
import type { ISearchTuningLintReport } from './i-search-tuning-lint-report.js';
|
|
2
|
+
import type { ISharkcraftInspection } from './sharkcraft-inspector.js';
|
|
3
|
+
/**
|
|
4
|
+
* Lint every loaded search-tuning entry. Loads the tuning and warms the
|
|
5
|
+
* reference registries itself (a warm without a resolver keeps the command
|
|
6
|
+
* resolver the CLI already injected).
|
|
7
|
+
*/
|
|
8
|
+
export declare function lintSearchTuning(inspection: ISharkcraftInspection): Promise<ISearchTuningLintReport>;
|
|
9
|
+
//# sourceMappingURL=search-tuning-lint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-tuning-lint.d.ts","sourceRoot":"","sources":["../src/search-tuning-lint.ts"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAehF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AA2YvE;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,qBAAqB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAwC1G"}
|
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE search-tuning lint — consumed by `shrk search tuning doctor` AND the
|
|
3
|
+
* self-config doctor (one lint, two renderers).
|
|
4
|
+
*
|
|
5
|
+
* `search tuning doctor` used to report only load/clamp issues, so it printed
|
|
6
|
+
* "No issues." and exited 0 over a dead bare key, a misspelled prefix, a missing
|
|
7
|
+
* target, triggers no query can produce, and a silent total-cap discard. Every
|
|
8
|
+
* check here is deterministic over data already loaded:
|
|
9
|
+
*
|
|
10
|
+
* - boost keys resolve through THE key resolver (`target-missing`,
|
|
11
|
+
* `key-unprefixed`, `key-unknown-kind`), deduped per (entry, key) — THE key
|
|
12
|
+
* probes (`searchTuningKeyProbes`);
|
|
13
|
+
* - a key whose document kind the entry's `appliesToKinds` excludes;
|
|
14
|
+
* - task-hint triggers: unreachable (`unreachable-trigger`) and identical
|
|
15
|
+
* trigger sets within one entry (`duplicate-trigger`);
|
|
16
|
+
* - `appliesToKinds` / `boostKinds` / `boostSources` naming no search kind or
|
|
17
|
+
* source;
|
|
18
|
+
* - the global ±cap discarding composed tuning (`cap-discards`, info).
|
|
19
|
+
*
|
|
20
|
+
* Dead units (a key that never fires, a hint that never applies) and
|
|
21
|
+
* unverifiable keys are reported as COVERAGE, so a verdict built on this lint
|
|
22
|
+
* can never read as a pass over them. Round 13: every unit is settled through
|
|
23
|
+
* THE liveness authority (`settleUnitLiveness`): a missing target whose every
|
|
24
|
+
* declaration is marked `{ weight, expectEmpty: true }` is intended-empty (an
|
|
25
|
+
* `acceptedBy: expectEmpty` acceptance, printed), and a marked key that now
|
|
26
|
+
* resolves went live (reported, never silently accepted).
|
|
27
|
+
*/
|
|
28
|
+
import { DEAD_SELECTOR_CAUSES, MARKABLE_UNIT_LISTS, MarkableUnitList, settleUnitLiveness, UnitDeadCause, UnitDeadWeight, UnitLivenessState, } from '@shrkcrft/core';
|
|
29
|
+
import { nearestIds } from "./nearest-id.js";
|
|
30
|
+
import { warmReferenceRegistries } from "./reference-registry.js";
|
|
31
|
+
import { searchDocumentReference } from "./search-document-id.js";
|
|
32
|
+
import { buildSearchIndex, SearchKind, SearchSource } from "./search-index.js";
|
|
33
|
+
import { searchTuningKeyProbes } from "./search-tuning-key-probes.js";
|
|
34
|
+
import { SearchTuningKeyStatus } from "./search-tuning-key-status.js";
|
|
35
|
+
import { loadSearchTuning, SEARCH_TUNING_BOOST_IDS, SEARCH_TUNING_TOTAL_CAP, tuningBoostFor, } from "./search-tuning-registry.js";
|
|
36
|
+
import { isReachableTuningTrigger } from "./tuning-query-tokens.js";
|
|
37
|
+
/** `cap-discards` issues before the rest collapse into one summary line. */
|
|
38
|
+
const CAP_DISCARD_ISSUE_CAP = 20;
|
|
39
|
+
const COVERAGE_SUBJECT = 'search tuning';
|
|
40
|
+
/** The observation list of a task hint (not markable — an unreachable trigger can never go live). */
|
|
41
|
+
const TASK_HINTS_LIST = 'taskHints';
|
|
42
|
+
const SEARCH_KINDS = Object.values(SearchKind);
|
|
43
|
+
const SEARCH_SOURCES = Object.values(SearchSource);
|
|
44
|
+
function signed(n) {
|
|
45
|
+
return `${n > 0 ? '+' : ''}${n}`;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* One distinct boost key, observed. Existence is the key RESOLVING; liveness
|
|
49
|
+
* adds that some declaring entry's `appliesToKinds` admits it. A key that can
|
|
50
|
+
* never fire whatever exists — unprefixed, an unknown kind, excluded by every
|
|
51
|
+
* declaring entry — is dead by SHAPE (`cause`): never markable.
|
|
52
|
+
*/
|
|
53
|
+
function keyObservation(key, list, r, admitted) {
|
|
54
|
+
const excluded = { cause: UnitDeadCause.Defect, deadReason: "its entry's appliesToKinds excludes the document's kind, so the boost never fires" };
|
|
55
|
+
switch (r.status) {
|
|
56
|
+
case SearchTuningKeyStatus.Resolved:
|
|
57
|
+
return admitted
|
|
58
|
+
? { list, unit: key, label: key, exists: true, live: true, liveBecause: `${r.referenceKind ?? 'the document'} "${r.id}" is registered` }
|
|
59
|
+
: { list, unit: key, label: `${key} (excluded by appliesToKinds)`, exists: true, live: false, ...excluded };
|
|
60
|
+
case SearchTuningKeyStatus.Missing:
|
|
61
|
+
return {
|
|
62
|
+
list,
|
|
63
|
+
unit: key,
|
|
64
|
+
label: `${key} (missing)`,
|
|
65
|
+
exists: false,
|
|
66
|
+
live: false,
|
|
67
|
+
deadReason: `no ${r.referenceKind ?? 'document'} "${r.id}" is registered`,
|
|
68
|
+
...(admitted ? {} : { cause: UnitDeadCause.Defect }),
|
|
69
|
+
};
|
|
70
|
+
case SearchTuningKeyStatus.Unverified:
|
|
71
|
+
return { list, unit: key, label: key, exists: undefined, live: undefined, ...(r.reason ? { deadReason: r.reason } : {}) };
|
|
72
|
+
default:
|
|
73
|
+
return {
|
|
74
|
+
list,
|
|
75
|
+
unit: key,
|
|
76
|
+
label: `${key} (${r.status})`,
|
|
77
|
+
exists: false,
|
|
78
|
+
live: false,
|
|
79
|
+
cause: UnitDeadCause.Defect,
|
|
80
|
+
deadReason: r.reason ?? 'a boost key is a search-document id `<kind>:<id>`, so it never matches a document',
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The marker a distinct key settles with — a reporter's aggregation over its
|
|
86
|
+
* declarations, never a state decision (THE settle decides). A missing target
|
|
87
|
+
* is intended-empty only when EVERY declaration of it is marked: an unmarked
|
|
88
|
+
* one is a boost that never fires, so the key stays judged. Any marker on a key
|
|
89
|
+
* that resolves is stale (went live) and is reported; a local marker is chosen
|
|
90
|
+
* over a pack one, so a stale LOCAL marker fails under `--fail-on-dead-units`.
|
|
91
|
+
*/
|
|
92
|
+
function keyMark(key, list, declarations, live) {
|
|
93
|
+
const marks = declarations.flatMap((d) => d.marks);
|
|
94
|
+
if (marks.length === 0)
|
|
95
|
+
return undefined;
|
|
96
|
+
const everyDeclarationMarked = declarations.every((d) => d.marks.length === d.lists.length);
|
|
97
|
+
if (!everyDeclarationMarked && !live)
|
|
98
|
+
return undefined;
|
|
99
|
+
const pick = marks.find((m) => m.packageName === undefined) ?? marks[0];
|
|
100
|
+
return {
|
|
101
|
+
list,
|
|
102
|
+
unit: key,
|
|
103
|
+
...(pick.reason !== undefined ? { reason: pick.reason } : {}),
|
|
104
|
+
...(pick.packageName !== undefined ? { packageName: pick.packageName } : {}),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
/** THE settle over every distinct boost key (Coverage weight: a dead key is a shortfall). */
|
|
108
|
+
function settleKeys(probes) {
|
|
109
|
+
const byKey = new Map();
|
|
110
|
+
for (const p of probes)
|
|
111
|
+
byKey.set(p.key, [...(byKey.get(p.key) ?? []), p]);
|
|
112
|
+
const observations = [];
|
|
113
|
+
const marks = [];
|
|
114
|
+
for (const [key, declarations] of byKey) {
|
|
115
|
+
const first = declarations[0];
|
|
116
|
+
const r = first.resolution;
|
|
117
|
+
const admitted = declarations.some((d) => d.excludedKind === undefined);
|
|
118
|
+
const list = first.lists[0] ?? SEARCH_TUNING_BOOST_IDS;
|
|
119
|
+
observations.push(keyObservation(key, list, r, admitted));
|
|
120
|
+
const mark = keyMark(key, list, declarations, r.status === SearchTuningKeyStatus.Resolved && admitted);
|
|
121
|
+
if (mark)
|
|
122
|
+
marks.push(mark);
|
|
123
|
+
}
|
|
124
|
+
const settled = settleUnitLiveness({
|
|
125
|
+
subject: COVERAGE_SUBJECT,
|
|
126
|
+
unitLabel: MARKABLE_UNIT_LISTS[MarkableUnitList.SearchTuningBoostIds].unitLabel,
|
|
127
|
+
weight: UnitDeadWeight.Coverage,
|
|
128
|
+
observations,
|
|
129
|
+
marks,
|
|
130
|
+
deadSummary: 'never fire or could not be checked',
|
|
131
|
+
});
|
|
132
|
+
return { settled, unitOf: new Map(settled.units.map((u) => [u.unit, u])) };
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Per key, every declaration that does NOT mark it (`<tuning id> <map>`) — why
|
|
136
|
+
* a marker on a missing target is not honoured (`keyMark`: an unmarked
|
|
137
|
+
* declaration is a boost that never fires, so the key stays judged). Named on
|
|
138
|
+
* the marked declaration's finding, so an ignored marker is never silent.
|
|
139
|
+
*/
|
|
140
|
+
function unmarkedDeclarations(probes) {
|
|
141
|
+
const out = new Map();
|
|
142
|
+
for (const p of probes) {
|
|
143
|
+
const marked = new Set(p.marks.map((m) => m.list));
|
|
144
|
+
for (const list of p.lists) {
|
|
145
|
+
if (!marked.has(list))
|
|
146
|
+
out.set(p.key, [...(out.get(p.key) ?? []), `${p.tuningId} ${list}`]);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return out;
|
|
150
|
+
}
|
|
151
|
+
/** One finding per (entry, key) — the same key in three task hints used to be three identical warnings. */
|
|
152
|
+
function lintKeys(probes, unitOf, issues) {
|
|
153
|
+
const unmarked = unmarkedDeclarations(probes);
|
|
154
|
+
for (const p of probes) {
|
|
155
|
+
const r = p.resolution;
|
|
156
|
+
const n = p.lists.length;
|
|
157
|
+
const times = n > 1 ? ` (declared ${n} times)` : '';
|
|
158
|
+
const didYouMean = r.suggestion ? ` Did you mean "${r.suggestion}"?` : '';
|
|
159
|
+
// A marker the settle could not honour (round 13): another declaration of
|
|
160
|
+
// the same missing key is unmarked. Said on the marked declaration.
|
|
161
|
+
const ignoredMarker = p.marks.length > 0 && (unmarked.get(p.key)?.length ?? 0) > 0
|
|
162
|
+
? ` Its expectEmpty marker is not honoured: the key is also declared unmarked (${(unmarked.get(p.key) ?? []).join(', ')}) — mark every declaration, or drop the unmarked one.`
|
|
163
|
+
: '';
|
|
164
|
+
const base = {
|
|
165
|
+
tuningId: p.tuningId,
|
|
166
|
+
...(p.sourceFile ? { source: p.sourceFile } : {}),
|
|
167
|
+
key: p.key,
|
|
168
|
+
status: r.status,
|
|
169
|
+
targetId: r.id,
|
|
170
|
+
occurrences: n,
|
|
171
|
+
...(r.referenceKind ? { referenceKind: r.referenceKind } : {}),
|
|
172
|
+
...(r.suggestion ? { suggestion: r.suggestion } : {}),
|
|
173
|
+
};
|
|
174
|
+
const unit = unitOf.get(p.key);
|
|
175
|
+
if (unit?.state === UnitLivenessState.IntendedEmpty) {
|
|
176
|
+
issues.push({ ...base, severity: 'info', code: 'target-intended-empty', message: `Search tuning "${p.tuningId}" boosts "${p.key}" — ${unit.message}` });
|
|
177
|
+
}
|
|
178
|
+
else if (r.status === SearchTuningKeyStatus.Missing) {
|
|
179
|
+
issues.push({
|
|
180
|
+
...base,
|
|
181
|
+
severity: 'warning',
|
|
182
|
+
code: 'target-missing',
|
|
183
|
+
message: `Search tuning "${p.tuningId}" boosts "${p.key}"${times}, but no ${r.referenceKind} "${r.id}" is registered, so the boost can never fire — ${DEAD_SELECTOR_CAUSES}.${didYouMean}${ignoredMarker}`,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
else if (r.status === SearchTuningKeyStatus.Unprefixed) {
|
|
187
|
+
issues.push({
|
|
188
|
+
...base,
|
|
189
|
+
severity: 'warning',
|
|
190
|
+
code: 'key-unprefixed',
|
|
191
|
+
message: `Search tuning "${p.tuningId}" boosts "${p.key}"${times}: boost keys are search-document ids (\`<kind>:<id>\`), so a bare id never matches a document and the boost never fires.${didYouMean || (r.reason ? ` (${r.reason})` : '')}`,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
else if (r.status === SearchTuningKeyStatus.UnknownKind) {
|
|
195
|
+
issues.push({
|
|
196
|
+
...base,
|
|
197
|
+
// The KEY is what is wrong — its right-hand id names nothing yet.
|
|
198
|
+
targetId: p.key,
|
|
199
|
+
severity: 'warning',
|
|
200
|
+
code: 'key-unknown-kind',
|
|
201
|
+
message: `Search tuning "${p.tuningId}" boosts "${p.key}"${times}: ${r.reason ?? 'unknown document kind'}, so the boost never fires.${didYouMean}`,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
if (unit?.state === UnitLivenessState.WentLive && p.marks.length > 0) {
|
|
205
|
+
issues.push({ ...base, severity: 'info', code: 'expect-empty-went-live', message: `Search tuning "${p.tuningId}" boosts "${p.key}" — ${unit.message}` });
|
|
206
|
+
}
|
|
207
|
+
if (p.excludedKind !== undefined) {
|
|
208
|
+
issues.push({
|
|
209
|
+
...base,
|
|
210
|
+
severity: 'warning',
|
|
211
|
+
code: 'boost-excluded-by-kind',
|
|
212
|
+
message: `Search tuning "${p.tuningId}" boosts "${p.key}", a ${p.excludedKind} document, but its appliesToKinds [${(p.appliesToKinds ?? []).join(', ')}] excludes ${p.excludedKind}, so the boost never fires.`,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
/** The task-hint findings, and one observation per hint for THE settle (a dead hint is dead by shape). */
|
|
218
|
+
function lintTriggers(entries, issues) {
|
|
219
|
+
const observations = [];
|
|
220
|
+
for (const e of entries) {
|
|
221
|
+
const source = e.sourceFile ? { source: e.sourceFile } : {};
|
|
222
|
+
const firstHintWith = new Map();
|
|
223
|
+
(e.taskHints ?? []).forEach((h, i) => {
|
|
224
|
+
const tokens = h.whenTokens ?? [];
|
|
225
|
+
const label = `${e.id} task hint #${i + 1}`;
|
|
226
|
+
const unit = `${e.id}#${i + 1}`;
|
|
227
|
+
// The declaration the finding is about (it names no id).
|
|
228
|
+
const field = `taskHints[${i}].whenTokens`;
|
|
229
|
+
if (tokens.length === 0) {
|
|
230
|
+
observations.push({
|
|
231
|
+
list: TASK_HINTS_LIST,
|
|
232
|
+
unit,
|
|
233
|
+
label: `${label} (no whenTokens)`,
|
|
234
|
+
exists: false,
|
|
235
|
+
live: false,
|
|
236
|
+
cause: UnitDeadCause.Defect,
|
|
237
|
+
deadReason: 'declares no whenTokens, so it never applies',
|
|
238
|
+
});
|
|
239
|
+
issues.push({
|
|
240
|
+
severity: 'warning',
|
|
241
|
+
code: 'unreachable-trigger',
|
|
242
|
+
tuningId: e.id,
|
|
243
|
+
...source,
|
|
244
|
+
field,
|
|
245
|
+
trigger: [],
|
|
246
|
+
message: `Search tuning "${e.id}" task hint #${i + 1} declares no whenTokens, so it never applies.`,
|
|
247
|
+
});
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
const unreachable = tokens.filter((t) => !isReachableTuningTrigger(t));
|
|
251
|
+
for (const t of unreachable) {
|
|
252
|
+
issues.push({
|
|
253
|
+
severity: 'warning',
|
|
254
|
+
code: 'unreachable-trigger',
|
|
255
|
+
tuningId: e.id,
|
|
256
|
+
...source,
|
|
257
|
+
field,
|
|
258
|
+
trigger: tokens,
|
|
259
|
+
message: `Search tuning "${e.id}" task hint #${i + 1} triggers on "${t}", which no query can produce (whitespace, a separator, or fewer than 2 characters), so the hint never applies.`,
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
observations.push(unreachable.length > 0
|
|
263
|
+
? {
|
|
264
|
+
list: TASK_HINTS_LIST,
|
|
265
|
+
unit,
|
|
266
|
+
label: `${label} [${tokens.join(', ')}]`,
|
|
267
|
+
exists: false,
|
|
268
|
+
live: false,
|
|
269
|
+
cause: UnitDeadCause.Defect,
|
|
270
|
+
deadReason: 'a whenToken no query can produce, so it never applies',
|
|
271
|
+
}
|
|
272
|
+
: { list: TASK_HINTS_LIST, unit, label, exists: true, live: true });
|
|
273
|
+
const signature = [...new Set(tokens)].sort().join(String.fromCharCode(0));
|
|
274
|
+
const first = firstHintWith.get(signature);
|
|
275
|
+
if (first === undefined) {
|
|
276
|
+
firstHintWith.set(signature, i);
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
issues.push({
|
|
280
|
+
severity: 'warning',
|
|
281
|
+
code: 'duplicate-trigger',
|
|
282
|
+
tuningId: e.id,
|
|
283
|
+
...source,
|
|
284
|
+
field,
|
|
285
|
+
trigger: tokens,
|
|
286
|
+
message: `Search tuning "${e.id}" task hints #${first + 1} and #${i + 1} trigger on the same tokens [${tokens.join(', ')}]: they always fire together and their boosts sum toward the ±${SEARCH_TUNING_TOTAL_CAP} cap. Merge them.`,
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
return observations;
|
|
292
|
+
}
|
|
293
|
+
function lintVocabulary(entries, issues) {
|
|
294
|
+
const suggest = (value, pool) => {
|
|
295
|
+
const near = nearestIds(value, pool, 1)[0];
|
|
296
|
+
return near ? { suggestion: near.id } : {};
|
|
297
|
+
};
|
|
298
|
+
for (const e of entries) {
|
|
299
|
+
const source = e.sourceFile ? { source: e.sourceFile } : {};
|
|
300
|
+
for (const kind of e.appliesToKinds ?? []) {
|
|
301
|
+
if (SEARCH_KINDS.includes(kind))
|
|
302
|
+
continue;
|
|
303
|
+
issues.push({
|
|
304
|
+
severity: 'warning',
|
|
305
|
+
code: 'unknown-kind',
|
|
306
|
+
tuningId: e.id,
|
|
307
|
+
...source,
|
|
308
|
+
field: 'appliesToKinds',
|
|
309
|
+
...suggest(kind, SEARCH_KINDS),
|
|
310
|
+
message: `Search tuning "${e.id}" appliesToKinds names "${kind}", which is not a search kind (${SEARCH_KINDS.join(', ')}), so it admits no document.`,
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
// One issue per kind name; `field` names the first task hint declaring it.
|
|
314
|
+
const boostKinds = new Map();
|
|
315
|
+
(e.taskHints ?? []).forEach((h, i) => {
|
|
316
|
+
for (const k of Object.keys(h.boostKinds ?? {}))
|
|
317
|
+
if (!boostKinds.has(k))
|
|
318
|
+
boostKinds.set(k, i);
|
|
319
|
+
});
|
|
320
|
+
for (const [kind, hint] of boostKinds) {
|
|
321
|
+
if (SEARCH_KINDS.includes(kind))
|
|
322
|
+
continue;
|
|
323
|
+
issues.push({
|
|
324
|
+
severity: 'warning',
|
|
325
|
+
code: 'unknown-kind',
|
|
326
|
+
tuningId: e.id,
|
|
327
|
+
...source,
|
|
328
|
+
field: `taskHints[${hint}].boostKinds`,
|
|
329
|
+
...suggest(kind, SEARCH_KINDS),
|
|
330
|
+
message: `Search tuning "${e.id}" taskHints boostKinds names "${kind}", which is not a search kind, so the boost never fires.`,
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
for (const src of Object.keys(e.boostSources ?? {})) {
|
|
334
|
+
if (SEARCH_SOURCES.includes(src))
|
|
335
|
+
continue;
|
|
336
|
+
issues.push({
|
|
337
|
+
severity: 'warning',
|
|
338
|
+
code: 'unknown-source',
|
|
339
|
+
tuningId: e.id,
|
|
340
|
+
...source,
|
|
341
|
+
field: 'boostSources',
|
|
342
|
+
...suggest(src, SEARCH_SOURCES),
|
|
343
|
+
message: `Search tuning "${e.id}" boostSources names "${src}", which is not a search source (${SEARCH_SOURCES.join(', ')}), so the boost never fires.`,
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* The total cap, made visible. A cheap worst case (every reachable task hint
|
|
350
|
+
* firing at once) finds the candidate documents; each is then re-scored under
|
|
351
|
+
* the queries that can REALLY happen together — no tokens (ambient boosts
|
|
352
|
+
* only) and each task hint's own trigger set — so a document boosted by
|
|
353
|
+
* mutually exclusive triggers (`java` / `python` / `go`) is not flagged.
|
|
354
|
+
*/
|
|
355
|
+
function lintCap(inspection, entries, issues) {
|
|
356
|
+
const triggerSets = [[]];
|
|
357
|
+
const everything = new Set();
|
|
358
|
+
for (const e of entries) {
|
|
359
|
+
for (const h of e.taskHints ?? []) {
|
|
360
|
+
const tokens = (h.whenTokens ?? []).map((t) => t.toLowerCase());
|
|
361
|
+
if (tokens.length === 0 || !tokens.every((t) => isReachableTuningTrigger(t)))
|
|
362
|
+
continue;
|
|
363
|
+
triggerSets.push(tokens);
|
|
364
|
+
for (const t of tokens)
|
|
365
|
+
everything.add(t);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
const worstCase = [...everything];
|
|
369
|
+
let reported = 0;
|
|
370
|
+
let more = 0;
|
|
371
|
+
for (const doc of buildSearchIndex(inspection)) {
|
|
372
|
+
const subject = { id: doc.id, kind: doc.kind, ...(doc.tags ? { tags: doc.tags } : {}), source: doc.source };
|
|
373
|
+
if (!tuningBoostFor(subject, worstCase, entries).capped)
|
|
374
|
+
continue;
|
|
375
|
+
let worst;
|
|
376
|
+
for (const tokens of triggerSets) {
|
|
377
|
+
const boost = tuningBoostFor(subject, tokens, entries);
|
|
378
|
+
if (!boost.capped)
|
|
379
|
+
continue;
|
|
380
|
+
if (worst && Math.abs(boost.capped.raw) <= Math.abs(worst.raw))
|
|
381
|
+
continue;
|
|
382
|
+
const contributors = [
|
|
383
|
+
...new Set((boost.composition ?? []).flatMap((c) => c.contributors.map((x) => x.tuningId))),
|
|
384
|
+
].sort();
|
|
385
|
+
worst = { raw: boost.capped.raw, applied: boost.capped.applied, tokens, contributors };
|
|
386
|
+
}
|
|
387
|
+
if (!worst)
|
|
388
|
+
continue;
|
|
389
|
+
if (reported >= CAP_DISCARD_ISSUE_CAP) {
|
|
390
|
+
more += 1;
|
|
391
|
+
continue;
|
|
392
|
+
}
|
|
393
|
+
reported += 1;
|
|
394
|
+
const discarded = Math.abs(worst.raw - worst.applied);
|
|
395
|
+
const query = worst.tokens.length > 0 ? `a query containing [${worst.tokens.join(', ')}]` : 'every query';
|
|
396
|
+
// The document EXISTS (the index built it): name it in its registry when
|
|
397
|
+
// its prefix has one, so no consumer labels it an unknown id.
|
|
398
|
+
const ref = searchDocumentReference(doc.id);
|
|
399
|
+
issues.push({
|
|
400
|
+
severity: 'info',
|
|
401
|
+
code: 'cap-discards',
|
|
402
|
+
tuningId: worst.contributors.join('+') || '(combined)',
|
|
403
|
+
docId: doc.id,
|
|
404
|
+
...(ref ? { referenceKind: ref.referenceKind, targetId: ref.id } : {}),
|
|
405
|
+
discarded,
|
|
406
|
+
message: `Tuning on "${doc.id}" composes to ${signed(worst.raw)} for ${query}; the ±${SEARCH_TUNING_TOTAL_CAP} total cap discards ${discarded} (from ${worst.contributors.join(', ')}).`,
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
if (more > 0) {
|
|
410
|
+
issues.push({
|
|
411
|
+
severity: 'info',
|
|
412
|
+
code: 'cap-discards',
|
|
413
|
+
tuningId: '(combined)',
|
|
414
|
+
moreDocuments: more,
|
|
415
|
+
message: `… and ${more} more document(s) whose tuning exceeds the ±${SEARCH_TUNING_TOTAL_CAP} total cap.`,
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Lint every loaded search-tuning entry. Loads the tuning and warms the
|
|
421
|
+
* reference registries itself (a warm without a resolver keeps the command
|
|
422
|
+
* resolver the CLI already injected).
|
|
423
|
+
*/
|
|
424
|
+
export async function lintSearchTuning(inspection) {
|
|
425
|
+
const { entries } = await loadSearchTuning(inspection);
|
|
426
|
+
await warmReferenceRegistries(inspection);
|
|
427
|
+
const keyProbes = searchTuningKeyProbes(inspection, entries);
|
|
428
|
+
const keys = settleKeys(keyProbes);
|
|
429
|
+
const issues = [];
|
|
430
|
+
lintKeys(keyProbes, keys.unitOf, issues);
|
|
431
|
+
const hints = settleUnitLiveness({
|
|
432
|
+
subject: COVERAGE_SUBJECT,
|
|
433
|
+
unitLabel: 'task hints',
|
|
434
|
+
weight: UnitDeadWeight.Coverage,
|
|
435
|
+
observations: lintTriggers(entries, issues),
|
|
436
|
+
marks: [],
|
|
437
|
+
deadSummary: 'can never apply (a whenToken no query produces, or none at all)',
|
|
438
|
+
});
|
|
439
|
+
lintVocabulary(entries, issues);
|
|
440
|
+
lintCap(inspection, entries, issues);
|
|
441
|
+
const probes = { probed: 0, resolved: 0, missing: 0, unprefixed: 0, unknownKind: 0, unverified: 0 };
|
|
442
|
+
for (const u of keys.settled.units) {
|
|
443
|
+
const status = keyProbes.find((p) => p.key === u.unit)?.resolution.status;
|
|
444
|
+
probes.probed += 1;
|
|
445
|
+
if (status === SearchTuningKeyStatus.Resolved)
|
|
446
|
+
probes.resolved += 1;
|
|
447
|
+
else if (status === SearchTuningKeyStatus.Missing)
|
|
448
|
+
probes.missing += 1;
|
|
449
|
+
else if (status === SearchTuningKeyStatus.Unprefixed)
|
|
450
|
+
probes.unprefixed += 1;
|
|
451
|
+
else if (status === SearchTuningKeyStatus.UnknownKind)
|
|
452
|
+
probes.unknownKind += 1;
|
|
453
|
+
else
|
|
454
|
+
probes.unverified += 1;
|
|
455
|
+
}
|
|
456
|
+
return {
|
|
457
|
+
entries: entries.length,
|
|
458
|
+
issues,
|
|
459
|
+
probes,
|
|
460
|
+
coverage: [...keys.settled.coverage, ...hints.coverage],
|
|
461
|
+
deadUnits: [
|
|
462
|
+
...keys.settled.dead.map((u) => `search-tuning key ${u.label}`),
|
|
463
|
+
...hints.dead.map((u) => `search-tuning ${u.label}`),
|
|
464
|
+
],
|
|
465
|
+
liveness: [keys.settled, hints],
|
|
466
|
+
keyProbes,
|
|
467
|
+
};
|
|
468
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ISearchTuning } from '@shrkcrft/plugin-api';
|
|
2
2
|
import type { ISharkcraftInspection } from './sharkcraft-inspector.js';
|
|
3
|
+
import { type IRejectedEntry } from '@shrkcrft/core';
|
|
3
4
|
export declare const SEARCH_TUNING_SCHEMA = "sharkcraft.search-tuning-registry/v1";
|
|
4
5
|
export interface ISearchTuningEntry extends ISearchTuning {
|
|
5
6
|
source: 'local' | 'pack';
|
|
@@ -12,10 +13,43 @@ export interface ISearchTuningDoctorIssue {
|
|
|
12
13
|
message: string;
|
|
13
14
|
tuningId?: string;
|
|
14
15
|
source?: string;
|
|
16
|
+
/** `boost-clamped`: the boost key that was clamped. */
|
|
17
|
+
key?: string;
|
|
18
|
+
/**
|
|
19
|
+
* `boost-clamped`: the map the key came from — `boostIds`, `boostTags`,
|
|
20
|
+
* `boostSources`, `taskHints[<i>].boostIds|boostTags|boostKinds`. Only a
|
|
21
|
+
* `boostIds` key is a search-document id; the rest are tag / source / kind
|
|
22
|
+
* names, which no id registry lists.
|
|
23
|
+
*/
|
|
24
|
+
field?: string;
|
|
25
|
+
/** `boost-clamped`: the declared value. */
|
|
26
|
+
original?: number;
|
|
27
|
+
/** `boost-clamped`: the value applied. */
|
|
28
|
+
clamped?: number;
|
|
15
29
|
}
|
|
30
|
+
/** The per-boost clamp: every single boost value is clamped to ±this. */
|
|
31
|
+
export declare const SEARCH_TUNING_BOOST_CLAMP = 5;
|
|
32
|
+
/** The global cap: the total tuning delta on ONE document is clamped to ±this. */
|
|
33
|
+
export declare const SEARCH_TUNING_TOTAL_CAP: number;
|
|
34
|
+
/** THE list paths of the markable boost maps — the loader's marks and the lint's observations share them. */
|
|
35
|
+
export declare const SEARCH_TUNING_BOOST_IDS: string;
|
|
36
|
+
/** `taskHints[<i>].boostIds` — THE path a task hint's marks and observations are keyed by. */
|
|
37
|
+
export declare function searchTuningTaskHintBoostIdsPath(index: number): string;
|
|
38
|
+
/**
|
|
39
|
+
* THE search-tuning acceptance predicate (round 12, 12.1; round 13): a
|
|
40
|
+
* non-empty string `id`, and — so an older engine's silent clamp-to-0 can never
|
|
41
|
+
* recur here — every boost value a number (or, in `boostIds` /
|
|
42
|
+
* `taskHints[].boostIds`, a well-formed `{ weight, expectEmpty: true, reason? }`
|
|
43
|
+
* marker on a key that can fire), `taskHints` an array of objects with string
|
|
44
|
+
* `whenTokens`, and no authored `expectEmptyUnits` (the loader derives it).
|
|
45
|
+
* `[]` means accepted.
|
|
46
|
+
*/
|
|
47
|
+
export declare function searchTuningRejectionReasons(raw: unknown): readonly string[];
|
|
16
48
|
export declare function loadSearchTuning(inspection: ISharkcraftInspection): Promise<{
|
|
17
49
|
entries: readonly ISearchTuningEntry[];
|
|
18
50
|
issues: readonly ISearchTuningDoctorIssue[];
|
|
51
|
+
/** Every declared tuning entry the loader refused (round 12, 12.1). */
|
|
52
|
+
rejected: readonly IRejectedEntry[];
|
|
19
53
|
}>;
|
|
20
54
|
export declare function listSearchTuning(inspection: ISharkcraftInspection): readonly ISearchTuningEntry[];
|
|
21
55
|
export declare function listSearchTuningIssues(inspection: ISharkcraftInspection): readonly ISearchTuningDoctorIssue[];
|
|
@@ -24,6 +58,15 @@ export interface ISearchTuningBoost {
|
|
|
24
58
|
reasons: string[];
|
|
25
59
|
/** Per-key contributors and the merge strategy applied to each key. */
|
|
26
60
|
composition?: readonly ISearchTuningComposition[];
|
|
61
|
+
/**
|
|
62
|
+
* Set when the global ±{@link SEARCH_TUNING_TOTAL_CAP} cap discarded part of
|
|
63
|
+
* the composed delta (`raw` → `applied`). The cap used to apply silently
|
|
64
|
+
* while the per-boost clamp emitted a diagnostic.
|
|
65
|
+
*/
|
|
66
|
+
capped?: {
|
|
67
|
+
readonly raw: number;
|
|
68
|
+
readonly applied: number;
|
|
69
|
+
};
|
|
27
70
|
}
|
|
28
71
|
export interface ISearchTuningContribution {
|
|
29
72
|
tuningId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-tuning-registry.d.ts","sourceRoot":"","sources":["../src/search-tuning-registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"search-tuning-registry.d.ts","sourceRoot":"","sources":["../src/search-tuning-registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAmB,aAAa,EAAsB,MAAM,sBAAsB,CAAC;AAC/F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAaL,KAAK,cAAc,EAEpB,MAAM,gBAAgB,CAAC;AAQxB,eAAO,MAAM,oBAAoB,yCAAyC,CAAC;AAE3E,MAAM,WAAW,kBAAmB,SAAQ,aAAa;IACvD,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAaD,yEAAyE;AACzE,eAAO,MAAM,yBAAyB,IAAY,CAAC;AAEnD,kFAAkF;AAClF,eAAO,MAAM,uBAAuB,QAAgB,CAAC;AAMrD,6GAA6G;AAC7G,eAAO,MAAM,uBAAuB,QAAsE,CAAC;AAG3G,8FAA8F;AAC9F,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEtE;AAkDD;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAmC5E;AAsJD,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,qBAAqB,GAChC,OAAO,CAAC;IACT,OAAO,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACvC,MAAM,EAAE,SAAS,wBAAwB,EAAE,CAAC;IAC5C,uEAAuE;IACvE,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;CACrC,CAAC,CAqED;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,qBAAqB,GAAG,SAAS,kBAAkB,EAAE,CAGjG;AAED,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,qBAAqB,GAAG,SAAS,wBAAwB,EAAE,CAG7G;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,uEAAuE;IACvE,WAAW,CAAC,EAAE,SAAS,wBAAwB,EAAE,CAAC;IAClD;;;;OAIG;IACH,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7D;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC,gFAAgF;IAChF,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,KAAK,GAAG,KAAK,CAAC;IACxB,YAAY,EAAE,SAAS,yBAAyB,EAAE,CAAC;IACnD,qEAAqE;IACrE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAqBD;;;;;;;iCAOiC;AACjC,wBAAgB,cAAc,CAC5B,GAAG,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAC3E,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,OAAO,EAAE,SAAS,kBAAkB,EAAE,GACrC,kBAAkB,CA2GpB"}
|