@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
|
@@ -8,10 +8,13 @@
|
|
|
8
8
|
* Read-only: hints can be listed, fetched by id, validated, and previewed
|
|
9
9
|
* against the live file system, but the engine never auto-applies them.
|
|
10
10
|
*/
|
|
11
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
11
|
+
import { existsSync, readFileSync, readdirSync } from 'node:fs';
|
|
12
12
|
import * as nodePath from 'node:path';
|
|
13
|
-
import { validateRegistrationHint, } from '@shrkcrft/plugin-api';
|
|
14
|
-
import {
|
|
13
|
+
import { normalizeRegistrationHint, validateRegistrationHint, } from '@shrkcrft/plugin-api';
|
|
14
|
+
import { SKIP_DIRS } from '@shrkcrft/boundaries';
|
|
15
|
+
import { DEAD_SELECTOR_CAUSES, importModuleViaLoader, MARKABLE_UNIT_LISTS, MarkableUnitList, normalizeUnitList, normalizeUnitScalar, qualifyListPath, qualifyUnitMarks, readContributionExport, RejectionCause, settleUnitLiveness, UnitDeadCause, UnitDeadWeight, UnitLivenessState, unitProblemsOf, } from '@shrkcrft/core';
|
|
16
|
+
import { substitutePlaceholders } from "./substitute-placeholders.js";
|
|
17
|
+
import { RegistrationHintDiscoveryStatus } from "./registration-hint-discovery-status.js";
|
|
15
18
|
export const REGISTRATION_HINT_REGISTRY_SCHEMA = 'sharkcraft.registration-hint-registry/v1';
|
|
16
19
|
export var RegistrationHintSource;
|
|
17
20
|
(function (RegistrationHintSource) {
|
|
@@ -19,15 +22,20 @@ export var RegistrationHintSource;
|
|
|
19
22
|
RegistrationHintSource["Pack"] = "pack";
|
|
20
23
|
RegistrationHintSource["Fixture"] = "fixture";
|
|
21
24
|
})(RegistrationHintSource || (RegistrationHintSource = {}));
|
|
22
|
-
async function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
async function importHints(file) {
|
|
26
|
+
return readContributionExport(await importModuleViaLoader(file), { namedKeys: ['registrationHints'] });
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* THE registration-hint acceptance predicate (round 12, 12.1): every issue of
|
|
30
|
+
* `validateRegistrationHint`, `<field>: <message>` — `[]` means accepted.
|
|
31
|
+
*/
|
|
32
|
+
export function registrationHintRejectionReasons(raw) {
|
|
33
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw))
|
|
34
|
+
return ['(entry): must be an object'];
|
|
35
|
+
const v = validateRegistrationHint(raw);
|
|
36
|
+
if (v.valid)
|
|
37
|
+
return [];
|
|
38
|
+
return v.issues.length > 0 ? v.issues.map((i) => `${i.field}: ${i.message}`) : ['(entry): failed validation'];
|
|
31
39
|
}
|
|
32
40
|
function localFiles(inspection) {
|
|
33
41
|
const out = [];
|
|
@@ -39,54 +47,71 @@ function localFiles(inspection) {
|
|
|
39
47
|
if (existsSync(abs))
|
|
40
48
|
out.push(abs);
|
|
41
49
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
50
|
+
// More hint files come from pack manifests (`registrationHintFiles`, loaded
|
|
51
|
+
// below) — there is no local-config key for them; the strict config schema
|
|
52
|
+
// rejects one, so a local read here could never be reached.
|
|
46
53
|
return out;
|
|
47
54
|
}
|
|
48
55
|
export async function loadRegistrationHints(inspection) {
|
|
49
56
|
const entries = [];
|
|
50
57
|
const issues = [];
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
const rejected = [];
|
|
59
|
+
const seen = new Map();
|
|
60
|
+
const ingest = (raw, source, packageName, sourceFile, at) => {
|
|
61
|
+
const rawId = raw && typeof raw === 'object' ? raw.id : undefined;
|
|
62
|
+
const hintId = typeof rawId === 'string' ? rawId : undefined;
|
|
63
|
+
// THE acceptance predicate, then THE normaliser (round 13): markers in
|
|
64
|
+
// `discovery` become plain strings + the `expectEmptyUnits` ledger, stamped
|
|
65
|
+
// with the contributing pack. A normaliser refusal is a rejection too —
|
|
66
|
+
// never a crash further down (`glob.includes is not a function`).
|
|
67
|
+
const invalid = registrationHintRejectionReasons(raw);
|
|
68
|
+
const normalized = invalid.length === 0 ? normalizeRegistrationHint(raw, packageName) : undefined;
|
|
69
|
+
const reasons = invalid.length > 0 ? invalid : normalized !== undefined && !normalized.ok ? unitProblemsOf(normalized.error) : [];
|
|
70
|
+
if (normalized === undefined || !normalized.ok) {
|
|
71
|
+
for (const r of reasons) {
|
|
72
|
+
issues.push({ severity: 'error', code: 'invalid-hint', message: r, hintId, source: sourceFile });
|
|
63
73
|
}
|
|
74
|
+
rejected.push({ ...at, ...(hintId !== undefined ? { entryId: hintId } : {}), reasons, cause: RejectionCause.Invalid });
|
|
64
75
|
return;
|
|
65
76
|
}
|
|
66
|
-
|
|
77
|
+
const hint = normalized.value;
|
|
78
|
+
const prev = seen.get(hint.id);
|
|
79
|
+
if (prev !== undefined) {
|
|
67
80
|
issues.push({
|
|
68
81
|
severity: 'error',
|
|
69
82
|
code: 'duplicate-id',
|
|
70
|
-
message: `Registration hint "${
|
|
71
|
-
hintId:
|
|
83
|
+
message: `Registration hint "${hint.id}" already loaded; skipping ${sourceFile}.`,
|
|
84
|
+
hintId: hint.id,
|
|
72
85
|
source: sourceFile,
|
|
73
86
|
});
|
|
87
|
+
rejected.push({
|
|
88
|
+
...at,
|
|
89
|
+
entryId: hint.id,
|
|
90
|
+
reasons: [`id: "${hint.id}" is already declared in ${prev}`],
|
|
91
|
+
cause: RejectionCause.DuplicateId,
|
|
92
|
+
});
|
|
74
93
|
return;
|
|
75
94
|
}
|
|
76
|
-
seen.
|
|
95
|
+
seen.set(hint.id, sourceFile);
|
|
77
96
|
entries.push({
|
|
78
|
-
hint
|
|
97
|
+
hint,
|
|
79
98
|
source,
|
|
80
99
|
...(packageName ? { packageName } : {}),
|
|
81
100
|
sourceFile,
|
|
82
101
|
});
|
|
83
102
|
};
|
|
103
|
+
const ingestAll = (exp, file, source, packageName, sourceFile) => {
|
|
104
|
+
exp.items.forEach((h, i) => ingest(h, source, packageName, sourceFile, {
|
|
105
|
+
file,
|
|
106
|
+
index: exp.single ? -1 : i,
|
|
107
|
+
...(exp.exportName ? { exportName: exp.exportName } : {}),
|
|
108
|
+
}));
|
|
109
|
+
};
|
|
84
110
|
for (const file of localFiles(inspection)) {
|
|
85
111
|
try {
|
|
86
|
-
const
|
|
112
|
+
const exp = await importHints(file);
|
|
87
113
|
const rel = nodePath.relative(inspection.projectRoot, file) || file;
|
|
88
|
-
|
|
89
|
-
ingest(h, RegistrationHintSource.Local, undefined, rel);
|
|
114
|
+
ingestAll(exp, file, RegistrationHintSource.Local, undefined, rel);
|
|
90
115
|
}
|
|
91
116
|
catch (e) {
|
|
92
117
|
issues.push({
|
|
@@ -111,9 +136,7 @@ export async function loadRegistrationHints(inspection) {
|
|
|
111
136
|
continue;
|
|
112
137
|
}
|
|
113
138
|
try {
|
|
114
|
-
|
|
115
|
-
for (const h of list)
|
|
116
|
-
ingest(h, RegistrationHintSource.Pack, pack.packageName, rel);
|
|
139
|
+
ingestAll(await importHints(file), file, RegistrationHintSource.Pack, pack.packageName, rel);
|
|
117
140
|
}
|
|
118
141
|
catch (e) {
|
|
119
142
|
issues.push({
|
|
@@ -125,7 +148,7 @@ export async function loadRegistrationHints(inspection) {
|
|
|
125
148
|
}
|
|
126
149
|
}
|
|
127
150
|
}
|
|
128
|
-
return { entries, issues };
|
|
151
|
+
return { entries, issues, rejected };
|
|
129
152
|
}
|
|
130
153
|
export async function listRegistrationHints(inspection) {
|
|
131
154
|
const { entries } = await loadRegistrationHints(inspection);
|
|
@@ -148,16 +171,20 @@ export async function previewRegistrationHint(inspection, hintId, options = {})
|
|
|
148
171
|
// candidates from globs on the live file system.
|
|
149
172
|
let targetFile = null;
|
|
150
173
|
let candidates = [];
|
|
174
|
+
let discoveryCapped = false;
|
|
151
175
|
if (hint.discovery.targetFile) {
|
|
152
176
|
targetFile = hint.discovery.targetFile;
|
|
153
177
|
candidates = [hint.discovery.targetFile];
|
|
154
178
|
}
|
|
155
179
|
else if (hint.discovery.targetGlobs && hint.discovery.targetGlobs.length > 0) {
|
|
156
|
-
|
|
157
|
-
|
|
180
|
+
// THE discovery authority — the doctor classifies the same candidate set.
|
|
181
|
+
const found = resolveRegistrationHintCandidates(inspection, hint);
|
|
182
|
+
candidates = [...found.candidates];
|
|
183
|
+
discoveryCapped = found.capped;
|
|
184
|
+
if (candidates.length === 1 && !discoveryCapped)
|
|
158
185
|
targetFile = candidates[0];
|
|
159
186
|
}
|
|
160
|
-
const ambiguous = candidates.length !== 1;
|
|
187
|
+
const ambiguous = candidates.length !== 1 || discoveryCapped;
|
|
161
188
|
const requiresHumanReview = hint.requiresHumanReview === true || ambiguous;
|
|
162
189
|
const renderedOps = hint.operations.map((op) => {
|
|
163
190
|
const description = describeOp(op);
|
|
@@ -183,68 +210,109 @@ export async function previewRegistrationHint(inspection, hintId, options = {})
|
|
|
183
210
|
nextCommand: ambiguous
|
|
184
211
|
? `# Multiple candidates — pick one and apply manually.`
|
|
185
212
|
: `# Preview only. Apply manually after human review.`,
|
|
213
|
+
...(discoveryCapped ? { discoveryCapped: true } : {}),
|
|
186
214
|
};
|
|
187
215
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
216
|
+
/** Directories one glob's discovery walk visits before it reports `capped`. */
|
|
217
|
+
const DISCOVERY_DIR_CAP = 5000;
|
|
218
|
+
/** One glob against the live tree: the preview's own dialect (`*`, `**`, else literal). */
|
|
219
|
+
function walkDiscoveryGlob(projectRoot, glob) {
|
|
220
|
+
if (!glob.includes('*')) {
|
|
221
|
+
return { files: existsSync(nodePath.join(projectRoot, glob)) ? [glob] : [], capped: false };
|
|
222
|
+
}
|
|
223
|
+
const baseSegments = [];
|
|
224
|
+
for (const seg of glob.split('/')) {
|
|
225
|
+
if (seg.includes('*'))
|
|
226
|
+
break;
|
|
227
|
+
baseSegments.push(seg);
|
|
228
|
+
}
|
|
229
|
+
const base = baseSegments.length > 0 ? nodePath.join(projectRoot, ...baseSegments) : projectRoot;
|
|
230
|
+
// Replace `**` with a placeholder BEFORE escaping; then escape special chars;
|
|
231
|
+
// then convert single `*` and the placeholder.
|
|
232
|
+
const escaped = glob
|
|
233
|
+
.replace(/\*\*/g, '___DOUBLESTAR___')
|
|
234
|
+
.replace(/[.+?^${}()|[\]\\]/g, '\\$&')
|
|
235
|
+
.replace(/\*/g, '[^/]*')
|
|
236
|
+
.replace(/___DOUBLESTAR___/g, '.*');
|
|
237
|
+
let re;
|
|
238
|
+
try {
|
|
239
|
+
re = new RegExp('^' + escaped + '$');
|
|
240
|
+
}
|
|
241
|
+
catch {
|
|
242
|
+
return { files: [], capped: false };
|
|
243
|
+
}
|
|
244
|
+
if (!existsSync(base))
|
|
245
|
+
return { files: [], capped: false };
|
|
246
|
+
const files = [];
|
|
247
|
+
const stack = [base];
|
|
248
|
+
let visited = 0;
|
|
249
|
+
while (stack.length > 0) {
|
|
250
|
+
// A truncated walk is REPORTED — a zero from a capped walk is not a dead glob.
|
|
251
|
+
if (visited >= DISCOVERY_DIR_CAP)
|
|
252
|
+
return { files, capped: true };
|
|
253
|
+
const dir = stack.pop();
|
|
254
|
+
visited += 1;
|
|
213
255
|
try {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
if (!existsSync(base))
|
|
221
|
-
continue;
|
|
222
|
-
// Walk the base directory looking for matches (capped, deterministic).
|
|
223
|
-
const stack = [base];
|
|
224
|
-
let safety = 0;
|
|
225
|
-
while (stack.length > 0 && safety < 5000) {
|
|
226
|
-
const dir = stack.pop();
|
|
227
|
-
safety += 1;
|
|
228
|
-
try {
|
|
229
|
-
const { readdirSync } = await import('node:fs');
|
|
230
|
-
const entries = readdirSync(dir, { withFileTypes: true });
|
|
231
|
-
for (const e of entries) {
|
|
232
|
-
const next = nodePath.join(dir, String(e.name));
|
|
233
|
-
if (e.isDirectory())
|
|
256
|
+
for (const e of readdirSync(dir, { withFileTypes: true })) {
|
|
257
|
+
const name = String(e.name);
|
|
258
|
+
const next = nodePath.join(dir, name);
|
|
259
|
+
// The shared vendor/build/VCS skip list: node_modules is never walked.
|
|
260
|
+
if (e.isDirectory()) {
|
|
261
|
+
if (!SKIP_DIRS.has(name))
|
|
234
262
|
stack.push(next);
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
263
|
+
}
|
|
264
|
+
else if (e.isFile()) {
|
|
265
|
+
const rel = nodePath.relative(projectRoot, next).split(nodePath.sep).join('/');
|
|
266
|
+
if (re.test(rel))
|
|
267
|
+
files.push(rel);
|
|
240
268
|
}
|
|
241
269
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
270
|
+
}
|
|
271
|
+
catch {
|
|
272
|
+
// an unreadable directory contributes nothing
|
|
245
273
|
}
|
|
246
274
|
}
|
|
247
|
-
return
|
|
275
|
+
return { files, capped: false };
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* THE discovery authority for a registration hint: `registrations preview`
|
|
279
|
+
* acts on it and the doctor classifies it, so "what would this hint target?"
|
|
280
|
+
* has one answer. A fixed `targetFile` counts as a candidate only when it
|
|
281
|
+
* exists (preview still names it either way).
|
|
282
|
+
*/
|
|
283
|
+
export function resolveRegistrationHintCandidates(inspection, hint) {
|
|
284
|
+
// Idempotent defensive normalisation (round 13): a loaded hint is plain
|
|
285
|
+
// already; a hand-built one carrying `{ pattern, expectEmpty }` markers is
|
|
286
|
+
// read by its unit instead of crashing the walk (`glob.includes`).
|
|
287
|
+
const discovery = hint.discovery ?? {};
|
|
288
|
+
const fileUnit = discovery.targetFile !== undefined ? normalizeUnitScalar(discovery.targetFile, TARGET_FILE) : undefined;
|
|
289
|
+
const targetFile = fileUnit?.ok ? fileUnit.value.unit : undefined;
|
|
290
|
+
const globUnits = discovery.targetGlobs !== undefined ? normalizeUnitList(discovery.targetGlobs, TARGET_GLOBS) : undefined;
|
|
291
|
+
const targetGlobs = globUnits?.ok
|
|
292
|
+
? globUnits.value.units
|
|
293
|
+
: (discovery.targetGlobs ?? []).filter((g) => typeof g === 'string');
|
|
294
|
+
if (targetFile) {
|
|
295
|
+
const exists = existsSync(nodePath.join(inspection.projectRoot, targetFile));
|
|
296
|
+
return {
|
|
297
|
+
mode: 'fixed',
|
|
298
|
+
candidates: exists ? [targetFile] : [],
|
|
299
|
+
perGlob: [{ glob: targetFile, matched: exists ? 1 : 0 }],
|
|
300
|
+
capped: false,
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
if (!targetGlobs || targetGlobs.length === 0) {
|
|
304
|
+
return { mode: 'none', candidates: [], perGlob: [], capped: false };
|
|
305
|
+
}
|
|
306
|
+
const all = [];
|
|
307
|
+
const perGlob = [];
|
|
308
|
+
let capped = false;
|
|
309
|
+
for (const glob of targetGlobs) {
|
|
310
|
+
const r = walkDiscoveryGlob(inspection.projectRoot, glob);
|
|
311
|
+
perGlob.push({ glob, matched: r.files.length });
|
|
312
|
+
all.push(...r.files);
|
|
313
|
+
capped = capped || r.capped;
|
|
314
|
+
}
|
|
315
|
+
return { mode: 'glob', candidates: [...new Set(all)], perGlob, capped };
|
|
248
316
|
}
|
|
249
317
|
function describeOp(op) {
|
|
250
318
|
switch (op.kind) {
|
|
@@ -268,52 +336,202 @@ function describeOp(op) {
|
|
|
268
336
|
return `export${op.symbols ? ` { ${op.symbols.join(', ')} }` : ''} from "${op.from ?? '?'}"`;
|
|
269
337
|
}
|
|
270
338
|
}
|
|
339
|
+
/** THE placeholder substitution, shared with pack-helper plans. */
|
|
271
340
|
function substituteVars(snippet, vars) {
|
|
272
|
-
return snippet
|
|
341
|
+
return substitutePlaceholders(snippet, vars);
|
|
273
342
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
343
|
+
const TARGET_GLOBS = MARKABLE_UNIT_LISTS[MarkableUnitList.RegistrationHintTargetGlobs].listPath;
|
|
344
|
+
const TARGET_FILE = MARKABLE_UNIT_LISTS[MarkableUnitList.RegistrationHintTargetFile].listPath;
|
|
345
|
+
/** The list a discovery mode judges — a marker on the other list (a glob beside a fixed target) is never read. */
|
|
346
|
+
function judgedList(mode) {
|
|
347
|
+
return mode === 'fixed' ? TARGET_FILE : mode === 'glob' ? TARGET_GLOBS : undefined;
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* One observation per selector THE discovery authority judged: the fixed
|
|
351
|
+
* target, or each glob. Existence and liveness are one predicate here (a file
|
|
352
|
+
* matches, or none does); a zero from a capped walk is unproven, never dead.
|
|
353
|
+
*/
|
|
354
|
+
function discoveryObservations(hint, found) {
|
|
355
|
+
if (found.mode === 'none') {
|
|
356
|
+
return [
|
|
357
|
+
{
|
|
358
|
+
list: qualifyListPath(hint.id, 'discovery'),
|
|
359
|
+
unit: 'no discovery',
|
|
360
|
+
label: `${hint.id}: no discovery`,
|
|
361
|
+
exists: false,
|
|
362
|
+
live: false,
|
|
363
|
+
cause: UnitDeadCause.Defect,
|
|
364
|
+
deadReason: 'declares neither discovery.targetFile nor discovery.targetGlobs, so it can never target a file',
|
|
365
|
+
},
|
|
366
|
+
];
|
|
367
|
+
}
|
|
368
|
+
const fixed = found.mode === 'fixed';
|
|
369
|
+
const list = qualifyListPath(hint.id, fixed ? TARGET_FILE : TARGET_GLOBS);
|
|
370
|
+
return found.perGlob.map((g) => {
|
|
371
|
+
const seen = g.matched > 0 ? true : found.capped ? undefined : false;
|
|
372
|
+
return {
|
|
373
|
+
list,
|
|
374
|
+
unit: g.glob,
|
|
375
|
+
label: `${hint.id}: ${g.glob}`,
|
|
376
|
+
exists: seen,
|
|
377
|
+
live: seen,
|
|
378
|
+
matched: g.matched,
|
|
379
|
+
liveBecause: fixed ? 'the target file exists' : `matches ${g.matched} file(s)`,
|
|
380
|
+
deadReason: fixed ? 'the file is missing' : 'matched no file',
|
|
381
|
+
};
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
const STATUS_TOTAL = {
|
|
385
|
+
[RegistrationHintDiscoveryStatus.Verified]: 'verified',
|
|
386
|
+
[RegistrationHintDiscoveryStatus.Ambiguous]: 'ambiguous',
|
|
387
|
+
[RegistrationHintDiscoveryStatus.Dead]: 'dead',
|
|
388
|
+
[RegistrationHintDiscoveryStatus.Unverified]: 'unverified',
|
|
389
|
+
[RegistrationHintDiscoveryStatus.IntendedEmpty]: 'intendedEmpty',
|
|
390
|
+
};
|
|
391
|
+
/** The anchor check, the same for a fixed target and a single glob candidate. */
|
|
392
|
+
function checkAnchors(inspection, entry, relPath, out) {
|
|
393
|
+
let content;
|
|
394
|
+
try {
|
|
395
|
+
content = readFileSync(nodePath.join(inspection.projectRoot, relPath), 'utf8');
|
|
396
|
+
}
|
|
397
|
+
catch {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
for (const op of entry.hint.operations) {
|
|
401
|
+
if (!op.anchor || content.includes(op.anchor))
|
|
402
|
+
continue;
|
|
403
|
+
out.push({
|
|
404
|
+
severity: 'info',
|
|
405
|
+
code: 'anchor-not-present',
|
|
406
|
+
message: `Hint "${entry.hint.id}" expects anchor "${op.anchor}" in ${relPath} but it is missing today.`,
|
|
407
|
+
hintId: entry.hint.id,
|
|
408
|
+
source: entry.sourceFile,
|
|
409
|
+
target: op.anchor,
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Verify every hint's discovery against the live tree through THE discovery
|
|
415
|
+
* authority. Fixed targets used to be the only ones checked; glob discovery —
|
|
416
|
+
* used precisely when the author was unsure of the target — got none, so a
|
|
417
|
+
* dead, an ambiguous and an anchor-less glob hint all read "OK".
|
|
418
|
+
*/
|
|
419
|
+
export async function buildRegistrationHintDoctorReport(inspection) {
|
|
420
|
+
const { issues: loadIssues, entries } = await loadRegistrationHints(inspection);
|
|
421
|
+
const issues = [...loadIssues];
|
|
422
|
+
const hints = [];
|
|
423
|
+
const totals = { hints: entries.length, verified: 0, ambiguous: 0, dead: 0, unverified: 0, intendedEmpty: 0 };
|
|
424
|
+
// Observe every selector of every hint, then settle them ONCE through THE
|
|
425
|
+
// liveness authority (round 13): the state, the dead list and both coverage
|
|
426
|
+
// records (the shortfall and the expectEmpty acceptance) come from it.
|
|
427
|
+
const found = entries.map((e) => resolveRegistrationHintCandidates(inspection, e.hint));
|
|
428
|
+
const observations = [];
|
|
429
|
+
const marks = [];
|
|
430
|
+
const spans = [];
|
|
431
|
+
entries.forEach((e, i) => {
|
|
432
|
+
const f = found[i];
|
|
433
|
+
const own = discoveryObservations(e.hint, f);
|
|
434
|
+
spans.push({ start: observations.length, end: observations.length + own.length });
|
|
435
|
+
observations.push(...own);
|
|
436
|
+
const list = judgedList(f.mode);
|
|
437
|
+
marks.push(...qualifyUnitMarks((e.hint.expectEmptyUnits ?? []).filter((m) => m.list === list), e.hint.id));
|
|
438
|
+
});
|
|
439
|
+
const capped = found.some((f) => f.capped);
|
|
440
|
+
const liveness = settleUnitLiveness({
|
|
441
|
+
subject: 'registration hints',
|
|
442
|
+
unitLabel: MARKABLE_UNIT_LISTS[MarkableUnitList.RegistrationHintTargetGlobs].unitLabel,
|
|
443
|
+
weight: UnitDeadWeight.Coverage,
|
|
444
|
+
observations,
|
|
445
|
+
marks,
|
|
446
|
+
deadSummary: 'matched no file',
|
|
447
|
+
...(capped ? { capped: true, cappedReason: `a discovery walk hit its ${DISCOVERY_DIR_CAP}-directory cap` } : {}),
|
|
448
|
+
});
|
|
449
|
+
entries.forEach((e, i) => {
|
|
450
|
+
const f = found[i];
|
|
451
|
+
const span = spans[i];
|
|
452
|
+
const units = liveness.units.slice(span.start, span.end);
|
|
453
|
+
const push = (severity, code, message, target = '(discovery)') => {
|
|
454
|
+
issues.push({ severity, code, message, hintId: e.hint.id, source: e.sourceFile, target });
|
|
455
|
+
};
|
|
456
|
+
for (const u of units)
|
|
457
|
+
reportDiscoveryUnit(e.hint.id, f.mode, u, push);
|
|
458
|
+
let status;
|
|
459
|
+
if (f.mode === 'none') {
|
|
460
|
+
status = RegistrationHintDiscoveryStatus.Dead;
|
|
461
|
+
}
|
|
462
|
+
else if (f.mode === 'fixed') {
|
|
463
|
+
const u = units[0];
|
|
464
|
+
if (u?.state === UnitLivenessState.IntendedEmpty) {
|
|
465
|
+
status = RegistrationHintDiscoveryStatus.IntendedEmpty;
|
|
466
|
+
}
|
|
467
|
+
else if (f.candidates.length === 0) {
|
|
468
|
+
status = RegistrationHintDiscoveryStatus.Dead;
|
|
293
469
|
}
|
|
294
470
|
else {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
if (op.anchor) {
|
|
298
|
-
try {
|
|
299
|
-
const content = readFileSync(abs, 'utf8');
|
|
300
|
-
if (!content.includes(op.anchor)) {
|
|
301
|
-
out.push({
|
|
302
|
-
severity: 'info',
|
|
303
|
-
code: 'anchor-not-present',
|
|
304
|
-
message: `Hint "${e.hint.id}" expects anchor "${op.anchor}" in ${e.hint.discovery.targetFile} but it is missing today.`,
|
|
305
|
-
hintId: e.hint.id,
|
|
306
|
-
source: e.sourceFile,
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
catch {
|
|
311
|
-
// ignore read errors
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}
|
|
471
|
+
checkAnchors(inspection, e, f.candidates[0], issues);
|
|
472
|
+
status = RegistrationHintDiscoveryStatus.Verified;
|
|
315
473
|
}
|
|
316
474
|
}
|
|
475
|
+
else if (f.capped) {
|
|
476
|
+
push('info', 'discovery-unverified', `Registration hint "${e.hint.id}" discovery walk hit its ${DISCOVERY_DIR_CAP}-directory cap, so its candidate set is incomplete — NOT verified.`);
|
|
477
|
+
status = RegistrationHintDiscoveryStatus.Unverified;
|
|
478
|
+
}
|
|
479
|
+
else if (f.candidates.length === 0) {
|
|
480
|
+
// A hint whose every empty selector is intended-empty is not dead: it
|
|
481
|
+
// targets what the adopting app does not have yet (accepted, printed).
|
|
482
|
+
if (units.some((u) => u.state === UnitLivenessState.Dead)) {
|
|
483
|
+
push('warning', 'discovery-dead', `Registration hint "${e.hint.id}" discovery (${f.perGlob.map((g) => g.glob).join(', ')}) matches no file, so it can never target one — ${DEAD_SELECTOR_CAUSES}.`);
|
|
484
|
+
status = RegistrationHintDiscoveryStatus.Dead;
|
|
485
|
+
}
|
|
486
|
+
else {
|
|
487
|
+
status = RegistrationHintDiscoveryStatus.IntendedEmpty;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
else if (f.candidates.length > 1) {
|
|
491
|
+
push('info', 'discovery-ambiguous', `Registration hint "${e.hint.id}" discovery matches ${f.candidates.length} files (${f.candidates.slice(0, 5).join(', ')}${f.candidates.length > 5 ? ', …' : ''}); preview will not guess.`);
|
|
492
|
+
status = RegistrationHintDiscoveryStatus.Ambiguous;
|
|
493
|
+
}
|
|
494
|
+
else {
|
|
495
|
+
checkAnchors(inspection, e, f.candidates[0], issues);
|
|
496
|
+
status = RegistrationHintDiscoveryStatus.Verified;
|
|
497
|
+
}
|
|
498
|
+
totals[STATUS_TOTAL[status]] += 1;
|
|
499
|
+
hints.push({ id: e.hint.id, discovery: f.mode, candidates: f.candidates.length, status, source: e.sourceFile });
|
|
500
|
+
});
|
|
501
|
+
return {
|
|
502
|
+
issues,
|
|
503
|
+
hints,
|
|
504
|
+
totals,
|
|
505
|
+
coverage: liveness.coverage,
|
|
506
|
+
deadUnits: liveness.dead.map((u) => `registration hint ${u.label}`),
|
|
507
|
+
liveness,
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* The per-selector issue for one SETTLED unit: a dead selector is a warning
|
|
512
|
+
* (the unmarked dead list), an intended-empty one and a stale marker are info
|
|
513
|
+
* (the acceptance rides in coverage; a went-live marker fails only through
|
|
514
|
+
* `selectorUnitFails` under `--fail-on-dead-units`, never through `--strict`).
|
|
515
|
+
*/
|
|
516
|
+
function reportDiscoveryUnit(hintId, mode, u, push) {
|
|
517
|
+
if (u.state === UnitLivenessState.Dead) {
|
|
518
|
+
if (mode === 'none') {
|
|
519
|
+
push('warning', 'discovery-missing', `Registration hint "${hintId}" ${u.deadReason ?? 'has no discovery'}.`);
|
|
520
|
+
}
|
|
521
|
+
else if (mode === 'fixed') {
|
|
522
|
+
push('warning', 'target-file-missing', `Registration hint "${hintId}" targets ${u.unit} but the file is missing — ${DEAD_SELECTOR_CAUSES}.`, u.unit);
|
|
523
|
+
}
|
|
524
|
+
else {
|
|
525
|
+
push('warning', 'discovery-glob-matched-nothing', `Registration hint "${hintId}" discovery glob "${u.unit}" matches no file — ${DEAD_SELECTOR_CAUSES}.`, u.unit);
|
|
526
|
+
}
|
|
317
527
|
}
|
|
318
|
-
|
|
528
|
+
else if (u.state === UnitLivenessState.IntendedEmpty || u.state === UnitLivenessState.WentLive) {
|
|
529
|
+
// THE settle's sentence, after the selector it is about.
|
|
530
|
+
const selector = mode === 'fixed' ? `target file ${u.unit}` : `discovery glob "${u.unit}"`;
|
|
531
|
+
push('info', u.state === UnitLivenessState.IntendedEmpty ? 'discovery-intended-empty' : 'discovery-went-live', `Registration hint "${hintId}" ${selector} — ${u.message}`, u.unit);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
/** Load issues + discovery findings — {@link buildRegistrationHintDoctorReport}'s issue list. */
|
|
535
|
+
export async function listRegistrationHintIssues(inspection) {
|
|
536
|
+
return (await buildRegistrationHintDoctorReport(inspection)).issues;
|
|
319
537
|
}
|