@shrkcrft/inspector 0.1.0-alpha.30 → 0.1.0-alpha.32
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 +60 -5
- package/dist/ai-readiness.d.ts.map +1 -1
- package/dist/ai-readiness.js +21 -3
- package/dist/architecture-map.d.ts +16 -0
- package/dist/architecture-map.d.ts.map +1 -1
- package/dist/architecture-map.js +42 -26
- package/dist/area-explore.d.ts +2 -2
- package/dist/area-explore.d.ts.map +1 -1
- package/dist/area-explore.js +36 -16
- package/dist/area-map.d.ts +56 -11
- package/dist/area-map.d.ts.map +1 -1
- package/dist/area-map.js +106 -25
- package/dist/asset-doctor-proposed-exit.d.ts +21 -0
- package/dist/asset-doctor-proposed-exit.d.ts.map +1 -0
- package/dist/asset-doctor-proposed-exit.js +22 -0
- package/dist/asset-provenance.js +1 -1
- package/dist/boundaries-changed-only.d.ts +24 -1
- package/dist/boundaries-changed-only.d.ts.map +1 -1
- package/dist/boundaries-changed-only.js +12 -2
- package/dist/boundary-check-options.model.d.ts +40 -0
- package/dist/boundary-check-options.model.d.ts.map +1 -0
- package/dist/boundary-check-options.model.js +1 -0
- package/dist/boundary-check-result.model.d.ts +89 -0
- package/dist/boundary-check-result.model.d.ts.map +1 -0
- package/dist/boundary-check-result.model.js +1 -0
- package/dist/boundary-configuration-status.d.ts +38 -0
- package/dist/boundary-configuration-status.d.ts.map +1 -0
- package/dist/boundary-configuration-status.js +118 -0
- package/dist/boundary-configuration-status.model.d.ts +37 -0
- package/dist/boundary-configuration-status.model.d.ts.map +1 -0
- package/dist/boundary-configuration-status.model.js +1 -0
- package/dist/boundary-load-issue.model.d.ts +30 -0
- package/dist/boundary-load-issue.model.d.ts.map +1 -0
- package/dist/boundary-load-issue.model.js +1 -0
- package/dist/boundary-rule-check.model.d.ts +44 -0
- package/dist/boundary-rule-check.model.d.ts.map +1 -0
- package/dist/boundary-rule-check.model.js +1 -0
- package/dist/boundary-rule-invalidation.model.d.ts +31 -0
- package/dist/boundary-rule-invalidation.model.d.ts.map +1 -0
- package/dist/boundary-rule-invalidation.model.js +1 -0
- package/dist/boundary-rule-set-diff.model.d.ts +75 -0
- package/dist/boundary-rule-set-diff.model.d.ts.map +1 -0
- package/dist/boundary-rule-set-diff.model.js +1 -0
- package/dist/boundary-rule-sources.d.ts +28 -0
- package/dist/boundary-rule-sources.d.ts.map +1 -0
- package/dist/boundary-rule-sources.js +110 -0
- package/dist/boundary-stale-exception-finding.model.d.ts +12 -0
- package/dist/boundary-stale-exception-finding.model.d.ts.map +1 -0
- package/dist/boundary-stale-exception-finding.model.js +1 -0
- package/dist/boundary-unit-liveness.d.ts +35 -0
- package/dist/boundary-unit-liveness.d.ts.map +1 -0
- package/dist/boundary-unit-liveness.js +71 -0
- package/dist/change-intent.d.ts +3 -0
- package/dist/change-intent.d.ts.map +1 -1
- package/dist/change-intent.js +61 -27
- package/dist/changes-summary.d.ts.map +1 -1
- package/dist/changes-summary.js +19 -9
- package/dist/ci-integrity-report.js +1 -1
- package/dist/ci-predict.d.ts.map +1 -1
- package/dist/ci-predict.js +38 -5
- package/dist/code-intelligence-doctor.d.ts +6 -0
- package/dist/code-intelligence-doctor.d.ts.map +1 -1
- package/dist/code-intelligence-doctor.js +22 -7
- package/dist/codemod-assist.d.ts.map +1 -1
- package/dist/codemod-assist.js +3 -1
- 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/comment-syntax.d.ts +15 -0
- package/dist/comment-syntax.d.ts.map +1 -0
- package/dist/comment-syntax.js +15 -0
- 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 +122 -0
- package/dist/contribution-load-failures.d.ts.map +1 -0
- package/dist/contribution-load-failures.js +592 -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-applicability.d.ts +46 -0
- package/dist/convention-applicability.d.ts.map +1 -0
- package/dist/convention-applicability.js +247 -0
- package/dist/convention-filter-level.d.ts +13 -0
- package/dist/convention-filter-level.d.ts.map +1 -0
- package/dist/convention-filter-level.js +13 -0
- package/dist/convention-registry.d.ts +51 -4
- package/dist/convention-registry.d.ts.map +1 -1
- package/dist/convention-registry.js +135 -60
- 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 +161 -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 +24 -0
- package/dist/decision-records.d.ts.map +1 -1
- package/dist/decision-records.js +231 -84
- 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 +55 -0
- package/dist/declared-xref-status.d.ts +19 -0
- package/dist/declared-xref-status.d.ts.map +1 -0
- package/dist/declared-xref-status.js +19 -0
- package/dist/delegate-pack-recipes.d.ts +13 -2
- package/dist/delegate-pack-recipes.d.ts.map +1 -1
- package/dist/delegate-pack-recipes.js +45 -14
- package/dist/demo-package.js +2 -2
- package/dist/demo-script.js +2 -2
- package/dist/demo-workflow.js +3 -3
- package/dist/dev-cycle.js +1 -1
- package/dist/dev-session.js +1 -1
- package/dist/doc-references.d.ts +23 -2
- package/dist/doc-references.d.ts.map +1 -1
- package/dist/doc-references.js +96 -17
- package/dist/doctor-result.d.ts +8 -0
- package/dist/doctor-result.d.ts.map +1 -1
- package/dist/doctor-verdict-kind.d.ts +19 -0
- package/dist/doctor-verdict-kind.d.ts.map +1 -0
- package/dist/doctor-verdict-kind.js +19 -0
- package/dist/doctor-verdict.d.ts +18 -0
- package/dist/doctor-verdict.d.ts.map +1 -0
- package/dist/doctor-verdict.js +28 -0
- package/dist/drift.d.ts +17 -0
- package/dist/drift.d.ts.map +1 -1
- package/dist/drift.js +40 -10
- package/dist/entrypoint-matrix.d.ts.map +1 -1
- package/dist/entrypoint-matrix.js +4 -1
- package/dist/feedback-ingestion.d.ts +28 -2
- package/dist/feedback-ingestion.d.ts.map +1 -1
- package/dist/feedback-ingestion.js +75 -20
- package/dist/file-languages.d.ts +9 -0
- package/dist/file-languages.d.ts.map +1 -0
- package/dist/file-languages.js +91 -0
- package/dist/fix-preview.d.ts.map +1 -1
- package/dist/fix-preview.js +87 -22
- 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 +3 -2
- package/dist/git-helpers.d.ts +29 -4
- package/dist/git-helpers.d.ts.map +1 -1
- package/dist/git-helpers.js +69 -10
- 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 +32 -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-convention-applicability-reason.d.ts +29 -0
- package/dist/i-convention-applicability-reason.d.ts.map +1 -0
- package/dist/i-convention-applicability-reason.js +1 -0
- package/dist/i-convention-applicability.d.ts +9 -0
- package/dist/i-convention-applicability.d.ts.map +1 -0
- package/dist/i-convention-applicability.js +1 -0
- package/dist/i-convention-scope.d.ts +19 -0
- package/dist/i-convention-scope.d.ts.map +1 -0
- package/dist/i-convention-scope.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-file-language.d.ts +11 -0
- package/dist/i-file-language.d.ts.map +1 -0
- package/dist/i-file-language.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-not-applicable-convention.d.ts +17 -0
- package/dist/i-not-applicable-convention.d.ts.map +1 -0
- package/dist/i-not-applicable-convention.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-pack-origin.d.ts +13 -0
- package/dist/i-reference-pack-origin.d.ts.map +1 -0
- package/dist/i-reference-pack-origin.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-stale-path-hint-input.d.ts +18 -0
- package/dist/i-stale-path-hint-input.d.ts.map +1 -0
- package/dist/i-stale-path-hint-input.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-unverifiable-remedy-group.d.ts +10 -0
- package/dist/i-unverifiable-remedy-group.d.ts.map +1 -0
- package/dist/i-unverifiable-remedy-group.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 +158 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +197 -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 +25 -2
- package/dist/knowledge-authoring.d.ts.map +1 -1
- package/dist/knowledge-authoring.js +53 -13
- package/dist/knowledge-contribution-slots.d.ts +18 -0
- package/dist/knowledge-contribution-slots.d.ts.map +1 -0
- package/dist/knowledge-contribution-slots.js +25 -0
- package/dist/knowledge-entry-rejections.d.ts +17 -0
- package/dist/knowledge-entry-rejections.d.ts.map +1 -0
- package/dist/knowledge-entry-rejections.js +79 -0
- package/dist/knowledge-entry-verdict-record.d.ts +34 -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-min-referenced-valve.d.ts +12 -0
- package/dist/knowledge-min-referenced-valve.d.ts.map +1 -0
- package/dist/knowledge-min-referenced-valve.js +12 -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-rejected-entry.d.ts +28 -0
- package/dist/knowledge-rejected-entry.d.ts.map +1 -0
- package/dist/knowledge-rejected-entry.js +1 -0
- package/dist/knowledge-rename-command.d.ts +20 -0
- package/dist/knowledge-rename-command.d.ts.map +1 -0
- package/dist/knowledge-rename-command.js +34 -0
- package/dist/knowledge-rename-verb.d.ts +11 -0
- package/dist/knowledge-rename-verb.d.ts.map +1 -0
- package/dist/knowledge-rename-verb.js +11 -0
- package/dist/knowledge-rename.d.ts +1 -1
- package/dist/knowledge-rename.d.ts.map +1 -1
- package/dist/knowledge-rename.js +6 -5
- 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 +85 -0
- package/dist/knowledge-stale-gate.d.ts.map +1 -0
- package/dist/knowledge-stale-gate.js +501 -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 +140 -0
- package/dist/knowledge-stale.d.ts +132 -9
- package/dist/knowledge-stale.d.ts.map +1 -1
- package/dist/knowledge-stale.js +1193 -294
- 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/knowledge-unverifiable-remedy.d.ts +56 -0
- package/dist/knowledge-unverifiable-remedy.d.ts.map +1 -0
- package/dist/knowledge-unverifiable-remedy.js +0 -0
- package/dist/loader-diagnostics.d.ts +14 -2
- package/dist/loader-diagnostics.d.ts.map +1 -1
- package/dist/match-terms.d.ts +48 -0
- package/dist/match-terms.d.ts.map +1 -0
- package/dist/match-terms.js +155 -0
- package/dist/migration-profile-registry.d.ts +10 -0
- package/dist/migration-profile-registry.d.ts.map +1 -1
- package/dist/migration-profile-registry.js +57 -34
- package/dist/migration-readiness.d.ts.map +1 -1
- package/dist/migration-readiness.js +1 -3
- package/dist/nearest-id.d.ts +10 -26
- package/dist/nearest-id.d.ts.map +1 -1
- package/dist/nearest-id.js +9 -59
- package/dist/pack-asset-freshness.d.ts +65 -0
- package/dist/pack-asset-freshness.d.ts.map +1 -0
- package/dist/pack-asset-freshness.js +340 -0
- package/dist/pack-author-ux.d.ts +24 -3
- package/dist/pack-author-ux.d.ts.map +1 -1
- package/dist/pack-author-ux.js +87 -93
- package/dist/pack-contributions-inventory.d.ts +79 -39
- package/dist/pack-contributions-inventory.d.ts.map +1 -1
- package/dist/pack-contributions-inventory.js +445 -286
- package/dist/pack-doctor-verdict.d.ts +29 -0
- package/dist/pack-doctor-verdict.d.ts.map +1 -0
- package/dist/pack-doctor-verdict.js +45 -0
- package/dist/pack-doctor.d.ts +74 -1
- package/dist/pack-doctor.d.ts.map +1 -1
- package/dist/pack-doctor.js +281 -1
- package/dist/pack-helper-plan.d.ts +24 -0
- package/dist/pack-helper-plan.d.ts.map +1 -0
- package/dist/pack-helper-plan.js +77 -0
- package/dist/pack-helper-registry.d.ts +14 -0
- package/dist/pack-helper-registry.d.ts.map +1 -1
- package/dist/pack-helper-registry.js +76 -37
- package/dist/pack-manifest-reader.d.ts +8 -0
- package/dist/pack-manifest-reader.d.ts.map +1 -0
- package/dist/pack-manifest-reader.js +79 -0
- package/dist/pack-release-check.d.ts +14 -1
- package/dist/pack-release-check.d.ts.map +1 -1
- package/dist/pack-release-check.js +23 -1
- package/dist/pack-signature-status.d.ts +18 -6
- package/dist/pack-signature-status.d.ts.map +1 -1
- package/dist/pack-signature-status.js +59 -105
- package/dist/pack-test-runner.d.ts +27 -5
- package/dist/pack-test-runner.d.ts.map +1 -1
- package/dist/pack-test-runner.js +91 -35
- package/dist/pack-typecheck.d.ts +8 -0
- package/dist/pack-typecheck.d.ts.map +1 -0
- package/dist/pack-typecheck.js +76 -0
- package/dist/plan-review.d.ts +2 -0
- package/dist/plan-review.d.ts.map +1 -1
- package/dist/plan-review.js +17 -5
- package/dist/plan-simulation.d.ts.map +1 -1
- package/dist/plan-simulation.js +16 -5
- package/dist/playbook-load-issue.d.ts +16 -0
- package/dist/playbook-load-issue.d.ts.map +1 -0
- package/dist/playbook-load-issue.js +1 -0
- package/dist/playbook-registry.d.ts +32 -1
- package/dist/playbook-registry.d.ts.map +1 -1
- package/dist/playbook-registry.js +144 -55
- package/dist/policy-declaration.d.ts +18 -0
- package/dist/policy-declaration.d.ts.map +1 -0
- package/dist/policy-declaration.js +1 -0
- package/dist/policy-engine.d.ts +8 -0
- package/dist/policy-engine.d.ts.map +1 -1
- package/dist/policy-engine.js +26 -9
- package/dist/policy-overrides.d.ts.map +1 -1
- package/dist/policy-overrides.js +4 -4
- package/dist/policy-registry.d.ts +27 -0
- package/dist/policy-registry.d.ts.map +1 -1
- package/dist/policy-registry.js +87 -20
- package/dist/probed-id-fields.d.ts +21 -0
- package/dist/probed-id-fields.d.ts.map +1 -0
- package/dist/probed-id-fields.js +25 -0
- package/dist/probed-id-source.d.ts +11 -0
- package/dist/probed-id-source.d.ts.map +1 -0
- package/dist/probed-id-source.js +11 -0
- package/dist/profile-registry.d.ts +25 -2
- package/dist/profile-registry.d.ts.map +1 -1
- package/dist/profile-registry.js +59 -6
- package/dist/propose-knowledge.js +3 -2
- package/dist/quality-gate-examination.d.ts +15 -0
- package/dist/quality-gate-examination.d.ts.map +1 -0
- package/dist/quality-gate-examination.js +15 -0
- package/dist/quality-gate-row-status.d.ts +19 -0
- package/dist/quality-gate-row-status.d.ts.map +1 -0
- package/dist/quality-gate-row-status.js +28 -0
- package/dist/quality-gate-status.d.ts +16 -0
- package/dist/quality-gate-status.d.ts.map +1 -0
- package/dist/quality-gate-status.js +16 -0
- package/dist/quality-html.d.ts.map +1 -1
- package/dist/quality-html.js +14 -3
- package/dist/quality-report-coverage.d.ts +26 -0
- package/dist/quality-report-coverage.d.ts.map +1 -0
- package/dist/quality-report-coverage.js +48 -0
- package/dist/quality-report.d.ts +28 -1
- package/dist/quality-report.d.ts.map +1 -1
- package/dist/quality-report.js +263 -35
- package/dist/query-intent-kind.d.ts +18 -0
- package/dist/query-intent-kind.d.ts.map +1 -0
- package/dist/query-intent-kind.js +18 -0
- package/dist/query-intent-result.d.ts +23 -0
- package/dist/query-intent-result.d.ts.map +1 -0
- package/dist/query-intent-result.js +1 -0
- package/dist/query-intent.d.ts +18 -0
- package/dist/query-intent.d.ts.map +1 -0
- package/dist/query-intent.js +336 -0
- package/dist/query-resolver.d.ts +18 -0
- package/dist/query-resolver.d.ts.map +1 -1
- package/dist/query-resolver.js +7 -4
- package/dist/ranked-recommendations.d.ts +36 -0
- package/dist/ranked-recommendations.d.ts.map +1 -0
- package/dist/ranked-recommendations.js +1 -0
- package/dist/ranker-explainability.d.ts.map +1 -1
- package/dist/ranker-explainability.js +38 -10
- package/dist/recommend-recipe.d.ts +17 -0
- package/dist/recommend-recipe.d.ts.map +1 -0
- package/dist/recommend-recipe.js +1 -0
- package/dist/recommend-recipes.d.ts +9 -0
- package/dist/recommend-recipes.d.ts.map +1 -0
- package/dist/recommend-recipes.js +106 -0
- package/dist/recommendation-candidate.d.ts +30 -0
- package/dist/recommendation-candidate.d.ts.map +1 -0
- package/dist/recommendation-candidate.js +1 -0
- package/dist/recommendation-confidence.d.ts +27 -0
- package/dist/recommendation-confidence.d.ts.map +1 -0
- package/dist/recommendation-confidence.js +1 -0
- package/dist/recommendation-ranking-options.d.ts +24 -0
- package/dist/recommendation-ranking-options.d.ts.map +1 -0
- package/dist/recommendation-ranking-options.js +1 -0
- package/dist/recommendation-ranking.d.ts +50 -0
- package/dist/recommendation-ranking.d.ts.map +1 -0
- package/dist/recommendation-ranking.js +527 -0
- package/dist/recommendation-source.d.ts +23 -0
- package/dist/recommendation-source.d.ts.map +1 -0
- package/dist/recommendation-source.js +23 -0
- package/dist/recommendation-suppression.d.ts +14 -0
- package/dist/recommendation-suppression.d.ts.map +1 -0
- package/dist/recommendation-suppression.js +14 -0
- package/dist/reference-asset-kind.d.ts +14 -0
- package/dist/reference-asset-kind.d.ts.map +1 -0
- package/dist/reference-asset-kind.js +14 -0
- package/dist/reference-content-check.d.ts +32 -0
- package/dist/reference-content-check.d.ts.map +1 -0
- package/dist/reference-content-check.js +143 -0
- package/dist/reference-failure.d.ts +31 -0
- package/dist/reference-failure.d.ts.map +1 -0
- package/dist/reference-failure.js +31 -0
- package/dist/reference-id-status.d.ts +15 -0
- package/dist/reference-id-status.d.ts.map +1 -0
- package/dist/reference-id-status.js +15 -0
- package/dist/reference-kind-declarations.d.ts +42 -0
- package/dist/reference-kind-declarations.d.ts.map +1 -0
- package/dist/reference-kind-declarations.js +142 -0
- package/dist/reference-lookup.d.ts +6 -0
- package/dist/reference-lookup.d.ts.map +1 -1
- package/dist/reference-lookup.js +13 -5
- package/dist/reference-pack-origin.d.ts +18 -0
- package/dist/reference-pack-origin.d.ts.map +1 -0
- package/dist/reference-pack-origin.js +38 -0
- package/dist/reference-registry.d.ts +109 -11
- package/dist/reference-registry.d.ts.map +1 -1
- package/dist/reference-registry.js +186 -30
- package/dist/reference-subject.d.ts +20 -0
- package/dist/reference-subject.d.ts.map +1 -0
- package/dist/reference-subject.js +1 -0
- package/dist/registration-hint-discovery-status.d.ts +25 -0
- package/dist/registration-hint-discovery-status.d.ts.map +1 -0
- package/dist/registration-hint-discovery-status.js +25 -0
- package/dist/registration-hint-registry.d.ts +80 -0
- package/dist/registration-hint-registry.d.ts.map +1 -1
- package/dist/registration-hint-registry.js +356 -138
- package/dist/registry-lifecycle.d.ts +200 -19
- package/dist/registry-lifecycle.d.ts.map +1 -1
- package/dist/registry-lifecycle.js +526 -136
- package/dist/release-readiness.d.ts.map +1 -1
- package/dist/release-readiness.js +10 -7
- package/dist/release-smoke.d.ts.map +1 -1
- package/dist/release-smoke.js +11 -7
- package/dist/report-site.d.ts.map +1 -1
- package/dist/report-site.js +25 -7
- package/dist/repository-intelligence.d.ts.map +1 -1
- package/dist/repository-intelligence.js +3 -2
- package/dist/repository-knowledge-model.d.ts.map +1 -1
- package/dist/repository-knowledge-model.js +18 -5
- package/dist/repository-stats.d.ts.map +1 -1
- package/dist/repository-stats.js +3 -77
- 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 +250 -33
- 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 +1369 -182
- 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 +55 -281
- package/dist/settled-unit-states.d.ts +9 -0
- package/dist/settled-unit-states.d.ts.map +1 -0
- package/dist/settled-unit-states.js +14 -0
- package/dist/sharkcraft-inspector.d.ts +34 -0
- package/dist/sharkcraft-inspector.d.ts.map +1 -1
- package/dist/sharkcraft-inspector.js +314 -27
- 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/stale-path-hint.d.ts +3 -0
- package/dist/stale-path-hint.d.ts.map +1 -0
- package/dist/stale-path-hint.js +47 -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-authoring.d.ts +1 -1
- package/dist/template-authoring.d.ts.map +1 -1
- package/dist/template-authoring.js +2 -1
- package/dist/template-drift.d.ts.map +1 -1
- package/dist/template-drift.js +30 -9
- package/dist/template-lint.d.ts.map +1 -1
- package/dist/template-lint.js +160 -2
- package/dist/term-query.d.ts +10 -0
- package/dist/term-query.d.ts.map +1 -0
- package/dist/term-query.js +1 -0
- package/dist/test-definitions.d.ts +6 -3
- package/dist/test-definitions.d.ts.map +1 -1
- package/dist/test-runner.d.ts +95 -10
- package/dist/test-runner.d.ts.map +1 -1
- package/dist/test-runner.js +309 -308
- package/dist/tuning-query-tokens.d.ts +29 -0
- package/dist/tuning-query-tokens.d.ts.map +1 -0
- package/dist/tuning-query-tokens.js +51 -0
- package/dist/typecheck-files.d.ts +36 -0
- package/dist/typecheck-files.d.ts.map +1 -0
- package/dist/typecheck-files.js +158 -0
- package/dist/uncertainty.js +1 -1
- package/dist/universal-search.d.ts.map +1 -1
- package/dist/universal-search.js +5 -3
- package/dist/unregistered-exports.d.ts +19 -0
- package/dist/unregistered-exports.d.ts.map +1 -0
- package/dist/unregistered-exports.js +141 -0
- package/dist/unresolvable-reason.d.ts +11 -0
- package/dist/unresolvable-reason.d.ts.map +1 -0
- package/dist/unresolvable-reason.js +11 -0
- package/dist/upgrade-advisor.d.ts.map +1 -1
- package/dist/upgrade-advisor.js +16 -9
- package/dist/validate-contribution-file.d.ts +4 -0
- package/dist/validate-contribution-file.d.ts.map +1 -0
- package/dist/validate-contribution-file.js +233 -0
- package/dist/why-file.d.ts +3 -0
- package/dist/why-file.d.ts.map +1 -1
- package/dist/why-file.js +12 -7
- package/package.json +17 -17
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
|
|
2
2
|
import * as nodePath from 'node:path';
|
|
3
|
-
import { createImportContext, DEFAULT_SAFE_IMPORT_TIMEOUT_MS, } from '@shrkcrft/core';
|
|
3
|
+
import { createImportContext, DEFAULT_SAFE_IMPORT_TIMEOUT_MS, ERROR_CODES, RejectionCause, } from '@shrkcrft/core';
|
|
4
4
|
import { inspectWorkspace } from '@shrkcrft/workspace';
|
|
5
|
-
import { loadProjectConfig } from '@shrkcrft/config';
|
|
5
|
+
import { DEFAULT_DOC_FILES, DEFAULT_KNOWLEDGE_FILES, DEFAULT_PATH_FILES, DEFAULT_RULE_FILES, loadProjectConfig, } from '@shrkcrft/config';
|
|
6
|
+
/**
|
|
7
|
+
* The knowledge-bearing files the config loader fills in by DEFAULT. They are
|
|
8
|
+
* optional by nature — a repo without `rules.ts` never asked for one — so only
|
|
9
|
+
* a file the config names BEYOND these is recorded `missing` when absent.
|
|
10
|
+
*/
|
|
11
|
+
const OPTIONAL_DEFAULT_KNOWLEDGE_FILES = new Set([
|
|
12
|
+
...DEFAULT_KNOWLEDGE_FILES,
|
|
13
|
+
...DEFAULT_RULE_FILES,
|
|
14
|
+
...DEFAULT_PATH_FILES,
|
|
15
|
+
...DEFAULT_DOC_FILES,
|
|
16
|
+
]);
|
|
6
17
|
import { KnowledgeIndex, MarkdownKnowledgeLoader, TypeScriptKnowledgeLoader, validateKnowledgeEntries, } from '@shrkcrft/knowledge';
|
|
7
18
|
import { RuleService } from '@shrkcrft/rules';
|
|
8
19
|
import { PathService } from '@shrkcrft/paths';
|
|
@@ -12,6 +23,8 @@ import { discoverPacks } from '@shrkcrft/packs';
|
|
|
12
23
|
import { BUILTIN_PRESETS, loadPresetsFromFile, PresetRegistry } from '@shrkcrft/presets';
|
|
13
24
|
import { BoundaryRegistry, loadBoundaryRulesFromFile } from '@shrkcrft/boundaries';
|
|
14
25
|
import { DoctorSeverity } from "./doctor-result.js";
|
|
26
|
+
import { knowledgeRejectedEntries } from "./knowledge-entry-rejections.js";
|
|
27
|
+
import { registryLifecycleSkipDirsWarning, resolveRegistryLifecycleSkipDirs, } from "./registry-lifecycle.js";
|
|
15
28
|
import { diagnoseActionHints } from "./action-hint-diagnostics.js";
|
|
16
29
|
import { buildCodeIntelligenceChecks, } from "./code-intelligence-doctor.js";
|
|
17
30
|
import { loadSearchTuning } from "./search-tuning-registry.js";
|
|
@@ -19,6 +32,8 @@ import { buildDelegateRecipeChecks } from "./delegate-doctor.js";
|
|
|
19
32
|
import { computeFileFingerprint, createInspectorCache, } from "./inspector-cache.js";
|
|
20
33
|
import { DEFAULT_SLOW_LOADER_THRESHOLD_MS, LARGE_FILE_THRESHOLD_BYTES, } from "./loader-diagnostics.js";
|
|
21
34
|
import { suggestSurfaceProfile } from "./surface-profile-detect.js";
|
|
35
|
+
import { boundaryFileLabel, boundaryLoadIssuesFromFile, classifyLocalBoundaryFiles, } from "./boundary-configuration-status.js";
|
|
36
|
+
import { describePackAssetFreshness, detectPackAssetFreshness, packHasCompiledContributions, } from "./pack-asset-freshness.js";
|
|
22
37
|
/**
|
|
23
38
|
* Find SharkCraft packs that live IN the repo but are not discovered (i.e.
|
|
24
39
|
* not linked into node_modules). Discovery scans node_modules; an unlinked
|
|
@@ -102,6 +117,22 @@ function recordDiagnostic(ctx, d) {
|
|
|
102
117
|
ctx.diagnostics.push(d);
|
|
103
118
|
ctx.onLoaderDiagnostic?.(d);
|
|
104
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* A boundary rule file's invalid rules as THE rejection channel's records
|
|
122
|
+
* (round 12, 12.1) — the boundary loader's structured `invalid[]`, one record
|
|
123
|
+
* per rule with every failing field.
|
|
124
|
+
*/
|
|
125
|
+
function boundaryRejections(file, invalid) {
|
|
126
|
+
return invalid.map((inv) => ({
|
|
127
|
+
file,
|
|
128
|
+
index: inv.index,
|
|
129
|
+
// The export the rule array came from — `(default[1])`, one wording with every kind.
|
|
130
|
+
...(inv.exportName !== undefined ? { exportName: inv.exportName } : {}),
|
|
131
|
+
...(inv.ruleId !== undefined ? { entryId: inv.ruleId } : {}),
|
|
132
|
+
reasons: inv.issues.map((i) => `${i.field}: ${i.message}`),
|
|
133
|
+
cause: RejectionCause.Invalid,
|
|
134
|
+
}));
|
|
135
|
+
}
|
|
105
136
|
async function loadAssetTracked(ctx, filePath, kind, origin, packName, performLoad) {
|
|
106
137
|
const start = Date.now();
|
|
107
138
|
let sizeBytes;
|
|
@@ -191,6 +222,7 @@ async function loadAssetTracked(ctx, filePath, kind, origin, packName, performLo
|
|
|
191
222
|
elapsedMs,
|
|
192
223
|
status,
|
|
193
224
|
count: loaded.count,
|
|
225
|
+
...(loaded.rejected && loaded.rejected.length > 0 ? { rejected: loaded.rejected } : {}),
|
|
194
226
|
warningCount: loaded.warnings.length,
|
|
195
227
|
errorMessage,
|
|
196
228
|
deduped: dedupedBefore,
|
|
@@ -227,20 +259,45 @@ export async function inspectSharkcraft(options = {}) {
|
|
|
227
259
|
const knowledgeEntries = [];
|
|
228
260
|
const templates = [];
|
|
229
261
|
const pipelines = [];
|
|
262
|
+
// The file each LOCAL template / pipeline came from, so their sources carry a
|
|
263
|
+
// `file` like knowledge and pack entries do (the contributions inventory and
|
|
264
|
+
// the unregistered-export check attribute ids by file).
|
|
265
|
+
const localTemplateFiles = new Map();
|
|
266
|
+
const localPipelineFiles = new Map();
|
|
230
267
|
if (cfg) {
|
|
231
268
|
const tsLoader = new TypeScriptKnowledgeLoader({ importContext });
|
|
232
269
|
const mdLoader = new MarkdownKnowledgeLoader();
|
|
233
270
|
const collectFile = async (relPath, kindHint) => {
|
|
234
271
|
const full = nodePath.join(cfg.sharkcraftDir, relPath);
|
|
235
|
-
if (!existsSync(full))
|
|
272
|
+
if (!existsSync(full)) {
|
|
273
|
+
// A default slot file (`rules.ts`, `docs/overview.md`, …) is optional.
|
|
274
|
+
if (OPTIONAL_DEFAULT_KNOWLEDGE_FILES.has(relPath.replace(/^\.\//, '')))
|
|
275
|
+
return;
|
|
276
|
+
// The config NAMES this file; loading nothing from it is a fact a
|
|
277
|
+
// corpus verdict must see (it used to vanish: no diagnostic, no warning).
|
|
278
|
+
recordDiagnostic(ctx, {
|
|
279
|
+
filePath: full,
|
|
280
|
+
kind: kindHint,
|
|
281
|
+
origin: 'local-config',
|
|
282
|
+
elapsedMs: 0,
|
|
283
|
+
status: 'missing',
|
|
284
|
+
count: 0,
|
|
285
|
+
warningCount: 0,
|
|
286
|
+
errorMessage: `declared in ${kindHint === 'rules' ? 'ruleFiles' : kindHint === 'paths' ? 'pathFiles' : `${kindHint}Files`} but the file does not exist`,
|
|
287
|
+
deduped: false,
|
|
288
|
+
largeFile: false,
|
|
289
|
+
slow: false,
|
|
290
|
+
suggestedNextCommand: suggestNextCommand(kindHint),
|
|
291
|
+
});
|
|
236
292
|
return;
|
|
293
|
+
}
|
|
237
294
|
sourceFiles.push(full);
|
|
238
295
|
if (tsLoader.canLoad(full)) {
|
|
239
296
|
const tracked = await loadAssetTracked(ctx, full, kindHint, 'local-config', undefined, async () => {
|
|
240
297
|
const r = await tsLoader.load(full);
|
|
241
298
|
knowledgeEntries.push(...r.entries);
|
|
242
299
|
warnings.push(...r.warnings);
|
|
243
|
-
return { count: r.entries.length, warnings: r.warnings };
|
|
300
|
+
return { count: r.entries.length, warnings: r.warnings, ...(r.rejected ? { rejected: r.rejected } : {}) };
|
|
244
301
|
});
|
|
245
302
|
if (tracked.skipped)
|
|
246
303
|
warnings.push(...tracked.warnings);
|
|
@@ -250,7 +307,7 @@ export async function inspectSharkcraft(options = {}) {
|
|
|
250
307
|
const r = await mdLoader.load(full);
|
|
251
308
|
knowledgeEntries.push(...r.entries);
|
|
252
309
|
warnings.push(...r.warnings);
|
|
253
|
-
return { count: r.entries.length, warnings: r.warnings };
|
|
310
|
+
return { count: r.entries.length, warnings: r.warnings, ...(r.rejected ? { rejected: r.rejected } : {}) };
|
|
254
311
|
});
|
|
255
312
|
if (tracked.skipped)
|
|
256
313
|
warnings.push(...tracked.warnings);
|
|
@@ -279,8 +336,11 @@ export async function inspectSharkcraft(options = {}) {
|
|
|
279
336
|
const tracked = await loadAssetTracked(ctx, full, 'templates', 'local-config', undefined, async () => {
|
|
280
337
|
const r = await loadTemplatesFromFile(full, { importContext });
|
|
281
338
|
templates.push(...r.templates);
|
|
339
|
+
for (const t of r.templates)
|
|
340
|
+
if (!localTemplateFiles.has(t.id))
|
|
341
|
+
localTemplateFiles.set(t.id, full);
|
|
282
342
|
warnings.push(...r.warnings);
|
|
283
|
-
return { count: r.templates.length, warnings: r.warnings };
|
|
343
|
+
return { count: r.templates.length, warnings: r.warnings, rejected: r.rejected };
|
|
284
344
|
});
|
|
285
345
|
if (tracked.skipped)
|
|
286
346
|
warnings.push(...tracked.warnings);
|
|
@@ -293,8 +353,11 @@ export async function inspectSharkcraft(options = {}) {
|
|
|
293
353
|
const tracked = await loadAssetTracked(ctx, full, 'pipelines', 'local-config', undefined, async () => {
|
|
294
354
|
const r = await loadPipelinesFromFile(full, { importContext });
|
|
295
355
|
pipelines.push(...r.pipelines);
|
|
356
|
+
for (const p of r.pipelines)
|
|
357
|
+
if (!localPipelineFiles.has(p.id))
|
|
358
|
+
localPipelineFiles.set(p.id, full);
|
|
296
359
|
warnings.push(...r.warnings);
|
|
297
|
-
return { count: r.pipelines.length, warnings: r.warnings };
|
|
360
|
+
return { count: r.pipelines.length, warnings: r.warnings, rejected: r.rejected };
|
|
298
361
|
});
|
|
299
362
|
if (tracked.skipped)
|
|
300
363
|
warnings.push(...tracked.warnings);
|
|
@@ -309,11 +372,13 @@ export async function inspectSharkcraft(options = {}) {
|
|
|
309
372
|
}
|
|
310
373
|
const templateSources = new Map();
|
|
311
374
|
for (const t of templates) {
|
|
312
|
-
|
|
375
|
+
const file = localTemplateFiles.get(t.id);
|
|
376
|
+
templateSources.set(t.id, { type: 'local', ...(file ? { file } : {}) });
|
|
313
377
|
}
|
|
314
378
|
const pipelineSources = new Map();
|
|
315
379
|
for (const p of pipelines) {
|
|
316
|
-
|
|
380
|
+
const file = localPipelineFiles.get(p.id);
|
|
381
|
+
pipelineSources.set(p.id, { type: 'local', ...(file ? { file } : {}) });
|
|
317
382
|
}
|
|
318
383
|
const packs = await discoverPacks({
|
|
319
384
|
projectRoot: workspace.projectRoot,
|
|
@@ -364,7 +429,7 @@ export async function inspectSharkcraft(options = {}) {
|
|
|
364
429
|
resolved.templates += 1;
|
|
365
430
|
}
|
|
366
431
|
warnings.push(...r.warnings);
|
|
367
|
-
return { count: r.templates.length, warnings: r.warnings };
|
|
432
|
+
return { count: r.templates.length, warnings: r.warnings, rejected: r.rejected };
|
|
368
433
|
});
|
|
369
434
|
if (tracked.skipped)
|
|
370
435
|
warnings.push(...tracked.warnings);
|
|
@@ -382,7 +447,7 @@ export async function inspectSharkcraft(options = {}) {
|
|
|
382
447
|
resolved.pipelines += 1;
|
|
383
448
|
}
|
|
384
449
|
warnings.push(...r.warnings);
|
|
385
|
-
return { count: r.pipelines.length, warnings: r.warnings };
|
|
450
|
+
return { count: r.pipelines.length, warnings: r.warnings, rejected: r.rejected };
|
|
386
451
|
});
|
|
387
452
|
if (tracked.skipped)
|
|
388
453
|
warnings.push(...tracked.warnings);
|
|
@@ -413,7 +478,7 @@ export async function inspectSharkcraft(options = {}) {
|
|
|
413
478
|
if (kind === 'docs')
|
|
414
479
|
resolved.docs += 1;
|
|
415
480
|
warnings.push(...r.warnings);
|
|
416
|
-
return { count: r.entries.length, warnings: r.warnings };
|
|
481
|
+
return { count: r.entries.length, warnings: r.warnings, ...(r.rejected ? { rejected: r.rejected } : {}) };
|
|
417
482
|
});
|
|
418
483
|
if (tracked.skipped)
|
|
419
484
|
warnings.push(...tracked.warnings);
|
|
@@ -452,7 +517,10 @@ export async function inspectSharkcraft(options = {}) {
|
|
|
452
517
|
warnings.push(`pack ${invalid.packageName}@${invalid.packageVersion}: ${invalid.loadError ??
|
|
453
518
|
(invalid.validationIssues.map((i) => `${i.field}: ${i.message}`).join('; ') || 'invalid manifest')}`);
|
|
454
519
|
}
|
|
455
|
-
|
|
520
|
+
// The provenance `root: pack` needs (round 15 follow-up): only a pack's entry has a pack directory.
|
|
521
|
+
const validation = validateKnowledgeEntries(knowledgeEntries, {
|
|
522
|
+
isPackContributed: (e) => entrySources.get(e.id)?.type === 'pack',
|
|
523
|
+
});
|
|
456
524
|
const cleanEntries = validation.uniqueEntries;
|
|
457
525
|
const index = new KnowledgeIndex(cleanEntries);
|
|
458
526
|
const ruleService = new RuleService(cleanEntries);
|
|
@@ -490,7 +558,7 @@ export async function inspectSharkcraft(options = {}) {
|
|
|
490
558
|
if (pack.resolvedCounts)
|
|
491
559
|
pack.resolvedCounts.presets += 1;
|
|
492
560
|
}
|
|
493
|
-
return { count: r.presets.length, warnings: r.warnings };
|
|
561
|
+
return { count: r.presets.length, warnings: r.warnings, rejected: r.rejected };
|
|
494
562
|
});
|
|
495
563
|
if (tracked.skipped)
|
|
496
564
|
warnings.push(...tracked.warnings);
|
|
@@ -511,24 +579,39 @@ export async function inspectSharkcraft(options = {}) {
|
|
|
511
579
|
presetRegistry.add(preset);
|
|
512
580
|
presetSources.set(preset.id, { type: 'local', file: full });
|
|
513
581
|
}
|
|
514
|
-
return { count: r.presets.length, warnings: r.warnings };
|
|
582
|
+
return { count: r.presets.length, warnings: r.warnings, rejected: r.rejected };
|
|
515
583
|
});
|
|
516
584
|
if (tracked.skipped)
|
|
517
585
|
warnings.push(...tracked.warnings);
|
|
518
586
|
}
|
|
519
587
|
const boundaryRegistry = new BoundaryRegistry();
|
|
520
588
|
const boundarySources = new Map();
|
|
589
|
+
// Round 11: every configured-but-unevaluable boundary rule / file, structured
|
|
590
|
+
// so each boundary surface reports it as an ERRORED rule (never a warning
|
|
591
|
+
// string nobody renders).
|
|
592
|
+
const boundaryLoadIssues = [];
|
|
521
593
|
for (const pack of packs.validPacks) {
|
|
522
594
|
const c = pack.manifest.contributions;
|
|
523
595
|
for (const rel of c.boundaryFiles ?? []) {
|
|
524
596
|
const full = nodePath.resolve(pack.packageRoot, rel);
|
|
525
597
|
if (!existsSync(full)) {
|
|
526
598
|
warnings.push(`pack ${pack.packageName}: missing boundary file ${rel}`);
|
|
599
|
+
boundaryLoadIssues.push({
|
|
600
|
+
file: boundaryFileLabel(workspace.projectRoot, full),
|
|
601
|
+
kind: 'missing-file',
|
|
602
|
+
origin: 'pack',
|
|
603
|
+
packageName: pack.packageName,
|
|
604
|
+
issues: [`pack ${pack.packageName} declares boundary file ${rel}, which does not exist`],
|
|
605
|
+
});
|
|
527
606
|
continue;
|
|
528
607
|
}
|
|
529
608
|
const tracked = await loadAssetTracked(ctx, full, 'boundaries', 'pack-manifest', pack.packageName, async () => {
|
|
530
|
-
|
|
609
|
+
// Round 13 (lane B): the pack's name is stamped on each expectEmpty
|
|
610
|
+
// marker of its rules — a pack marker that went live is INFO, never a
|
|
611
|
+
// failure for the consumer, who cannot edit it.
|
|
612
|
+
const r = await loadBoundaryRulesFromFile(full, { importContext, packageName: pack.packageName });
|
|
531
613
|
warnings.push(...r.warnings);
|
|
614
|
+
boundaryLoadIssues.push(...boundaryLoadIssuesFromFile(r, workspace.projectRoot, 'pack', pack.packageName));
|
|
532
615
|
for (const rule of r.rules) {
|
|
533
616
|
if (boundaryRegistry.has(rule.id)) {
|
|
534
617
|
warnings.push(`pack ${pack.packageName}: boundary "${rule.id}" already provided — pack version skipped`);
|
|
@@ -542,29 +625,62 @@ export async function inspectSharkcraft(options = {}) {
|
|
|
542
625
|
file: full,
|
|
543
626
|
});
|
|
544
627
|
}
|
|
545
|
-
return { count: r.rules.length, warnings: r.warnings };
|
|
628
|
+
return { count: r.rules.length, warnings: r.warnings, rejected: boundaryRejections(full, r.invalid) };
|
|
546
629
|
});
|
|
547
|
-
if (tracked.skipped)
|
|
630
|
+
if (tracked.skipped) {
|
|
548
631
|
warnings.push(...tracked.warnings);
|
|
632
|
+
boundaryLoadIssues.push({
|
|
633
|
+
file: boundaryFileLabel(workspace.projectRoot, full),
|
|
634
|
+
kind: 'load-error',
|
|
635
|
+
origin: 'pack',
|
|
636
|
+
packageName: pack.packageName,
|
|
637
|
+
issues: tracked.warnings.length > 0 ? tracked.warnings : ['the rule file failed to load (cached)'],
|
|
638
|
+
});
|
|
639
|
+
}
|
|
549
640
|
}
|
|
550
641
|
}
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
642
|
+
// Local rule files, through THE classification the configuration status
|
|
643
|
+
// reads too — a listed-but-missing file and an unlisted
|
|
644
|
+
// sharkcraft/boundaries.ts are reported identically everywhere (round 11,
|
|
645
|
+
// L-1). The unlisted default is reported, never auto-loaded: loading it
|
|
646
|
+
// silently would start enforcing rules nobody opted into.
|
|
647
|
+
const localBoundaryFiles = cfg
|
|
648
|
+
? classifyLocalBoundaryFiles(cfg.sharkcraftDir, cfgExt?.boundaryFiles ?? [])
|
|
649
|
+
: { listed: [] };
|
|
650
|
+
for (const listed of localBoundaryFiles.listed) {
|
|
651
|
+
const full = listed.abs;
|
|
652
|
+
if (!listed.exists) {
|
|
653
|
+
warnings.push(`boundaryFiles lists "${listed.rel}" but ${full} does not exist — no boundary rules load from it`);
|
|
654
|
+
boundaryLoadIssues.push({
|
|
655
|
+
file: boundaryFileLabel(workspace.projectRoot, full),
|
|
656
|
+
kind: 'missing-file',
|
|
657
|
+
origin: 'local',
|
|
658
|
+
issues: [`boundaryFiles lists "${listed.rel}", but the file does not exist`],
|
|
659
|
+
});
|
|
556
660
|
continue;
|
|
661
|
+
}
|
|
557
662
|
const tracked = await loadAssetTracked(ctx, full, 'boundaries', 'local-config', undefined, async () => {
|
|
558
663
|
const r = await loadBoundaryRulesFromFile(full, { importContext });
|
|
559
664
|
warnings.push(...r.warnings);
|
|
665
|
+
boundaryLoadIssues.push(...boundaryLoadIssuesFromFile(r, workspace.projectRoot, 'local'));
|
|
560
666
|
for (const rule of r.rules) {
|
|
561
667
|
boundaryRegistry.add(rule);
|
|
562
668
|
boundarySources.set(rule.id, { type: 'local', file: full });
|
|
563
669
|
}
|
|
564
|
-
return { count: r.rules.length, warnings: r.warnings };
|
|
670
|
+
return { count: r.rules.length, warnings: r.warnings, rejected: boundaryRejections(full, r.invalid) };
|
|
565
671
|
});
|
|
566
|
-
if (tracked.skipped)
|
|
672
|
+
if (tracked.skipped) {
|
|
567
673
|
warnings.push(...tracked.warnings);
|
|
674
|
+
boundaryLoadIssues.push({
|
|
675
|
+
file: boundaryFileLabel(workspace.projectRoot, full),
|
|
676
|
+
kind: 'load-error',
|
|
677
|
+
origin: 'local',
|
|
678
|
+
issues: tracked.warnings.length > 0 ? tracked.warnings : ['the rule file failed to load (cached)'],
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
if (localBoundaryFiles.unlistedDefault) {
|
|
683
|
+
warnings.push(`${boundaryFileLabel(workspace.projectRoot, localBoundaryFiles.unlistedDefault)} exists but is not listed in boundaryFiles — its rules are NOT loaded (add \`boundaryFiles: ['boundaries.ts']\` to sharkcraft.config.ts)`);
|
|
568
684
|
}
|
|
569
685
|
const inspection = {
|
|
570
686
|
projectRoot: workspace.projectRoot,
|
|
@@ -573,6 +689,7 @@ export async function inspectSharkcraft(options = {}) {
|
|
|
573
689
|
sharkcraftDir: cfg?.sharkcraftDir ?? workspace.sharkcraftPath ?? null,
|
|
574
690
|
config: cfg?.config ?? null,
|
|
575
691
|
configFile: cfg?.configFile ?? null,
|
|
692
|
+
...(cfgResult.ok ? {} : describeConfigLoadError(cfgResult.error)),
|
|
576
693
|
knowledgeEntries: cleanEntries,
|
|
577
694
|
templates,
|
|
578
695
|
pipelines,
|
|
@@ -587,12 +704,14 @@ export async function inspectSharkcraft(options = {}) {
|
|
|
587
704
|
presetSources,
|
|
588
705
|
boundaryRegistry,
|
|
589
706
|
boundarySources,
|
|
707
|
+
boundaryLoadIssues,
|
|
590
708
|
index,
|
|
591
709
|
ruleService,
|
|
592
710
|
pathService,
|
|
593
711
|
templateRegistry,
|
|
594
712
|
pipelineRegistry,
|
|
595
713
|
loaderDiagnostics: diagnostics,
|
|
714
|
+
packAssetFreshness: compiledPackFreshness(packs),
|
|
596
715
|
inspectionElapsedMs: Date.now() - inspectStart,
|
|
597
716
|
cacheEnabled: cache.enabled,
|
|
598
717
|
cacheDir: cache.dir,
|
|
@@ -608,6 +727,59 @@ export async function inspectSharkcraft(options = {}) {
|
|
|
608
727
|
}
|
|
609
728
|
return inspection;
|
|
610
729
|
}
|
|
730
|
+
/**
|
|
731
|
+
* Freshness of every valid pack serving compiled contributions — the one
|
|
732
|
+
* authority, called only where something compiled can go stale (TS-source packs
|
|
733
|
+
* are skipped without hashing). Never throws: a pack whose files cannot be read
|
|
734
|
+
* simply reports what it could.
|
|
735
|
+
*/
|
|
736
|
+
function compiledPackFreshness(packs) {
|
|
737
|
+
const out = [];
|
|
738
|
+
for (const pack of packs.validPacks ?? []) {
|
|
739
|
+
if (!packHasCompiledContributions(pack.manifest))
|
|
740
|
+
continue;
|
|
741
|
+
try {
|
|
742
|
+
out.push(detectPackAssetFreshness(pack));
|
|
743
|
+
}
|
|
744
|
+
catch {
|
|
745
|
+
/* best-effort */
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
return out;
|
|
749
|
+
}
|
|
750
|
+
/**
|
|
751
|
+
* Summarise a config LOAD failure for the inspection. Only CONFIG_INVALID is a
|
|
752
|
+
* failure of a config file that exists; a missing sharkcraft/ folder has its
|
|
753
|
+
* own doctor check and is not reported here.
|
|
754
|
+
*/
|
|
755
|
+
function describeConfigLoadError(error) {
|
|
756
|
+
if (error.code !== ERROR_CODES.CONFIG_INVALID)
|
|
757
|
+
return {};
|
|
758
|
+
const details = error.details ?? {};
|
|
759
|
+
const fullPath = details['fullPath'];
|
|
760
|
+
const issues = [];
|
|
761
|
+
const rawIssues = details['issues'];
|
|
762
|
+
if (Array.isArray(rawIssues)) {
|
|
763
|
+
for (const raw of rawIssues) {
|
|
764
|
+
const iss = (raw ?? {});
|
|
765
|
+
const at = (iss.path ?? []).map(String).join('.') || '<root>';
|
|
766
|
+
issues.push(`${at}: ${typeof iss.message === 'string' ? iss.message : 'invalid value'}`);
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
// An import failure (e.g. a syntax error) carries no schema issues; its
|
|
770
|
+
// cause is the build/evaluation error.
|
|
771
|
+
const cause = error.cause;
|
|
772
|
+
if (issues.length === 0 && cause instanceof Error) {
|
|
773
|
+
issues.push((cause.message.split('\n')[0] ?? cause.message).trim());
|
|
774
|
+
}
|
|
775
|
+
return {
|
|
776
|
+
configLoadError: {
|
|
777
|
+
file: typeof fullPath === 'string' ? fullPath : null,
|
|
778
|
+
message: error.message,
|
|
779
|
+
issues,
|
|
780
|
+
},
|
|
781
|
+
};
|
|
782
|
+
}
|
|
611
783
|
export function runDoctor(inspection, options = {}) {
|
|
612
784
|
const checks = [];
|
|
613
785
|
if (!inspection.workspace.hasPackageJson) {
|
|
@@ -644,7 +816,25 @@ export function runDoctor(inspection, options = {}) {
|
|
|
644
816
|
message: `Found at ${inspection.sharkcraftDir}`,
|
|
645
817
|
});
|
|
646
818
|
}
|
|
647
|
-
if (
|
|
819
|
+
if (inspection.configLoadError) {
|
|
820
|
+
// A config file EXISTS but was rejected. The loader then drops the WHOLE
|
|
821
|
+
// config — its knowledge/rule/template file lists and every config-declared
|
|
822
|
+
// plane — so this is an error, and it is never also "no config file".
|
|
823
|
+
const failure = inspection.configLoadError;
|
|
824
|
+
const where = failure.file ?? 'sharkcraft/sharkcraft.config.ts';
|
|
825
|
+
const detail = failure.issues.length > 0 ? failure.issues.join('; ') : failure.message;
|
|
826
|
+
checks.push({
|
|
827
|
+
id: 'config',
|
|
828
|
+
title: 'sharkcraft.config.ts',
|
|
829
|
+
severity: DoctorSeverity.Error,
|
|
830
|
+
category: 'config-invalid',
|
|
831
|
+
code: 'config-invalid',
|
|
832
|
+
message: `Invalid config ${where} — NOT loaded, every config-declared setting and plane is dropped: ${detail}`,
|
|
833
|
+
fix: `Fix the listed fields in ${where} (every key is validated against SharkCraftConfigSchema), then re-run \`shrk doctor\`.`,
|
|
834
|
+
whyThisMatters: 'An invalid config is discarded whole: its knowledge/rule/template file lists and every gate plane (wiring rules, registries, policy rules, baselines, …) silently fall back to nothing.',
|
|
835
|
+
});
|
|
836
|
+
}
|
|
837
|
+
else if (!inspection.configFile) {
|
|
648
838
|
checks.push({
|
|
649
839
|
id: 'config',
|
|
650
840
|
title: 'sharkcraft.config.ts',
|
|
@@ -661,6 +851,22 @@ export function runDoctor(inspection, options = {}) {
|
|
|
661
851
|
message: `Loaded from ${inspection.configFile}`,
|
|
662
852
|
});
|
|
663
853
|
}
|
|
854
|
+
// A replacing `registryLifecycle.skipDirs` that drops node_modules / dist / …
|
|
855
|
+
// makes the lifecycle scan read vendored and generated code. The one
|
|
856
|
+
// skip-dir authority decides; this only reports what it dropped.
|
|
857
|
+
const lifecycleSkip = inspection.config?.registryLifecycle;
|
|
858
|
+
if (lifecycleSkip?.skipDirs !== undefined) {
|
|
859
|
+
const { droppedDefaults } = resolveRegistryLifecycleSkipDirs(lifecycleSkip);
|
|
860
|
+
if (droppedDefaults.length > 0) {
|
|
861
|
+
checks.push({
|
|
862
|
+
id: 'registry-lifecycle-skip-dirs',
|
|
863
|
+
title: 'registryLifecycle.skipDirs',
|
|
864
|
+
severity: DoctorSeverity.Warning,
|
|
865
|
+
message: registryLifecycleSkipDirsWarning(droppedDefaults),
|
|
866
|
+
fix: `Use \`registryLifecycle.skipDirsAdd\` (extends the defaults), or add ${droppedDefaults.join(', ')} back to \`skipDirs\`.`,
|
|
867
|
+
});
|
|
868
|
+
}
|
|
869
|
+
}
|
|
664
870
|
if (inspection.knowledgeEntries.length === 0) {
|
|
665
871
|
checks.push({
|
|
666
872
|
id: 'knowledge',
|
|
@@ -729,6 +935,25 @@ export function runDoctor(inspection, options = {}) {
|
|
|
729
935
|
});
|
|
730
936
|
}
|
|
731
937
|
}
|
|
938
|
+
// Compiled pack contributions served from an older build (or with no build
|
|
939
|
+
// record at all). The one freshness authority computed this at inspection;
|
|
940
|
+
// absent for TS-source packs, so a repo without compiled packs sees nothing.
|
|
941
|
+
for (const f of inspection.packAssetFreshness ?? []) {
|
|
942
|
+
if (f.build.state !== 'stale' && f.build.state !== 'unrecorded')
|
|
943
|
+
continue;
|
|
944
|
+
const said = describePackAssetFreshness(f).build;
|
|
945
|
+
if (!said)
|
|
946
|
+
continue;
|
|
947
|
+
checks.push({
|
|
948
|
+
id: `pack-compiled-artifacts-${f.packageName}`,
|
|
949
|
+
title: 'Pack compiled artifacts',
|
|
950
|
+
severity: DoctorSeverity.Warning,
|
|
951
|
+
category: 'pack-compiled-artifacts',
|
|
952
|
+
code: f.build.state === 'stale' ? 'compiled-artifacts-stale' : 'compiled-artifacts-unrecorded',
|
|
953
|
+
message: said,
|
|
954
|
+
...(f.build.rebuildCommand ? { fix: `(cd ${f.packageRoot} && ${f.build.rebuildCommand})` } : {}),
|
|
955
|
+
});
|
|
956
|
+
}
|
|
732
957
|
if (inspection.pipelines.length === 0) {
|
|
733
958
|
checks.push({
|
|
734
959
|
id: 'pipelines',
|
|
@@ -763,6 +988,10 @@ export function runDoctor(inspection, options = {}) {
|
|
|
763
988
|
});
|
|
764
989
|
}
|
|
765
990
|
for (const w of inspection.warnings) {
|
|
991
|
+
// The config load failure is already reported above as an error; do not
|
|
992
|
+
// repeat it as a second, weaker "Loader warning".
|
|
993
|
+
if (w === inspection.configLoadError?.message)
|
|
994
|
+
continue;
|
|
766
995
|
checks.push({
|
|
767
996
|
id: `warning-${checks.length}`,
|
|
768
997
|
title: 'Loader warning',
|
|
@@ -779,6 +1008,26 @@ export function runDoctor(inspection, options = {}) {
|
|
|
779
1008
|
fix: v.source ? `Edit ${v.source}` : undefined,
|
|
780
1009
|
});
|
|
781
1010
|
}
|
|
1011
|
+
// Round 15 follow-up (F3): a knowledge entry its loader REFUSED never reached
|
|
1012
|
+
// the corpus, so this doctor's "N entries loaded" and "Ready ✓" stood over it
|
|
1013
|
+
// (only `self-config doctor` said so). Named here, and counted UNEXAMINED in
|
|
1014
|
+
// the coverage below — THE list the stale-check and quality read too.
|
|
1015
|
+
const refusedKnowledge = knowledgeRejectedEntries(inspection);
|
|
1016
|
+
for (const r of refusedKnowledge) {
|
|
1017
|
+
checks.push({
|
|
1018
|
+
id: `knowledge-rejected-${r.label}`,
|
|
1019
|
+
title: `Knowledge entry rejected at load (${r.kind})`,
|
|
1020
|
+
severity: DoctorSeverity.Warning,
|
|
1021
|
+
category: 'asset-load-failed',
|
|
1022
|
+
code: 'knowledge-entry-rejected',
|
|
1023
|
+
// The id (a label may carry the declaration site too), then the site once.
|
|
1024
|
+
message: `${r.entryId ?? 'an entry with no id'} in ${r.source}${r.at !== undefined ? ` (${r.at})` : ''}${r.pack !== undefined ? ` — pack ${r.pack}` : ''}: ${r.message}`,
|
|
1025
|
+
fix: r.pack !== undefined
|
|
1026
|
+
? `Fix it upstream in pack ${r.pack} — \`shrk packs test <pack-dir> --load\` names every refused entry.`
|
|
1027
|
+
: `Fix the entry in ${r.source} — \`shrk self-config doctor\` lists every refused entry.`,
|
|
1028
|
+
whyThisMatters: 'A refused entry never reaches the corpus: an agent never sees it, and `knowledge stale-check` never checks what it claims.',
|
|
1029
|
+
});
|
|
1030
|
+
}
|
|
782
1031
|
// Surface profile drift advisory. Warn (advisory) when the
|
|
783
1032
|
// configured `surface.profile` no longer matches what the workspace
|
|
784
1033
|
// shape suggests today, so the user knows to re-run init or override.
|
|
@@ -851,7 +1100,45 @@ export function runDoctor(inspection, options = {}) {
|
|
|
851
1100
|
summary.advisoryCount += 1;
|
|
852
1101
|
}
|
|
853
1102
|
}
|
|
854
|
-
|
|
1103
|
+
// A compiled pack build with NO build record was never compared with its
|
|
1104
|
+
// source, so the build the pack serves is unverified. The warning check above
|
|
1105
|
+
// names it; this record is what keeps `shrk doctor` from reading "Ready ✓"
|
|
1106
|
+
// over it (settled NOT VERIFIED, 2, like `packs doctor`). A stale build WAS
|
|
1107
|
+
// compared (its finding stays a warning), and a repo with no compiled pack,
|
|
1108
|
+
// or only fresh builds, gets no record at all.
|
|
1109
|
+
const compiledBuilds = (inspection.packAssetFreshness ?? []).filter((f) => f.build.state !== 'not-compiled');
|
|
1110
|
+
const unrecordedBuilds = compiledBuilds
|
|
1111
|
+
.filter((f) => f.build.state === 'unrecorded')
|
|
1112
|
+
.map((f) => f.packageName)
|
|
1113
|
+
.sort();
|
|
1114
|
+
const coverage = [
|
|
1115
|
+
...(unrecordedBuilds.length > 0
|
|
1116
|
+
? [
|
|
1117
|
+
{
|
|
1118
|
+
unit: 'compiled pack builds',
|
|
1119
|
+
expected: compiledBuilds.length,
|
|
1120
|
+
examined: compiledBuilds.length - unrecordedBuilds.length,
|
|
1121
|
+
unexamined: unrecordedBuilds,
|
|
1122
|
+
reason: 'no build record, so the compiled artifacts they serve were never compared with their source (rebuild the pack to record one)',
|
|
1123
|
+
},
|
|
1124
|
+
]
|
|
1125
|
+
: []),
|
|
1126
|
+
// Round 15 follow-up (F3): refused knowledge entries were declared and never
|
|
1127
|
+
// checked — the run settles NOT VERIFIED (2) over them, never "Ready ✓".
|
|
1128
|
+
...(refusedKnowledge.length > 0
|
|
1129
|
+
? [
|
|
1130
|
+
{
|
|
1131
|
+
unit: 'knowledge entries',
|
|
1132
|
+
expected: inspection.knowledgeEntries.length + refusedKnowledge.length,
|
|
1133
|
+
examined: inspection.knowledgeEntries.length,
|
|
1134
|
+
unexamined: refusedKnowledge.slice(0, 20).map((r) => r.label),
|
|
1135
|
+
unexaminedTotal: refusedKnowledge.length,
|
|
1136
|
+
reason: 'rejected at load — not checked (their loader refused them; fix each entry)',
|
|
1137
|
+
},
|
|
1138
|
+
]
|
|
1139
|
+
: []),
|
|
1140
|
+
];
|
|
1141
|
+
return { passed: summary.errors === 0, checks, summary, ...(coverage.length > 0 ? { coverage } : {}) };
|
|
855
1142
|
}
|
|
856
1143
|
function actionHintWhyThisMatters(code) {
|
|
857
1144
|
switch (code) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec-evidence.d.ts","sourceRoot":"","sources":["../../src/spec/spec-evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;
|
|
1
|
+
{"version":3,"file":"spec-evidence.d.ts","sourceRoot":"","sources":["../../src/spec/spec-evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH,uEAAuE;AACvE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,cAAc,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,CAAC;AAE1F,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,yDAAyD;IACzD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,qDAAqD;IACrD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,CAAC;CACjD;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,QAAQ,EAAE,SAAS,wBAAwB,EAAE,CAAC;IACvD,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,oFAAoF;IACpF,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACzD;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,QAAQ,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACjD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,iFAAiF;IACjF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAgCD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,4BAA4B,GAClC,wBAAwB,CAQ1B"}
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
* for collecting `changedFiles` + `fileContents` (see the CLI
|
|
21
21
|
* `collectChangedPaths` helper and `spec verify --coverage`).
|
|
22
22
|
*/
|
|
23
|
+
// THE identifier tokenizer — shared with reuse and the recommender.
|
|
24
|
+
import { matchesAny, TEST_FILE_GLOBS } from '@shrkcrft/boundaries';
|
|
25
|
+
import { splitIdentifierTokens } from "../split-identifier.js";
|
|
23
26
|
/** Cap on evidence items retained per criterion (deterministic, insertion-ordered). */
|
|
24
27
|
const MAX_EVIDENCE_PER_CRITERION = 12;
|
|
25
28
|
/**
|
|
@@ -83,7 +86,7 @@ function analyzeCriterion(criterion, input) {
|
|
|
83
86
|
};
|
|
84
87
|
}
|
|
85
88
|
function collectFileEvidence(file, content, keywords, push) {
|
|
86
|
-
const pathTokens =
|
|
89
|
+
const pathTokens = splitIdentifierTokens(stripExtension(baseName(file)));
|
|
87
90
|
if (isTestFile(file)) {
|
|
88
91
|
// A new test backs a criterion when its path (or an exported helper)
|
|
89
92
|
// names the feature. Test files are reported ONLY as `test` evidence.
|
|
@@ -93,7 +96,7 @@ function collectFileEvidence(file, content, keywords, push) {
|
|
|
93
96
|
return;
|
|
94
97
|
}
|
|
95
98
|
for (const symbol of extractExportedSymbols(content)) {
|
|
96
|
-
const hit = firstMatch(
|
|
99
|
+
const hit = firstMatch(splitIdentifierTokens(symbol), keywords);
|
|
97
100
|
if (hit) {
|
|
98
101
|
push({ kind: 'test', file, detail: symbol, matched: hit });
|
|
99
102
|
return;
|
|
@@ -108,7 +111,7 @@ function collectFileEvidence(file, content, keywords, push) {
|
|
|
108
111
|
}
|
|
109
112
|
// symbol: a newly exported declaration names the feature.
|
|
110
113
|
for (const symbol of extractExportedSymbols(content)) {
|
|
111
|
-
const hit = firstMatch(
|
|
114
|
+
const hit = firstMatch(splitIdentifierTokens(symbol), keywords);
|
|
112
115
|
if (hit)
|
|
113
116
|
push({ kind: 'symbol', file, detail: symbol, matched: hit });
|
|
114
117
|
}
|
|
@@ -119,7 +122,7 @@ function collectFileEvidence(file, content, keywords, push) {
|
|
|
119
122
|
continue;
|
|
120
123
|
const member = registrationMember(line);
|
|
121
124
|
if (member) {
|
|
122
|
-
const hit = firstMatch(
|
|
125
|
+
const hit = firstMatch(splitIdentifierTokens(member), keywords);
|
|
123
126
|
if (hit) {
|
|
124
127
|
const kind = ROUTE_MARKER.test(line) ? 'route' : 'registration';
|
|
125
128
|
push({ kind, file, detail: member, matched: hit });
|
|
@@ -174,25 +177,13 @@ function extractExportedSymbols(content) {
|
|
|
174
177
|
function extractKeywords(text) {
|
|
175
178
|
const out = new Set();
|
|
176
179
|
for (const raw of text.toLowerCase().match(/[a-z0-9][a-z0-9_-]*/g) ?? []) {
|
|
177
|
-
for (const tok of
|
|
180
|
+
for (const tok of splitIdentifierTokens(raw)) {
|
|
178
181
|
if (tok.length >= 3 && !STOPWORDS.has(tok))
|
|
179
182
|
out.add(tok);
|
|
180
183
|
}
|
|
181
184
|
}
|
|
182
185
|
return out;
|
|
183
186
|
}
|
|
184
|
-
/**
|
|
185
|
-
* Split an identifier into lowercase tokens across camelCase, PascalCase,
|
|
186
|
-
* snake_case, kebab-case and digit boundaries.
|
|
187
|
-
*/
|
|
188
|
-
function tokenizeIdentifier(name) {
|
|
189
|
-
return name
|
|
190
|
-
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
|
|
191
|
-
.replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2')
|
|
192
|
-
.split(/[^A-Za-z0-9]+/)
|
|
193
|
-
.map((t) => t.toLowerCase())
|
|
194
|
-
.filter((t) => t.length > 0);
|
|
195
|
-
}
|
|
196
187
|
function firstMatch(tokens, keywords) {
|
|
197
188
|
for (const t of tokens) {
|
|
198
189
|
if (keywords.has(t))
|
|
@@ -200,10 +191,13 @@ function firstMatch(tokens, keywords) {
|
|
|
200
191
|
}
|
|
201
192
|
return null;
|
|
202
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* "Is this a test file?" through THE test-file layout list, `TEST_FILE_GLOBS`
|
|
196
|
+
* (the one a boundary rule's `excludeTests: true` expands to), so spec
|
|
197
|
+
* evidence and the boundary gate agree on which files are tests.
|
|
198
|
+
*/
|
|
203
199
|
function isTestFile(file) {
|
|
204
|
-
return (
|
|
205
|
-
file.includes('/__tests__/') ||
|
|
206
|
-
file.startsWith('__tests__/'));
|
|
200
|
+
return matchesAny(file.split('\\').join('/'), TEST_FILE_GLOBS);
|
|
207
201
|
}
|
|
208
202
|
function baseName(file) {
|
|
209
203
|
const norm = file.split('\\').join('/');
|