@shrkcrft/inspector 0.1.0-alpha.30 → 0.1.0-alpha.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acceptance-replay.js +1 -1
- package/dist/agent-contract-templates.js +6 -6
- package/dist/agent-contract.d.ts.map +1 -1
- package/dist/agent-contract.js +13 -8
- package/dist/agent-orchestration.js +2 -2
- package/dist/agent-task-prep.d.ts +16 -0
- package/dist/agent-task-prep.d.ts.map +1 -1
- package/dist/agent-task-prep.js +51 -4
- package/dist/ai-readiness.d.ts.map +1 -1
- package/dist/ai-readiness.js +21 -3
- package/dist/architecture-map.d.ts +16 -0
- package/dist/architecture-map.d.ts.map +1 -1
- package/dist/architecture-map.js +42 -26
- package/dist/area-explore.d.ts +2 -2
- package/dist/area-explore.d.ts.map +1 -1
- package/dist/area-explore.js +36 -16
- package/dist/area-map.d.ts +56 -11
- package/dist/area-map.d.ts.map +1 -1
- package/dist/area-map.js +106 -25
- package/dist/asset-doctor-proposed-exit.d.ts +21 -0
- package/dist/asset-doctor-proposed-exit.d.ts.map +1 -0
- package/dist/asset-doctor-proposed-exit.js +22 -0
- package/dist/asset-provenance.js +1 -1
- package/dist/boundaries-changed-only.d.ts +24 -1
- package/dist/boundaries-changed-only.d.ts.map +1 -1
- package/dist/boundaries-changed-only.js +12 -2
- package/dist/boundary-check-options.model.d.ts +40 -0
- package/dist/boundary-check-options.model.d.ts.map +1 -0
- package/dist/boundary-check-options.model.js +1 -0
- package/dist/boundary-check-result.model.d.ts +89 -0
- package/dist/boundary-check-result.model.d.ts.map +1 -0
- package/dist/boundary-check-result.model.js +1 -0
- package/dist/boundary-configuration-status.d.ts +38 -0
- package/dist/boundary-configuration-status.d.ts.map +1 -0
- package/dist/boundary-configuration-status.js +118 -0
- package/dist/boundary-configuration-status.model.d.ts +37 -0
- package/dist/boundary-configuration-status.model.d.ts.map +1 -0
- package/dist/boundary-configuration-status.model.js +1 -0
- package/dist/boundary-load-issue.model.d.ts +30 -0
- package/dist/boundary-load-issue.model.d.ts.map +1 -0
- package/dist/boundary-load-issue.model.js +1 -0
- package/dist/boundary-rule-check.model.d.ts +44 -0
- package/dist/boundary-rule-check.model.d.ts.map +1 -0
- package/dist/boundary-rule-check.model.js +1 -0
- package/dist/boundary-rule-invalidation.model.d.ts +31 -0
- package/dist/boundary-rule-invalidation.model.d.ts.map +1 -0
- package/dist/boundary-rule-invalidation.model.js +1 -0
- package/dist/boundary-rule-set-diff.model.d.ts +75 -0
- package/dist/boundary-rule-set-diff.model.d.ts.map +1 -0
- package/dist/boundary-rule-set-diff.model.js +1 -0
- package/dist/boundary-rule-sources.d.ts +28 -0
- package/dist/boundary-rule-sources.d.ts.map +1 -0
- package/dist/boundary-rule-sources.js +110 -0
- package/dist/boundary-stale-exception-finding.model.d.ts +12 -0
- package/dist/boundary-stale-exception-finding.model.d.ts.map +1 -0
- package/dist/boundary-stale-exception-finding.model.js +1 -0
- package/dist/boundary-unit-liveness.d.ts +35 -0
- package/dist/boundary-unit-liveness.d.ts.map +1 -0
- package/dist/boundary-unit-liveness.js +71 -0
- package/dist/change-intent.d.ts +3 -0
- package/dist/change-intent.d.ts.map +1 -1
- package/dist/change-intent.js +61 -27
- package/dist/changes-summary.d.ts.map +1 -1
- package/dist/changes-summary.js +19 -9
- package/dist/ci-integrity-report.js +1 -1
- package/dist/ci-predict.d.ts.map +1 -1
- package/dist/ci-predict.js +38 -5
- package/dist/code-intelligence-doctor.d.ts +6 -0
- package/dist/code-intelligence-doctor.d.ts.map +1 -1
- package/dist/code-intelligence-doctor.js +22 -7
- package/dist/command-recommender.d.ts +45 -2
- package/dist/command-recommender.d.ts.map +1 -1
- package/dist/command-recommender.js +41 -263
- package/dist/command-resolution-status.d.ts +44 -0
- package/dist/command-resolution-status.d.ts.map +1 -0
- package/dist/command-resolution-status.js +44 -0
- package/dist/command-safety-level.d.ts +15 -0
- package/dist/command-safety-level.d.ts.map +1 -0
- package/dist/command-safety-level.js +43 -0
- package/dist/command-taxonomy.js +1 -1
- package/dist/compliance-evidence.js +1 -1
- package/dist/compliance-profiles.js +1 -1
- package/dist/construct-registry.d.ts +40 -0
- package/dist/construct-registry.d.ts.map +1 -1
- package/dist/construct-registry.js +186 -82
- package/dist/context-tuning.d.ts +4 -0
- package/dist/context-tuning.d.ts.map +1 -1
- package/dist/context-tuning.js +10 -7
- package/dist/contract-template-registry.d.ts +10 -0
- package/dist/contract-template-registry.d.ts.map +1 -1
- package/dist/contract-template-registry.js +59 -33
- package/dist/contribution-kind.d.ts +52 -0
- package/dist/contribution-kind.d.ts.map +1 -0
- package/dist/contribution-kind.js +52 -0
- package/dist/contribution-load-failures.d.ts +106 -0
- package/dist/contribution-load-failures.d.ts.map +1 -0
- package/dist/contribution-load-failures.js +575 -0
- package/dist/contributions-report.d.ts +28 -0
- package/dist/contributions-report.d.ts.map +1 -0
- package/dist/contributions-report.js +242 -0
- package/dist/convention-registry.d.ts +22 -0
- package/dist/convention-registry.d.ts.map +1 -1
- package/dist/convention-registry.js +79 -39
- package/dist/coverage-report.d.ts.map +1 -1
- package/dist/coverage-report.js +6 -6
- package/dist/custom-checks.d.ts +60 -1
- package/dist/custom-checks.d.ts.map +1 -1
- package/dist/custom-checks.js +159 -6
- package/dist/dashboard/dashboard-data.d.ts +6 -0
- package/dist/dashboard/dashboard-data.d.ts.map +1 -1
- package/dist/dashboard/dashboard-data.js +99 -8
- package/dist/dashboard/dashboard-knowledge.d.ts.map +1 -1
- package/dist/dashboard/dashboard-knowledge.js +14 -2
- package/dist/decision-records.d.ts +20 -0
- package/dist/decision-records.d.ts.map +1 -1
- package/dist/decision-records.js +68 -20
- package/dist/declared-cross-references.d.ts +61 -0
- package/dist/declared-cross-references.d.ts.map +1 -0
- package/dist/declared-cross-references.js +550 -0
- package/dist/declared-gate-plane-rules.d.ts +24 -0
- package/dist/declared-gate-plane-rules.d.ts.map +1 -0
- package/dist/declared-gate-plane-rules.js +39 -0
- package/dist/declared-reference-coverage.d.ts +27 -0
- package/dist/declared-reference-coverage.d.ts.map +1 -0
- package/dist/declared-reference-coverage.js +50 -0
- package/dist/declared-xref-status.d.ts +19 -0
- package/dist/declared-xref-status.d.ts.map +1 -0
- package/dist/declared-xref-status.js +19 -0
- package/dist/delegate-pack-recipes.d.ts +13 -2
- package/dist/delegate-pack-recipes.d.ts.map +1 -1
- package/dist/delegate-pack-recipes.js +45 -14
- package/dist/demo-package.js +2 -2
- package/dist/demo-script.js +2 -2
- package/dist/demo-workflow.js +3 -3
- package/dist/dev-cycle.js +1 -1
- package/dist/dev-session.js +1 -1
- package/dist/doc-references.d.ts +23 -2
- package/dist/doc-references.d.ts.map +1 -1
- package/dist/doc-references.js +96 -17
- package/dist/doctor-result.d.ts +8 -0
- package/dist/doctor-result.d.ts.map +1 -1
- package/dist/doctor-verdict-kind.d.ts +19 -0
- package/dist/doctor-verdict-kind.d.ts.map +1 -0
- package/dist/doctor-verdict-kind.js +19 -0
- package/dist/doctor-verdict.d.ts +18 -0
- package/dist/doctor-verdict.d.ts.map +1 -0
- package/dist/doctor-verdict.js +28 -0
- package/dist/drift.d.ts +17 -0
- package/dist/drift.d.ts.map +1 -1
- package/dist/drift.js +40 -10
- package/dist/entrypoint-matrix.d.ts.map +1 -1
- package/dist/entrypoint-matrix.js +4 -1
- package/dist/feedback-ingestion.d.ts +28 -2
- package/dist/feedback-ingestion.d.ts.map +1 -1
- package/dist/feedback-ingestion.js +68 -19
- package/dist/fix-preview.d.ts.map +1 -1
- package/dist/fix-preview.js +9 -5
- package/dist/framework-extractor-outcomes.d.ts +27 -0
- package/dist/framework-extractor-outcomes.d.ts.map +1 -0
- package/dist/framework-extractor-outcomes.js +83 -0
- package/dist/fuzzy-impact.js +1 -1
- package/dist/healing-plan.d.ts.map +1 -1
- package/dist/healing-plan.js +3 -4
- package/dist/helper-catalog.d.ts +25 -0
- package/dist/helper-catalog.d.ts.map +1 -0
- package/dist/helper-catalog.js +91 -0
- package/dist/helper-registry.d.ts.map +1 -1
- package/dist/helper-registry.js +17 -1
- package/dist/helper-view.d.ts +33 -0
- package/dist/helper-view.d.ts.map +1 -0
- package/dist/helper-view.js +1 -0
- package/dist/i-asset-doctor-flags.d.ts +16 -0
- package/dist/i-asset-doctor-flags.d.ts.map +1 -0
- package/dist/i-asset-doctor-flags.js +1 -0
- package/dist/i-command-resolution.d.ts +22 -0
- package/dist/i-command-resolution.d.ts.map +1 -0
- package/dist/i-command-resolution.js +1 -0
- package/dist/i-command-resolve-options.d.ts +24 -0
- package/dist/i-command-resolve-options.d.ts.map +1 -0
- package/dist/i-command-resolve-options.js +1 -0
- package/dist/i-command-safety.d.ts +13 -0
- package/dist/i-command-safety.d.ts.map +1 -0
- package/dist/i-command-safety.js +1 -0
- package/dist/i-contribution-accepted-entry.d.ts +18 -0
- package/dist/i-contribution-accepted-entry.d.ts.map +1 -0
- package/dist/i-contribution-accepted-entry.js +1 -0
- package/dist/i-contribution-entry-rejection.d.ts +21 -0
- package/dist/i-contribution-entry-rejection.d.ts.map +1 -0
- package/dist/i-contribution-entry-rejection.js +1 -0
- package/dist/i-contribution-file-issue.d.ts +18 -0
- package/dist/i-contribution-file-issue.d.ts.map +1 -0
- package/dist/i-contribution-file-issue.js +1 -0
- package/dist/i-contribution-file-report.d.ts +40 -0
- package/dist/i-contribution-file-report.d.ts.map +1 -0
- package/dist/i-contribution-file-report.js +1 -0
- package/dist/i-contribution-file-validation.d.ts +24 -0
- package/dist/i-contribution-file-validation.d.ts.map +1 -0
- package/dist/i-contribution-file-validation.js +1 -0
- package/dist/i-contributions-report.d.ts +31 -0
- package/dist/i-contributions-report.d.ts.map +1 -0
- package/dist/i-contributions-report.js +1 -0
- package/dist/i-declared-xref-field.d.ts +25 -0
- package/dist/i-declared-xref-field.d.ts.map +1 -0
- package/dist/i-declared-xref-field.js +1 -0
- package/dist/i-declared-xref-issue.d.ts +25 -0
- package/dist/i-declared-xref-issue.d.ts.map +1 -0
- package/dist/i-declared-xref-issue.js +1 -0
- package/dist/i-declared-xref-report.d.ts +48 -0
- package/dist/i-declared-xref-report.d.ts.map +1 -0
- package/dist/i-declared-xref-report.js +1 -0
- package/dist/i-declared-xref-row.d.ts +29 -0
- package/dist/i-declared-xref-row.d.ts.map +1 -0
- package/dist/i-declared-xref-row.js +1 -0
- package/dist/i-doctor-verdict.d.ts +10 -0
- package/dist/i-doctor-verdict.d.ts.map +1 -0
- package/dist/i-doctor-verdict.js +1 -0
- package/dist/i-kind-outcomes.d.ts +13 -0
- package/dist/i-kind-outcomes.d.ts.map +1 -0
- package/dist/i-kind-outcomes.js +1 -0
- package/dist/i-pack-doctor-verdict.d.ts +15 -0
- package/dist/i-pack-doctor-verdict.d.ts.map +1 -0
- package/dist/i-pack-doctor-verdict.js +1 -0
- package/dist/i-probed-id-field.d.ts +17 -0
- package/dist/i-probed-id-field.d.ts.map +1 -0
- package/dist/i-probed-id-field.js +1 -0
- package/dist/i-reference-kind-declaration.d.ts +38 -0
- package/dist/i-reference-kind-declaration.d.ts.map +1 -0
- package/dist/i-reference-kind-declaration.js +1 -0
- package/dist/i-reference-warm-options.d.ts +21 -0
- package/dist/i-reference-warm-options.d.ts.map +1 -0
- package/dist/i-reference-warm-options.js +1 -0
- package/dist/i-registry-outcomes.d.ts +16 -0
- package/dist/i-registry-outcomes.d.ts.map +1 -0
- package/dist/i-registry-outcomes.js +1 -0
- package/dist/i-scaffold-pattern-doctor-report.d.ts +35 -0
- package/dist/i-scaffold-pattern-doctor-report.d.ts.map +1 -0
- package/dist/i-scaffold-pattern-doctor-report.js +1 -0
- package/dist/i-search-tuning-key-probe.d.ts +30 -0
- package/dist/i-search-tuning-key-probe.d.ts.map +1 -0
- package/dist/i-search-tuning-key-probe.js +1 -0
- package/dist/i-search-tuning-lint-issue.d.ts +61 -0
- package/dist/i-search-tuning-lint-issue.d.ts.map +1 -0
- package/dist/i-search-tuning-lint-issue.js +1 -0
- package/dist/i-search-tuning-lint-report.d.ts +38 -0
- package/dist/i-search-tuning-lint-report.d.ts.map +1 -0
- package/dist/i-search-tuning-lint-report.js +1 -0
- package/dist/i-unresolvable-reference-scan.d.ts +14 -0
- package/dist/i-unresolvable-reference-scan.d.ts.map +1 -0
- package/dist/i-unresolvable-reference-scan.js +1 -0
- package/dist/i-unresolvable-reference.d.ts +29 -0
- package/dist/i-unresolvable-reference.d.ts.map +1 -0
- package/dist/i-unresolvable-reference.js +1 -0
- package/dist/i-workspace-profile-payload.d.ts +12 -0
- package/dist/i-workspace-profile-payload.d.ts.map +1 -0
- package/dist/i-workspace-profile-payload.js +1 -0
- package/dist/impact-analysis.d.ts +15 -0
- package/dist/impact-analysis.d.ts.map +1 -1
- package/dist/impact-analysis.js +58 -13
- package/dist/impact-render.d.ts.map +1 -1
- package/dist/impact-render.js +22 -0
- package/dist/import-hygiene.d.ts +35 -1
- package/dist/import-hygiene.d.ts.map +1 -1
- package/dist/import-hygiene.js +107 -13
- package/dist/index.d.ts +141 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +172 -0
- package/dist/inspection-discovery.d.ts +45 -0
- package/dist/inspection-discovery.d.ts.map +1 -0
- package/dist/inspection-discovery.js +70 -0
- package/dist/knowledge-advisory-code.d.ts +17 -0
- package/dist/knowledge-advisory-code.d.ts.map +1 -0
- package/dist/knowledge-advisory-code.js +17 -0
- package/dist/knowledge-aged-entry.d.ts +10 -0
- package/dist/knowledge-aged-entry.d.ts.map +1 -0
- package/dist/knowledge-aged-entry.js +1 -0
- package/dist/knowledge-authoring.d.ts +24 -1
- package/dist/knowledge-authoring.d.ts.map +1 -1
- package/dist/knowledge-authoring.js +46 -7
- package/dist/knowledge-entry-verdict-record.d.ts +22 -0
- package/dist/knowledge-entry-verdict-record.d.ts.map +1 -0
- package/dist/knowledge-entry-verdict-record.js +1 -0
- package/dist/knowledge-entry-verdict.d.ts +17 -0
- package/dist/knowledge-entry-verdict.d.ts.map +1 -0
- package/dist/knowledge-entry-verdict.js +17 -0
- package/dist/knowledge-graph.d.ts +6 -0
- package/dist/knowledge-graph.d.ts.map +1 -1
- package/dist/knowledge-graph.js +18 -7
- package/dist/knowledge-kind-bucket.d.ts +19 -0
- package/dist/knowledge-kind-bucket.d.ts.map +1 -0
- package/dist/knowledge-kind-bucket.js +1 -0
- package/dist/knowledge-load-failure.d.ts +23 -0
- package/dist/knowledge-load-failure.d.ts.map +1 -0
- package/dist/knowledge-load-failure.js +1 -0
- package/dist/knowledge-reference-kind-bucket.d.ts +11 -0
- package/dist/knowledge-reference-kind-bucket.d.ts.map +1 -0
- package/dist/knowledge-reference-kind-bucket.js +1 -0
- package/dist/knowledge-stale-advisory.d.ts +14 -0
- package/dist/knowledge-stale-advisory.d.ts.map +1 -0
- package/dist/knowledge-stale-advisory.js +1 -0
- package/dist/knowledge-stale-coverage.d.ts +19 -0
- package/dist/knowledge-stale-coverage.d.ts.map +1 -0
- package/dist/knowledge-stale-coverage.js +1 -0
- package/dist/knowledge-stale-gate-flags.d.ts +33 -0
- package/dist/knowledge-stale-gate-flags.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-flags.js +1 -0
- package/dist/knowledge-stale-gate-input.d.ts +46 -0
- package/dist/knowledge-stale-gate-input.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-input.js +1 -0
- package/dist/knowledge-stale-gate-result.d.ts +33 -0
- package/dist/knowledge-stale-gate-result.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-result.js +1 -0
- package/dist/knowledge-stale-gate-rule.d.ts +33 -0
- package/dist/knowledge-stale-gate-rule.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-rule.js +1 -0
- package/dist/knowledge-stale-gate-violation.d.ts +13 -0
- package/dist/knowledge-stale-gate-violation.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-violation.js +1 -0
- package/dist/knowledge-stale-gate.d.ts +83 -0
- package/dist/knowledge-stale-gate.d.ts.map +1 -0
- package/dist/knowledge-stale-gate.js +429 -0
- package/dist/knowledge-stale-quality-gate.d.ts +26 -0
- package/dist/knowledge-stale-quality-gate.d.ts.map +1 -0
- package/dist/knowledge-stale-quality-gate.js +110 -0
- package/dist/knowledge-stale.d.ts +122 -9
- package/dist/knowledge-stale.d.ts.map +1 -1
- package/dist/knowledge-stale.js +996 -291
- package/dist/knowledge-unverifiable-reason.d.ts +12 -0
- package/dist/knowledge-unverifiable-reason.d.ts.map +1 -0
- package/dist/knowledge-unverifiable-reason.js +12 -0
- package/dist/loader-diagnostics.d.ts +14 -2
- package/dist/loader-diagnostics.d.ts.map +1 -1
- package/dist/match-terms.d.ts +48 -0
- package/dist/match-terms.d.ts.map +1 -0
- package/dist/match-terms.js +155 -0
- package/dist/migration-profile-registry.d.ts +10 -0
- package/dist/migration-profile-registry.d.ts.map +1 -1
- package/dist/migration-profile-registry.js +57 -34
- package/dist/migration-readiness.d.ts.map +1 -1
- package/dist/migration-readiness.js +1 -3
- package/dist/nearest-id.d.ts +10 -26
- package/dist/nearest-id.d.ts.map +1 -1
- package/dist/nearest-id.js +9 -59
- package/dist/pack-asset-freshness.d.ts +65 -0
- package/dist/pack-asset-freshness.d.ts.map +1 -0
- package/dist/pack-asset-freshness.js +340 -0
- package/dist/pack-author-ux.d.ts +24 -3
- package/dist/pack-author-ux.d.ts.map +1 -1
- package/dist/pack-author-ux.js +87 -93
- package/dist/pack-contributions-inventory.d.ts +79 -39
- package/dist/pack-contributions-inventory.d.ts.map +1 -1
- package/dist/pack-contributions-inventory.js +443 -286
- package/dist/pack-doctor-verdict.d.ts +29 -0
- package/dist/pack-doctor-verdict.d.ts.map +1 -0
- package/dist/pack-doctor-verdict.js +45 -0
- package/dist/pack-doctor.d.ts +74 -1
- package/dist/pack-doctor.d.ts.map +1 -1
- package/dist/pack-doctor.js +281 -1
- package/dist/pack-helper-plan.d.ts +24 -0
- package/dist/pack-helper-plan.d.ts.map +1 -0
- package/dist/pack-helper-plan.js +77 -0
- package/dist/pack-helper-registry.d.ts +14 -0
- package/dist/pack-helper-registry.d.ts.map +1 -1
- package/dist/pack-helper-registry.js +76 -37
- package/dist/pack-manifest-reader.d.ts +8 -0
- package/dist/pack-manifest-reader.d.ts.map +1 -0
- package/dist/pack-manifest-reader.js +79 -0
- package/dist/pack-release-check.d.ts +14 -1
- package/dist/pack-release-check.d.ts.map +1 -1
- package/dist/pack-release-check.js +23 -1
- package/dist/pack-signature-status.d.ts +18 -6
- package/dist/pack-signature-status.d.ts.map +1 -1
- package/dist/pack-signature-status.js +59 -105
- package/dist/pack-test-runner.d.ts +27 -5
- package/dist/pack-test-runner.d.ts.map +1 -1
- package/dist/pack-test-runner.js +91 -35
- package/dist/pack-typecheck.d.ts +8 -0
- package/dist/pack-typecheck.d.ts.map +1 -0
- package/dist/pack-typecheck.js +76 -0
- package/dist/plan-review.d.ts +2 -0
- package/dist/plan-review.d.ts.map +1 -1
- package/dist/plan-review.js +17 -5
- package/dist/plan-simulation.d.ts.map +1 -1
- package/dist/plan-simulation.js +16 -5
- package/dist/playbook-load-issue.d.ts +16 -0
- package/dist/playbook-load-issue.d.ts.map +1 -0
- package/dist/playbook-load-issue.js +1 -0
- package/dist/playbook-registry.d.ts +32 -1
- package/dist/playbook-registry.d.ts.map +1 -1
- package/dist/playbook-registry.js +144 -55
- package/dist/policy-declaration.d.ts +18 -0
- package/dist/policy-declaration.d.ts.map +1 -0
- package/dist/policy-declaration.js +1 -0
- package/dist/policy-engine.d.ts +8 -0
- package/dist/policy-engine.d.ts.map +1 -1
- package/dist/policy-engine.js +26 -9
- package/dist/policy-overrides.d.ts.map +1 -1
- package/dist/policy-overrides.js +4 -4
- package/dist/policy-registry.d.ts +27 -0
- package/dist/policy-registry.d.ts.map +1 -1
- package/dist/policy-registry.js +87 -20
- package/dist/probed-id-fields.d.ts +21 -0
- package/dist/probed-id-fields.d.ts.map +1 -0
- package/dist/probed-id-fields.js +25 -0
- package/dist/probed-id-source.d.ts +11 -0
- package/dist/probed-id-source.d.ts.map +1 -0
- package/dist/probed-id-source.js +11 -0
- package/dist/profile-registry.d.ts +25 -2
- package/dist/profile-registry.d.ts.map +1 -1
- package/dist/profile-registry.js +59 -6
- package/dist/quality-gate-examination.d.ts +15 -0
- package/dist/quality-gate-examination.d.ts.map +1 -0
- package/dist/quality-gate-examination.js +15 -0
- package/dist/quality-gate-row-status.d.ts +19 -0
- package/dist/quality-gate-row-status.d.ts.map +1 -0
- package/dist/quality-gate-row-status.js +28 -0
- package/dist/quality-gate-status.d.ts +16 -0
- package/dist/quality-gate-status.d.ts.map +1 -0
- package/dist/quality-gate-status.js +16 -0
- package/dist/quality-html.d.ts.map +1 -1
- package/dist/quality-html.js +14 -3
- package/dist/quality-report-coverage.d.ts +26 -0
- package/dist/quality-report-coverage.d.ts.map +1 -0
- package/dist/quality-report-coverage.js +48 -0
- package/dist/quality-report.d.ts +28 -1
- package/dist/quality-report.d.ts.map +1 -1
- package/dist/quality-report.js +263 -35
- package/dist/query-intent-kind.d.ts +18 -0
- package/dist/query-intent-kind.d.ts.map +1 -0
- package/dist/query-intent-kind.js +18 -0
- package/dist/query-intent-result.d.ts +23 -0
- package/dist/query-intent-result.d.ts.map +1 -0
- package/dist/query-intent-result.js +1 -0
- package/dist/query-intent.d.ts +18 -0
- package/dist/query-intent.d.ts.map +1 -0
- package/dist/query-intent.js +336 -0
- package/dist/query-resolver.d.ts +18 -0
- package/dist/query-resolver.d.ts.map +1 -1
- package/dist/query-resolver.js +7 -4
- package/dist/ranked-recommendations.d.ts +36 -0
- package/dist/ranked-recommendations.d.ts.map +1 -0
- package/dist/ranked-recommendations.js +1 -0
- package/dist/ranker-explainability.d.ts.map +1 -1
- package/dist/ranker-explainability.js +38 -10
- package/dist/recommend-recipe.d.ts +17 -0
- package/dist/recommend-recipe.d.ts.map +1 -0
- package/dist/recommend-recipe.js +1 -0
- package/dist/recommend-recipes.d.ts +9 -0
- package/dist/recommend-recipes.d.ts.map +1 -0
- package/dist/recommend-recipes.js +106 -0
- package/dist/recommendation-candidate.d.ts +30 -0
- package/dist/recommendation-candidate.d.ts.map +1 -0
- package/dist/recommendation-candidate.js +1 -0
- package/dist/recommendation-confidence.d.ts +27 -0
- package/dist/recommendation-confidence.d.ts.map +1 -0
- package/dist/recommendation-confidence.js +1 -0
- package/dist/recommendation-ranking-options.d.ts +24 -0
- package/dist/recommendation-ranking-options.d.ts.map +1 -0
- package/dist/recommendation-ranking-options.js +1 -0
- package/dist/recommendation-ranking.d.ts +50 -0
- package/dist/recommendation-ranking.d.ts.map +1 -0
- package/dist/recommendation-ranking.js +527 -0
- package/dist/recommendation-source.d.ts +23 -0
- package/dist/recommendation-source.d.ts.map +1 -0
- package/dist/recommendation-source.js +23 -0
- package/dist/recommendation-suppression.d.ts +14 -0
- package/dist/recommendation-suppression.d.ts.map +1 -0
- package/dist/recommendation-suppression.js +14 -0
- package/dist/reference-asset-kind.d.ts +14 -0
- package/dist/reference-asset-kind.d.ts.map +1 -0
- package/dist/reference-asset-kind.js +14 -0
- package/dist/reference-content-check.d.ts +32 -0
- package/dist/reference-content-check.d.ts.map +1 -0
- package/dist/reference-content-check.js +143 -0
- package/dist/reference-failure.d.ts +31 -0
- package/dist/reference-failure.d.ts.map +1 -0
- package/dist/reference-failure.js +31 -0
- package/dist/reference-id-status.d.ts +15 -0
- package/dist/reference-id-status.d.ts.map +1 -0
- package/dist/reference-id-status.js +15 -0
- package/dist/reference-kind-declarations.d.ts +42 -0
- package/dist/reference-kind-declarations.d.ts.map +1 -0
- package/dist/reference-kind-declarations.js +142 -0
- package/dist/reference-lookup.d.ts +6 -0
- package/dist/reference-lookup.d.ts.map +1 -1
- package/dist/reference-lookup.js +13 -5
- package/dist/reference-registry.d.ts +109 -11
- package/dist/reference-registry.d.ts.map +1 -1
- package/dist/reference-registry.js +186 -30
- package/dist/reference-subject.d.ts +20 -0
- package/dist/reference-subject.d.ts.map +1 -0
- package/dist/reference-subject.js +1 -0
- package/dist/registration-hint-discovery-status.d.ts +25 -0
- package/dist/registration-hint-discovery-status.d.ts.map +1 -0
- package/dist/registration-hint-discovery-status.js +25 -0
- package/dist/registration-hint-registry.d.ts +80 -0
- package/dist/registration-hint-registry.d.ts.map +1 -1
- package/dist/registration-hint-registry.js +356 -138
- package/dist/registry-lifecycle.d.ts +200 -19
- package/dist/registry-lifecycle.d.ts.map +1 -1
- package/dist/registry-lifecycle.js +526 -136
- package/dist/release-readiness.d.ts.map +1 -1
- package/dist/release-readiness.js +10 -7
- package/dist/release-smoke.d.ts.map +1 -1
- package/dist/release-smoke.js +11 -7
- package/dist/report-site.d.ts.map +1 -1
- package/dist/report-site.js +25 -7
- package/dist/repository-intelligence.d.ts.map +1 -1
- package/dist/repository-intelligence.js +3 -2
- package/dist/repository-knowledge-model.d.ts.map +1 -1
- package/dist/repository-knowledge-model.js +18 -5
- package/dist/resolve-project-config.d.ts +64 -0
- package/dist/resolve-project-config.d.ts.map +1 -1
- package/dist/resolve-project-config.js +240 -32
- package/dist/reuse/compute-reuse-coverage.d.ts +29 -0
- package/dist/reuse/compute-reuse-coverage.d.ts.map +1 -0
- package/dist/reuse/compute-reuse-coverage.js +198 -0
- package/dist/reuse/rank-reuse-candidates.d.ts +38 -0
- package/dist/reuse/rank-reuse-candidates.d.ts.map +1 -0
- package/dist/reuse/rank-reuse-candidates.js +212 -0
- package/dist/reuse/rank-reuse-options.d.ts +20 -0
- package/dist/reuse/rank-reuse-options.d.ts.map +1 -0
- package/dist/reuse/rank-reuse-options.js +1 -0
- package/dist/reuse/rank-reuse-suggestions.d.ts +15 -0
- package/dist/reuse/rank-reuse-suggestions.d.ts.map +1 -0
- package/dist/reuse/rank-reuse-suggestions.js +31 -0
- package/dist/reuse/resolve-curated-reuse.d.ts +43 -0
- package/dist/reuse/resolve-curated-reuse.d.ts.map +1 -0
- package/dist/reuse/resolve-curated-reuse.js +115 -0
- package/dist/reuse/reuse-candidate.d.ts +29 -0
- package/dist/reuse/reuse-candidate.d.ts.map +1 -0
- package/dist/reuse/reuse-candidate.js +1 -0
- package/dist/reuse/reuse-coverage-report.d.ts +74 -0
- package/dist/reuse/reuse-coverage-report.d.ts.map +1 -0
- package/dist/reuse/reuse-coverage-report.js +1 -0
- package/dist/reuse/reuse-curated-coverage.d.ts +36 -0
- package/dist/reuse/reuse-curated-coverage.d.ts.map +1 -0
- package/dist/reuse/reuse-curated-coverage.js +1 -0
- package/dist/reuse/reuse-curated-resolution.d.ts +36 -0
- package/dist/reuse/reuse-curated-resolution.d.ts.map +1 -0
- package/dist/reuse/reuse-curated-resolution.js +1 -0
- package/dist/reuse/reuse-curated-status.d.ts +21 -0
- package/dist/reuse/reuse-curated-status.d.ts.map +1 -0
- package/dist/reuse/reuse-curated-status.js +21 -0
- package/dist/reuse/reuse-match-detail.d.ts +15 -0
- package/dist/reuse/reuse-match-detail.d.ts.map +1 -0
- package/dist/reuse/reuse-match-detail.js +1 -0
- package/dist/reuse/reuse-ranking.d.ts +37 -0
- package/dist/reuse/reuse-ranking.d.ts.map +1 -0
- package/dist/reuse/reuse-ranking.js +1 -0
- package/dist/reuse/reuse-suggestion.d.ts +19 -0
- package/dist/reuse/reuse-suggestion.d.ts.map +1 -0
- package/dist/reuse/reuse-suggestion.js +1 -0
- package/dist/reuse/reuse-symbol-lookup.d.ts +28 -0
- package/dist/reuse/reuse-symbol-lookup.d.ts.map +1 -0
- package/dist/reuse/reuse-symbol-lookup.js +1 -0
- package/dist/reuse/reuse-tokenize.d.ts +11 -0
- package/dist/reuse/reuse-tokenize.d.ts.map +1 -0
- package/dist/reuse/reuse-tokenize.js +26 -0
- package/dist/reuse/score-reuse-name.d.ts +16 -0
- package/dist/reuse/score-reuse-name.d.ts.map +1 -0
- package/dist/reuse/score-reuse-name.js +35 -0
- package/dist/reuse/score-reuse-primitive.d.ts +33 -0
- package/dist/reuse/score-reuse-primitive.d.ts.map +1 -0
- package/dist/reuse/score-reuse-primitive.js +92 -0
- package/dist/review-packet.d.ts +2 -0
- package/dist/review-packet.d.ts.map +1 -1
- package/dist/review-packet.js +13 -6
- package/dist/role-views.d.ts.map +1 -1
- package/dist/role-views.js +16 -16
- package/dist/routing-recommends-channels.d.ts +24 -0
- package/dist/routing-recommends-channels.d.ts.map +1 -0
- package/dist/routing-recommends-channels.js +19 -0
- package/dist/run-boundary-check.d.ts +118 -0
- package/dist/run-boundary-check.d.ts.map +1 -0
- package/dist/run-boundary-check.js +592 -0
- package/dist/safety-audit.js +1 -1
- package/dist/scaffold-coverage.js +1 -1
- package/dist/scaffold-pattern-doctor-report.d.ts +19 -0
- package/dist/scaffold-pattern-doctor-report.d.ts.map +1 -0
- package/dist/scaffold-pattern-doctor-report.js +54 -0
- package/dist/scaffold-patterns.d.ts +75 -1
- package/dist/scaffold-patterns.d.ts.map +1 -1
- package/dist/scaffold-patterns.js +375 -84
- package/dist/schema-inventory.d.ts.map +1 -1
- package/dist/schema-inventory.js +4 -3
- package/dist/search-document-id.d.ts +52 -0
- package/dist/search-document-id.d.ts.map +1 -0
- package/dist/search-document-id.js +72 -0
- package/dist/search-document-prefix.d.ts +7 -0
- package/dist/search-document-prefix.d.ts.map +1 -0
- package/dist/search-document-prefix.js +1 -0
- package/dist/search-index.d.ts.map +1 -1
- package/dist/search-index.js +20 -23
- package/dist/search-tuning-explain.d.ts +6 -0
- package/dist/search-tuning-explain.d.ts.map +1 -1
- package/dist/search-tuning-explain.js +19 -17
- package/dist/search-tuning-key-probes.d.ts +16 -0
- package/dist/search-tuning-key-probes.d.ts.map +1 -0
- package/dist/search-tuning-key-probes.js +65 -0
- package/dist/search-tuning-key-resolution.d.ts +25 -0
- package/dist/search-tuning-key-resolution.d.ts.map +1 -0
- package/dist/search-tuning-key-resolution.js +1 -0
- package/dist/search-tuning-key-resolver.d.ts +4 -0
- package/dist/search-tuning-key-resolver.d.ts.map +1 -0
- package/dist/search-tuning-key-resolver.js +107 -0
- package/dist/search-tuning-key-status.d.ts +24 -0
- package/dist/search-tuning-key-status.d.ts.map +1 -0
- package/dist/search-tuning-key-status.js +24 -0
- package/dist/search-tuning-lint.d.ts +9 -0
- package/dist/search-tuning-lint.d.ts.map +1 -0
- package/dist/search-tuning-lint.js +468 -0
- package/dist/search-tuning-registry.d.ts +43 -0
- package/dist/search-tuning-registry.d.ts.map +1 -1
- package/dist/search-tuning-registry.js +214 -49
- package/dist/self-audit.d.ts +12 -0
- package/dist/self-audit.d.ts.map +1 -1
- package/dist/self-audit.js +36 -10
- package/dist/self-config-doctor-v2.d.ts +145 -3
- package/dist/self-config-doctor-v2.d.ts.map +1 -1
- package/dist/self-config-doctor-v2.js +1304 -181
- package/dist/self-config-doctor.d.ts +20 -1
- package/dist/self-config-doctor.d.ts.map +1 -1
- package/dist/self-config-doctor.js +53 -280
- package/dist/settled-unit-states.d.ts +9 -0
- package/dist/settled-unit-states.d.ts.map +1 -0
- package/dist/settled-unit-states.js +14 -0
- package/dist/sharkcraft-inspector.d.ts +34 -0
- package/dist/sharkcraft-inspector.d.ts.map +1 -1
- package/dist/sharkcraft-inspector.js +273 -26
- package/dist/spec/spec-evidence.d.ts.map +1 -1
- package/dist/spec/spec-evidence.js +14 -20
- package/dist/split-identifier.d.ts +21 -0
- package/dist/split-identifier.d.ts.map +1 -0
- package/dist/split-identifier.js +27 -0
- package/dist/start-here.d.ts.map +1 -1
- package/dist/start-here.js +1 -2
- package/dist/substitute-placeholders.d.ts +8 -0
- package/dist/substitute-placeholders.d.ts.map +1 -0
- package/dist/substitute-placeholders.js +9 -0
- package/dist/symbol-index.d.ts +33 -0
- package/dist/symbol-index.d.ts.map +1 -1
- package/dist/symbol-index.js +241 -3
- package/dist/symbol-member-entry.d.ts +26 -0
- package/dist/symbol-member-entry.d.ts.map +1 -0
- package/dist/symbol-member-entry.js +1 -0
- package/dist/symbol-member-kind.d.ts +14 -0
- package/dist/symbol-member-kind.d.ts.map +1 -0
- package/dist/symbol-member-kind.js +14 -0
- package/dist/task-packet.d.ts.map +1 -1
- package/dist/task-packet.js +52 -9
- package/dist/task-ranker.d.ts +8 -0
- package/dist/task-ranker.d.ts.map +1 -1
- package/dist/task-ranker.js +25 -13
- package/dist/task-risk.js +1 -1
- package/dist/task-routing-hint-registry.d.ts +20 -1
- package/dist/task-routing-hint-registry.d.ts.map +1 -1
- package/dist/task-routing-hint-registry.js +186 -42
- package/dist/template-drift.d.ts.map +1 -1
- package/dist/template-drift.js +30 -9
- package/dist/template-lint.d.ts.map +1 -1
- package/dist/template-lint.js +160 -2
- package/dist/term-query.d.ts +10 -0
- package/dist/term-query.d.ts.map +1 -0
- package/dist/term-query.js +1 -0
- package/dist/test-definitions.d.ts +6 -3
- package/dist/test-definitions.d.ts.map +1 -1
- package/dist/test-runner.d.ts +95 -10
- package/dist/test-runner.d.ts.map +1 -1
- package/dist/test-runner.js +309 -308
- package/dist/tuning-query-tokens.d.ts +29 -0
- package/dist/tuning-query-tokens.d.ts.map +1 -0
- package/dist/tuning-query-tokens.js +51 -0
- package/dist/typecheck-files.d.ts +36 -0
- package/dist/typecheck-files.d.ts.map +1 -0
- package/dist/typecheck-files.js +158 -0
- package/dist/uncertainty.js +1 -1
- package/dist/universal-search.d.ts.map +1 -1
- package/dist/universal-search.js +5 -3
- package/dist/unregistered-exports.d.ts +19 -0
- package/dist/unregistered-exports.d.ts.map +1 -0
- package/dist/unregistered-exports.js +141 -0
- package/dist/unresolvable-reason.d.ts +11 -0
- package/dist/unresolvable-reason.d.ts.map +1 -0
- package/dist/unresolvable-reason.js +11 -0
- package/dist/upgrade-advisor.d.ts.map +1 -1
- package/dist/upgrade-advisor.js +16 -9
- package/dist/validate-contribution-file.d.ts +4 -0
- package/dist/validate-contribution-file.d.ts.map +1 -0
- package/dist/validate-contribution-file.js +228 -0
- package/dist/why-file.d.ts +3 -0
- package/dist/why-file.d.ts.map +1 -1
- package/dist/why-file.js +7 -3
- package/package.json +17 -17
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE answer to "which contribution files failed to load?" — and, since round
|
|
3
|
+
* 12 (12.1), to "which contributed ENTRIES did a loader refuse?".
|
|
4
|
+
*
|
|
5
|
+
* A file the module loader cannot import used to be scraped by regex and every
|
|
6
|
+
* scraped id reported `validation: 'ok'` — a broken asset that did not take
|
|
7
|
+
* effect while every diagnostic said the pack was healthy. The contributions
|
|
8
|
+
* inventory, `packs doctor` and the release gate now read the same failure map,
|
|
9
|
+
* built from data the engine already computed:
|
|
10
|
+
*
|
|
11
|
+
* - `inspection.loaderDiagnostics` — the inspection-time loaders (knowledge,
|
|
12
|
+
* rules, paths, docs, templates, pipelines, presets, boundaries), status
|
|
13
|
+
* `failed` / `timeout` / a `cached-skip` of a prior failure, and each
|
|
14
|
+
* file's `rejected` entries;
|
|
15
|
+
* - EVERY registry loader's `load-failed` issues and `rejected` entries —
|
|
16
|
+
* gathered in ONE run by {@link collectRegistryOutcomes}.
|
|
17
|
+
*
|
|
18
|
+
* An ENTRY a loader refused (a missing required field, a duplicate id) used to
|
|
19
|
+
* be a silent `continue`: the list verb printed the survivors and every doctor
|
|
20
|
+
* said zero errors. Every loader now returns it as an `IRejectedEntry`, and
|
|
21
|
+
* this module is the one channel that carries it to every surface.
|
|
22
|
+
*
|
|
23
|
+
* No second loader, no parallel import path: `importModuleViaLoader` remembers
|
|
24
|
+
* a failed module, so re-asking a registry is a deterministic rejection.
|
|
25
|
+
*/
|
|
26
|
+
import { existsSync } from 'node:fs';
|
|
27
|
+
import * as nodePath from 'node:path';
|
|
28
|
+
import { ContributionKind } from "./contribution-kind.js";
|
|
29
|
+
import { loadAllContractTemplates } from "./contract-template-registry.js";
|
|
30
|
+
import { loadConstructsWithIssues } from "./construct-registry.js";
|
|
31
|
+
import { loadConventions } from "./convention-registry.js";
|
|
32
|
+
import { loadTsDecisionsWithIssues } from "./decision-records.js";
|
|
33
|
+
import { loadDelegateRecipesFromPacks } from "./delegate-pack-recipes.js";
|
|
34
|
+
import { loadFeedbackRulesWithIssues } from "./feedback-ingestion.js";
|
|
35
|
+
import { loadFrameworkExtractorOutcomes } from "./framework-extractor-outcomes.js";
|
|
36
|
+
import { listAllHelpers } from "./helper-catalog.js";
|
|
37
|
+
import { loadMigrationProfiles } from "./migration-profile-registry.js";
|
|
38
|
+
import { loadPlaybooksWithIssues } from "./playbook-registry.js";
|
|
39
|
+
import { loadPolicyDeclarationsWithIssues } from "./policy-registry.js";
|
|
40
|
+
import { loadRegistrationHints } from "./registration-hint-registry.js";
|
|
41
|
+
import { resolveProjectConfig } from "./resolve-project-config.js";
|
|
42
|
+
import { loadScaffoldPatternsFromInspection } from "./scaffold-patterns.js";
|
|
43
|
+
import { loadSearchTuning } from "./search-tuning-registry.js";
|
|
44
|
+
import { loadTaskRoutingHints } from "./task-routing-hint-registry.js";
|
|
45
|
+
function firstLine(s) {
|
|
46
|
+
return (s.split('\n')[0] ?? s).trim();
|
|
47
|
+
}
|
|
48
|
+
/** The valid pack whose root contains `abs`, if any. */
|
|
49
|
+
function owningPack(inspection, abs) {
|
|
50
|
+
for (const p of inspection.packs.validPacks ?? []) {
|
|
51
|
+
const root = nodePath.resolve(p.packageRoot) + nodePath.sep;
|
|
52
|
+
if (abs.startsWith(root))
|
|
53
|
+
return p.packageName;
|
|
54
|
+
}
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
/** Resolve a registry issue's `source` (absolute, project- or pack-relative) to an existing absolute file. */
|
|
58
|
+
function resolveIssueSource(inspection, source) {
|
|
59
|
+
if (nodePath.isAbsolute(source))
|
|
60
|
+
return nodePath.resolve(source);
|
|
61
|
+
const roots = [
|
|
62
|
+
inspection.projectRoot,
|
|
63
|
+
...(inspection.sharkcraftDir ? [inspection.sharkcraftDir] : []),
|
|
64
|
+
...(inspection.packs.validPacks ?? []).map((p) => p.packageRoot),
|
|
65
|
+
];
|
|
66
|
+
for (const r of roots) {
|
|
67
|
+
const abs = nodePath.resolve(r, source);
|
|
68
|
+
if (existsSync(abs))
|
|
69
|
+
return abs;
|
|
70
|
+
}
|
|
71
|
+
return nodePath.resolve(inspection.projectRoot, source);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* A registry entry's `sourceFile` as an absolute path: registries report a
|
|
75
|
+
* PACK-relative path for pack entries and a PROJECT-relative one for local
|
|
76
|
+
* entries (`nodePath.resolve` against `process.cwd()` made both cwd-dependent).
|
|
77
|
+
* The self-config doctor attributes an unresolvable reference to its file
|
|
78
|
+
* through this same resolution.
|
|
79
|
+
*/
|
|
80
|
+
export function resolveEntryFile(inspection, file, packageName) {
|
|
81
|
+
if (nodePath.isAbsolute(file))
|
|
82
|
+
return nodePath.resolve(file);
|
|
83
|
+
const packRoot = packageName
|
|
84
|
+
? (inspection.packs.validPacks ?? []).find((p) => p.packageName === packageName)?.packageRoot
|
|
85
|
+
: undefined;
|
|
86
|
+
return nodePath.resolve(packRoot ?? inspection.projectRoot, file);
|
|
87
|
+
}
|
|
88
|
+
/** A contribution file as every surface prints it: project-relative (POSIX), or absolute when outside the project. */
|
|
89
|
+
export function contributionFileLabel(projectRoot, file) {
|
|
90
|
+
const rel = nodePath.relative(projectRoot, file);
|
|
91
|
+
return (rel && !rel.startsWith('..') ? rel : file).split(nodePath.sep).join('/');
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Normalise a registry loader's issues into load failures. Only `load-failed`
|
|
95
|
+
* counts: `invalid-*` / `duplicate-id` issues concern entries of a file that
|
|
96
|
+
* DID load (they travel as rejections), and `missing-file` is reported by the
|
|
97
|
+
* manifest checks.
|
|
98
|
+
*/
|
|
99
|
+
export function registryIssuesToLoadFailures(inspection, kind, issues) {
|
|
100
|
+
const out = [];
|
|
101
|
+
for (const i of issues) {
|
|
102
|
+
if (i.code !== 'load-failed' || !i.source)
|
|
103
|
+
continue;
|
|
104
|
+
const file = resolveIssueSource(inspection, i.source);
|
|
105
|
+
const packageName = owningPack(inspection, file);
|
|
106
|
+
out.push({
|
|
107
|
+
file,
|
|
108
|
+
kind,
|
|
109
|
+
...(packageName ? { packageName } : {}),
|
|
110
|
+
message: firstLine(i.message.replace(/^(?:Failed to load \S+: |Pack \S+ \([^)]*\): )/, '')),
|
|
111
|
+
via: 'registry',
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
return out;
|
|
115
|
+
}
|
|
116
|
+
/** Scaffold-pattern loading reports failures as warning strings; lift the import failures. */
|
|
117
|
+
export function scaffoldWarningsToLoadFailures(inspection, warnings) {
|
|
118
|
+
const out = [];
|
|
119
|
+
for (const w of warnings) {
|
|
120
|
+
const m = /^failed to import scaffold pattern file (.+?): ([\s\S]*)$/.exec(w);
|
|
121
|
+
if (!m)
|
|
122
|
+
continue;
|
|
123
|
+
const file = nodePath.resolve(m[1]);
|
|
124
|
+
const packageName = owningPack(inspection, file);
|
|
125
|
+
out.push({
|
|
126
|
+
file,
|
|
127
|
+
kind: 'scaffold-pattern',
|
|
128
|
+
...(packageName ? { packageName } : {}),
|
|
129
|
+
message: firstLine(m[2]),
|
|
130
|
+
via: 'registry',
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
return out;
|
|
134
|
+
}
|
|
135
|
+
/** Lift one loader's `rejected` records into THE channel's shape (absolute file, owning pack attributed). */
|
|
136
|
+
export function liftRejections(inspection, kind, rejected, via = 'registry') {
|
|
137
|
+
return rejected.map((r) => {
|
|
138
|
+
const file = nodePath.resolve(r.file);
|
|
139
|
+
const packageName = owningPack(inspection, file);
|
|
140
|
+
return { ...r, file, kind, ...(packageName ? { packageName } : {}), via };
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/** Build one loader's outcome from its entries, issues and rejections. */
|
|
144
|
+
function outcome(inspection, kind, parts) {
|
|
145
|
+
const accepted = [];
|
|
146
|
+
for (const a of parts.accepted ?? []) {
|
|
147
|
+
if (!a.file)
|
|
148
|
+
continue; // a builtin — not a contribution
|
|
149
|
+
const file = resolveEntryFile(inspection, a.file, a.packageName);
|
|
150
|
+
const packageName = a.packageName ?? owningPack(inspection, file);
|
|
151
|
+
accepted.push({
|
|
152
|
+
kind,
|
|
153
|
+
file,
|
|
154
|
+
...(packageName ? { packageName } : {}),
|
|
155
|
+
id: a.id,
|
|
156
|
+
...(a.title ? { title: a.title } : {}),
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
return {
|
|
160
|
+
loadFailures: registryIssuesToLoadFailures(inspection, kind, parts.issues ?? []),
|
|
161
|
+
rejections: liftRejections(inspection, kind, parts.rejected ?? []),
|
|
162
|
+
accepted,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
const titleOf = (v) => {
|
|
166
|
+
const t = v && typeof v === 'object' ? v.title : undefined;
|
|
167
|
+
return typeof t === 'string' && t.length > 0 ? t : undefined;
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* THE registry-loader table: every contribution kind a REGISTRY loads (the
|
|
171
|
+
* inspection-time kinds — knowledge, rules, paths, docs, templates, pipelines,
|
|
172
|
+
* presets, boundaries — report through `inspection.loaderDiagnostics`). A
|
|
173
|
+
* loader-backed manifest slot missing from both is caught by the r76 census.
|
|
174
|
+
*/
|
|
175
|
+
const REGISTRY_OUTCOME_LOADERS = [
|
|
176
|
+
{
|
|
177
|
+
kinds: [ContributionKind.Helper],
|
|
178
|
+
// THE helper catalog — the list `shrk helper list` prints.
|
|
179
|
+
run: async (i) => {
|
|
180
|
+
const c = await listAllHelpers(i);
|
|
181
|
+
return outcome(i, ContributionKind.Helper, {
|
|
182
|
+
issues: c.issues,
|
|
183
|
+
rejected: c.rejected,
|
|
184
|
+
accepted: c.entries
|
|
185
|
+
.filter((e) => e.source !== 'builtin')
|
|
186
|
+
.map((e) => ({ id: e.id, file: e.sourceFile, packageName: e.packageName, title: e.description })),
|
|
187
|
+
});
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
kinds: [ContributionKind.Convention],
|
|
192
|
+
run: async (i) => {
|
|
193
|
+
const r = await loadConventions(i);
|
|
194
|
+
return outcome(i, ContributionKind.Convention, {
|
|
195
|
+
issues: r.issues,
|
|
196
|
+
rejected: r.rejected,
|
|
197
|
+
accepted: r.entries.map((e) => ({
|
|
198
|
+
id: e.convention.id,
|
|
199
|
+
file: e.sourceFile,
|
|
200
|
+
packageName: e.packageName,
|
|
201
|
+
title: titleOf(e.convention),
|
|
202
|
+
})),
|
|
203
|
+
});
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
kinds: [ContributionKind.TaskRoutingHint],
|
|
208
|
+
run: async (i) => {
|
|
209
|
+
const r = await loadTaskRoutingHints(i);
|
|
210
|
+
return outcome(i, ContributionKind.TaskRoutingHint, {
|
|
211
|
+
issues: r.issues,
|
|
212
|
+
rejected: r.rejected,
|
|
213
|
+
accepted: r.entries.map((e) => ({ id: e.hint.id, file: e.sourceFile, packageName: e.packageName, title: titleOf(e.hint) })),
|
|
214
|
+
});
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
kinds: [ContributionKind.RegistrationHint],
|
|
219
|
+
run: async (i) => {
|
|
220
|
+
const r = await loadRegistrationHints(i);
|
|
221
|
+
return outcome(i, ContributionKind.RegistrationHint, {
|
|
222
|
+
issues: r.issues,
|
|
223
|
+
rejected: r.rejected,
|
|
224
|
+
accepted: r.entries.map((e) => ({ id: e.hint.id, file: e.sourceFile, packageName: e.packageName, title: e.hint.title })),
|
|
225
|
+
});
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
kinds: [ContributionKind.ContractTemplate],
|
|
230
|
+
run: async (i) => {
|
|
231
|
+
const r = await loadAllContractTemplates(i);
|
|
232
|
+
return outcome(i, ContributionKind.ContractTemplate, {
|
|
233
|
+
issues: r.issues,
|
|
234
|
+
rejected: r.rejected,
|
|
235
|
+
accepted: r.entries.map((e) => ({
|
|
236
|
+
id: e.template.id,
|
|
237
|
+
file: e.sourceFile,
|
|
238
|
+
packageName: e.packageName,
|
|
239
|
+
title: titleOf(e.template),
|
|
240
|
+
})),
|
|
241
|
+
});
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
kinds: [ContributionKind.MigrationProfile],
|
|
246
|
+
run: async (i) => {
|
|
247
|
+
const r = await loadMigrationProfiles(i);
|
|
248
|
+
return outcome(i, ContributionKind.MigrationProfile, {
|
|
249
|
+
issues: r.issues,
|
|
250
|
+
rejected: r.rejected,
|
|
251
|
+
accepted: r.entries.map((e) => ({ id: e.profile.id, file: e.sourceFile, packageName: e.packageName, title: e.profile.title })),
|
|
252
|
+
});
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
kinds: [ContributionKind.ScaffoldPattern],
|
|
257
|
+
run: async (i) => {
|
|
258
|
+
const r = await loadScaffoldPatternsFromInspection(i);
|
|
259
|
+
const base = outcome(i, ContributionKind.ScaffoldPattern, {
|
|
260
|
+
rejected: r.rejected,
|
|
261
|
+
accepted: r.patterns.map((p) => ({
|
|
262
|
+
id: p.pattern.id,
|
|
263
|
+
file: p.source.file,
|
|
264
|
+
packageName: p.source.packageName,
|
|
265
|
+
title: titleOf(p.pattern),
|
|
266
|
+
})),
|
|
267
|
+
});
|
|
268
|
+
return { ...base, loadFailures: scaffoldWarningsToLoadFailures(i, r.warnings) };
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
kinds: [ContributionKind.Playbook],
|
|
273
|
+
// A playbook file that failed to import is a load failure like any other
|
|
274
|
+
// registry's: the same `invalid-contribution` error a broken hint file gets.
|
|
275
|
+
run: async (i) => {
|
|
276
|
+
const r = await loadPlaybooksWithIssues(i);
|
|
277
|
+
return outcome(i, ContributionKind.Playbook, {
|
|
278
|
+
issues: r.issues,
|
|
279
|
+
rejected: r.rejected,
|
|
280
|
+
accepted: r.playbooks.map((p) => ({ id: p.id, file: p.sourceFile, packageName: p.packageName, title: p.title })),
|
|
281
|
+
});
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
kinds: [ContributionKind.Construct, ContributionKind.ConstructFacet],
|
|
286
|
+
run: async (i) => {
|
|
287
|
+
const r = await loadConstructsWithIssues(i);
|
|
288
|
+
const constructs = outcome(i, ContributionKind.Construct, {
|
|
289
|
+
issues: r.issues,
|
|
290
|
+
rejected: r.rejected,
|
|
291
|
+
accepted: r.constructs.map((c) => ({ id: c.id, file: c.sourceFile, packageName: c.packageName, title: c.title })),
|
|
292
|
+
});
|
|
293
|
+
const facets = outcome(i, ContributionKind.ConstructFacet, {
|
|
294
|
+
issues: r.facetIssues,
|
|
295
|
+
rejected: r.facetRejected,
|
|
296
|
+
accepted: r.facets.map((f) => ({ id: f.id, file: f.file, packageName: f.packageName })),
|
|
297
|
+
});
|
|
298
|
+
return {
|
|
299
|
+
loadFailures: [...constructs.loadFailures, ...facets.loadFailures],
|
|
300
|
+
rejections: [...constructs.rejections, ...facets.rejections],
|
|
301
|
+
accepted: [...constructs.accepted, ...facets.accepted],
|
|
302
|
+
};
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
kinds: [ContributionKind.SearchTuning],
|
|
307
|
+
run: async (i) => {
|
|
308
|
+
const r = await loadSearchTuning(i);
|
|
309
|
+
return outcome(i, ContributionKind.SearchTuning, {
|
|
310
|
+
issues: r.issues,
|
|
311
|
+
rejected: r.rejected,
|
|
312
|
+
accepted: r.entries.map((e) => ({ id: e.id, file: e.sourceFile, packageName: e.packageName })),
|
|
313
|
+
});
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
kinds: [ContributionKind.Decision],
|
|
318
|
+
run: async (i) => {
|
|
319
|
+
const r = await loadTsDecisionsWithIssues(i);
|
|
320
|
+
return outcome(i, ContributionKind.Decision, {
|
|
321
|
+
issues: r.issues,
|
|
322
|
+
rejected: r.rejected,
|
|
323
|
+
accepted: r.decisions.map((d) => ({ id: d.id, file: d.sourceFile, title: d.title })),
|
|
324
|
+
});
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
kinds: [ContributionKind.Policy],
|
|
329
|
+
run: async (i) => {
|
|
330
|
+
const r = await loadPolicyDeclarationsWithIssues(i);
|
|
331
|
+
return outcome(i, ContributionKind.Policy, {
|
|
332
|
+
issues: r.issues,
|
|
333
|
+
rejected: r.rejected,
|
|
334
|
+
accepted: r.declarations.map((d) => ({ id: d.id, file: d.sourceFile })),
|
|
335
|
+
});
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
kinds: [ContributionKind.FeedbackRule],
|
|
340
|
+
run: async (i) => {
|
|
341
|
+
const r = await loadFeedbackRulesWithIssues(i);
|
|
342
|
+
return outcome(i, ContributionKind.FeedbackRule, { issues: r.issues, rejected: r.rejected, accepted: r.entries });
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
kinds: [ContributionKind.ContextTest, ContributionKind.AgentTest],
|
|
347
|
+
run: async (i) => {
|
|
348
|
+
// Loaded lazily: the test runner pulls in the task-packet stack.
|
|
349
|
+
const { loadContextTestsWithIssues, loadAgentContractTestsWithIssues } = await import("./test-runner.js");
|
|
350
|
+
const [ctx, agent] = await Promise.all([loadContextTestsWithIssues(i), loadAgentContractTestsWithIssues(i)]);
|
|
351
|
+
const a = outcome(i, ContributionKind.ContextTest, { issues: ctx.issues, rejected: ctx.rejected, accepted: ctx.entries });
|
|
352
|
+
const b = outcome(i, ContributionKind.AgentTest, { issues: agent.issues, rejected: agent.rejected, accepted: agent.entries });
|
|
353
|
+
return {
|
|
354
|
+
loadFailures: [...a.loadFailures, ...b.loadFailures],
|
|
355
|
+
rejections: [...a.rejections, ...b.rejections],
|
|
356
|
+
accepted: [...a.accepted, ...b.accepted],
|
|
357
|
+
};
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
kinds: [ContributionKind.DelegateRecipe],
|
|
362
|
+
run: async (i) => {
|
|
363
|
+
const r = await loadDelegateRecipesFromPacks(i.packs.validPacks ?? []);
|
|
364
|
+
return outcome(i, ContributionKind.DelegateRecipe, {
|
|
365
|
+
issues: r.issues,
|
|
366
|
+
rejected: r.rejected,
|
|
367
|
+
accepted: r.recipes.map((p) => ({ id: p.recipe.id, file: p.sourceFile, packageName: p.packageName, title: p.recipe.title })),
|
|
368
|
+
});
|
|
369
|
+
},
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
kinds: [ContributionKind.FrameworkExtractor],
|
|
373
|
+
run: async (i) => {
|
|
374
|
+
const r = await loadFrameworkExtractorOutcomes(i);
|
|
375
|
+
return outcome(i, ContributionKind.FrameworkExtractor, { issues: r.issues, rejected: r.rejected, accepted: r.accepted });
|
|
376
|
+
},
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
kinds: [
|
|
380
|
+
ContributionKind.WiringRule,
|
|
381
|
+
ContributionKind.Registry,
|
|
382
|
+
ContributionKind.RegistrationIdiom,
|
|
383
|
+
ContributionKind.PolicyRule,
|
|
384
|
+
ContributionKind.ReusePrimitive,
|
|
385
|
+
ContributionKind.Baseline,
|
|
386
|
+
ContributionKind.GeneratedArtifact,
|
|
387
|
+
// Round 13 (P3): the doc-reference plane's pack slot is declared, and the
|
|
388
|
+
// seam records its outcome like every other plane's.
|
|
389
|
+
ContributionKind.DocReference,
|
|
390
|
+
],
|
|
391
|
+
// THE gate-plane merge seam — the same resolution every plane reader runs.
|
|
392
|
+
run: async (i) => {
|
|
393
|
+
const r = await resolveProjectConfig(i.projectRoot);
|
|
394
|
+
if (!r.ok || !r.value.planeOutcomes)
|
|
395
|
+
return { loadFailures: [], rejections: [], accepted: [] };
|
|
396
|
+
const o = r.value.planeOutcomes;
|
|
397
|
+
return {
|
|
398
|
+
loadFailures: o.loadFailures.map((f) => ({
|
|
399
|
+
file: f.file,
|
|
400
|
+
kind: f.kind,
|
|
401
|
+
packageName: f.packageName,
|
|
402
|
+
message: f.message,
|
|
403
|
+
via: 'registry',
|
|
404
|
+
})),
|
|
405
|
+
rejections: [...o.rejected],
|
|
406
|
+
accepted: [...o.accepted],
|
|
407
|
+
};
|
|
408
|
+
},
|
|
409
|
+
},
|
|
410
|
+
];
|
|
411
|
+
/** Every contribution kind a registry loader answers for (the rest report through loader diagnostics). */
|
|
412
|
+
export const REGISTRY_BACKED_KINDS = REGISTRY_OUTCOME_LOADERS.flatMap((l) => l.kinds);
|
|
413
|
+
/**
|
|
414
|
+
* Run the registry loaders ONCE and return what they reported: load failures,
|
|
415
|
+
* rejected entries and accepted entries (each attributed to its file). With
|
|
416
|
+
* `kinds`, only the loaders for those kinds run — a `list` verb asks for its
|
|
417
|
+
* own kind. Every loader degrades to "nothing" on a throw, never a crash.
|
|
418
|
+
*/
|
|
419
|
+
export async function collectRegistryOutcomes(inspection, options = {}) {
|
|
420
|
+
const wanted = options.kinds;
|
|
421
|
+
const loaders = wanted
|
|
422
|
+
? REGISTRY_OUTCOME_LOADERS.filter((l) => l.kinds.some((k) => wanted.includes(k)))
|
|
423
|
+
: REGISTRY_OUTCOME_LOADERS;
|
|
424
|
+
const results = await Promise.all(loaders.map(async (l) => {
|
|
425
|
+
try {
|
|
426
|
+
return await l.run(inspection);
|
|
427
|
+
}
|
|
428
|
+
catch {
|
|
429
|
+
return null;
|
|
430
|
+
}
|
|
431
|
+
}));
|
|
432
|
+
const loadFailures = [];
|
|
433
|
+
const rejections = [];
|
|
434
|
+
const accepted = [];
|
|
435
|
+
for (const r of results) {
|
|
436
|
+
if (!r)
|
|
437
|
+
continue;
|
|
438
|
+
loadFailures.push(...r.loadFailures);
|
|
439
|
+
rejections.push(...r.rejections);
|
|
440
|
+
accepted.push(...r.accepted);
|
|
441
|
+
}
|
|
442
|
+
return { loadFailures, rejections, accepted };
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Run the async registry loaders once and return their load failures. Callers
|
|
446
|
+
* that already ran them (the async inventory) pass their own issues instead.
|
|
447
|
+
*/
|
|
448
|
+
export async function collectRegistryLoadFailures(inspection) {
|
|
449
|
+
return (await collectRegistryOutcomes(inspection)).loadFailures;
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Every known load failure, keyed by absolute file path. `registryFailures`
|
|
453
|
+
* adds what the async registries reported (see {@link collectRegistryLoadFailures}).
|
|
454
|
+
*/
|
|
455
|
+
export function collectContributionLoadFailures(inspection, registryFailures = []) {
|
|
456
|
+
const out = new Map();
|
|
457
|
+
for (const d of inspection.loaderDiagnostics ?? []) {
|
|
458
|
+
const failed = d.status === 'failed' ||
|
|
459
|
+
d.status === 'timeout' ||
|
|
460
|
+
(d.status === 'cached-skip' && d.cachedStatus !== undefined && d.cachedStatus !== 'ok');
|
|
461
|
+
if (!failed)
|
|
462
|
+
continue;
|
|
463
|
+
const file = nodePath.resolve(d.filePath);
|
|
464
|
+
if (out.has(file))
|
|
465
|
+
continue;
|
|
466
|
+
const packageName = d.packName ?? owningPack(inspection, file);
|
|
467
|
+
out.set(file, {
|
|
468
|
+
file,
|
|
469
|
+
kind: d.kind,
|
|
470
|
+
...(packageName ? { packageName } : {}),
|
|
471
|
+
message: firstLine(d.errorMessage ?? `loader ${d.status}`),
|
|
472
|
+
via: 'loader-diagnostics',
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
for (const f of registryFailures)
|
|
476
|
+
if (!out.has(f.file))
|
|
477
|
+
out.set(f.file, f);
|
|
478
|
+
return out;
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* An inspection-time loader's asset kind → the contribution kind its
|
|
482
|
+
* rejections belong to. A `Record` over {@link LoaderAssetKind}, so a loader
|
|
483
|
+
* kind added without a row is a compile error.
|
|
484
|
+
*/
|
|
485
|
+
export const LOADER_ASSET_KIND_CONTRIBUTION = {
|
|
486
|
+
knowledge: ContributionKind.Knowledge,
|
|
487
|
+
rules: ContributionKind.Rule,
|
|
488
|
+
paths: ContributionKind.Path,
|
|
489
|
+
docs: ContributionKind.Docs,
|
|
490
|
+
templates: ContributionKind.Template,
|
|
491
|
+
pipelines: ContributionKind.Pipeline,
|
|
492
|
+
presets: ContributionKind.Preset,
|
|
493
|
+
boundaries: ContributionKind.Boundary,
|
|
494
|
+
};
|
|
495
|
+
const CONTRIBUTION_KIND_VALUES = new Set(Object.values(ContributionKind));
|
|
496
|
+
/**
|
|
497
|
+
* THE contribution kind of a loader's `kind` (round 12 review, R12-X4): a load
|
|
498
|
+
* failure's / diagnostic's `kind` names the loader that tried the file — the
|
|
499
|
+
* plural asset kind for the inspection-time loaders (`rules`, `templates`, …),
|
|
500
|
+
* the contribution kind itself for the registry loaders (`helper`,
|
|
501
|
+
* `convention`, …). Every reader maps through here — the rejection channel,
|
|
502
|
+
* `collectKindOutcomes`, the contributions report's rows and `packs
|
|
503
|
+
* contributions --kind` — so a printed row and the exit read one table.
|
|
504
|
+
* `undefined` for a kind no loader reports.
|
|
505
|
+
*/
|
|
506
|
+
export function contributionKindOfLoader(kind) {
|
|
507
|
+
if (CONTRIBUTION_KIND_VALUES.has(kind))
|
|
508
|
+
return kind;
|
|
509
|
+
return Object.prototype.hasOwnProperty.call(LOADER_ASSET_KIND_CONTRIBUTION, kind)
|
|
510
|
+
? LOADER_ASSET_KIND_CONTRIBUTION[kind]
|
|
511
|
+
: undefined;
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* THE rejection channel (round 12, 12.1): every rejected contribution entry —
|
|
515
|
+
* the inspection-time loaders' (`loaderDiagnostics[].rejected`) plus what the
|
|
516
|
+
* registry loaders reported (`registryRejections`, from
|
|
517
|
+
* {@link collectRegistryOutcomes}) — deduplicated and sorted by file then
|
|
518
|
+
* position. Every surface reads this list; none re-derives it.
|
|
519
|
+
*/
|
|
520
|
+
export function collectContributionRejections(inspection, registryRejections = []) {
|
|
521
|
+
const out = [];
|
|
522
|
+
const seen = new Set();
|
|
523
|
+
const add = (r) => {
|
|
524
|
+
const key = `${r.kind}|${r.file}|${r.exportName ?? ''}|${r.index}|${r.cause}|${r.entryId ?? ''}`;
|
|
525
|
+
if (seen.has(key))
|
|
526
|
+
return;
|
|
527
|
+
seen.add(key);
|
|
528
|
+
out.push(r);
|
|
529
|
+
};
|
|
530
|
+
for (const d of inspection.loaderDiagnostics ?? []) {
|
|
531
|
+
if (!d.rejected || d.rejected.length === 0)
|
|
532
|
+
continue;
|
|
533
|
+
const kind = contributionKindOfLoader(d.kind) ?? ContributionKind.Knowledge;
|
|
534
|
+
for (const r of liftRejections(inspection, kind, d.rejected, 'loader-diagnostics')) {
|
|
535
|
+
add(d.packName && !r.packageName ? { ...r, packageName: d.packName } : r);
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
for (const r of registryRejections)
|
|
539
|
+
add({ ...r, file: nodePath.resolve(r.file) });
|
|
540
|
+
return out.sort((a, b) => a.file.localeCompare(b.file) || a.index - b.index);
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* The rejections AND load failures of `kinds` only, from ONE run of just the
|
|
544
|
+
* loaders those kinds need — what a `list` verb reads for its `⚠` note. A file
|
|
545
|
+
* that never loaded drops every entry it declares, so it is said as loudly as
|
|
546
|
+
* a refused entry (round 12 review, A-4: `conventions list` printed "(none —
|
|
547
|
+
* contribute via … sharkcraft/conventions.ts)" over the very file that failed).
|
|
548
|
+
*/
|
|
549
|
+
export async function collectKindOutcomes(inspection, kinds) {
|
|
550
|
+
const registryKinds = kinds.filter((k) => REGISTRY_BACKED_KINDS.includes(k));
|
|
551
|
+
const registry = registryKinds.length > 0 ? await collectRegistryOutcomes(inspection, { kinds: registryKinds }) : undefined;
|
|
552
|
+
const rejections = collectContributionRejections(inspection, registry?.rejections ?? []).filter((r) => kinds.includes(r.kind));
|
|
553
|
+
// A failure's `kind` is the loader's: the plural asset kind for the
|
|
554
|
+
// inspection-time loaders, the contribution kind for the registry loaders.
|
|
555
|
+
const loadFailures = [...collectContributionLoadFailures(inspection, registry?.loadFailures ?? []).values()]
|
|
556
|
+
.filter((f) => {
|
|
557
|
+
const kind = contributionKindOfLoader(f.kind);
|
|
558
|
+
return kind !== undefined && kinds.includes(kind);
|
|
559
|
+
})
|
|
560
|
+
.sort((a, b) => a.file.localeCompare(b.file));
|
|
561
|
+
return { rejections, loadFailures };
|
|
562
|
+
}
|
|
563
|
+
/** The rejections of `kinds` only — {@link collectKindOutcomes} without the load failures. */
|
|
564
|
+
export async function collectKindRejections(inspection, kinds) {
|
|
565
|
+
return (await collectKindOutcomes(inspection, kinds)).rejections;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* THE one wording of a rejected entry, used on every surface:
|
|
569
|
+
* `'conv.b' (default[8]) — severity: severity must be one of: info, warning, error (got undefined)`.
|
|
570
|
+
*/
|
|
571
|
+
export function formatEntryRejection(r) {
|
|
572
|
+
const who = r.entryId !== undefined ? `'${r.entryId}'` : '(no id)';
|
|
573
|
+
const where = r.index >= 0 ? `${r.exportName ?? ''}[${r.index}]` : (r.exportName ?? 'default');
|
|
574
|
+
return `${who} (${where}) — ${r.reasons.join('; ')}`;
|
|
575
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { IContributionsReport } from './i-contributions-report.js';
|
|
2
|
+
import type { IUnresolvableReferenceScan } from './i-unresolvable-reference-scan.js';
|
|
3
|
+
import { type IPackContributionsInventory } from './pack-contributions-inventory.js';
|
|
4
|
+
import type { ISharkcraftInspection } from './sharkcraft-inspector.js';
|
|
5
|
+
/**
|
|
6
|
+
* The report from an already-built inventory and reference scan — the pure
|
|
7
|
+
* half; {@link buildContributionsReport} gathers both.
|
|
8
|
+
*/
|
|
9
|
+
export declare function contributionsReportOf(inspection: ISharkcraftInspection, inventory: IPackContributionsInventory, references: IUnresolvableReferenceScan): IContributionsReport;
|
|
10
|
+
/**
|
|
11
|
+
* The report narrowed to `--pack` / `--kind`. A narrowed view settles on the
|
|
12
|
+
* references IN VIEW: its coverage is the view's unresolvable references
|
|
13
|
+
* (examined 0 of them), so a filter can never borrow another file's pass.
|
|
14
|
+
*/
|
|
15
|
+
export declare function filterContributionsReport(report: IContributionsReport, filter: {
|
|
16
|
+
readonly pack?: string;
|
|
17
|
+
readonly kind?: string;
|
|
18
|
+
}): IContributionsReport;
|
|
19
|
+
/** Every contributed file, accepted vs rejected vs unresolvable. */
|
|
20
|
+
export declare function buildContributionsReport(inspection: ISharkcraftInspection, options?: {
|
|
21
|
+
readonly inventory?: IPackContributionsInventory;
|
|
22
|
+
readonly references?: IUnresolvableReferenceScan;
|
|
23
|
+
}): Promise<IContributionsReport>;
|
|
24
|
+
/** The `By file:` text section (after `By kind:`). */
|
|
25
|
+
export declare function renderContributionsByFileText(report: IContributionsReport): string;
|
|
26
|
+
/** The `## By file` markdown section. */
|
|
27
|
+
export declare function renderContributionsByFileMarkdown(report: IContributionsReport): string;
|
|
28
|
+
//# sourceMappingURL=contributions-report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contributions-report.d.ts","sourceRoot":"","sources":["../src/contributions-report.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,EAGL,KAAK,2BAA2B,EACjC,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAiCvE;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,qBAAqB,EACjC,SAAS,EAAE,2BAA2B,EACtC,UAAU,EAAE,0BAA0B,GACrC,oBAAoB,CA2FtB;AAmCD;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GACzD,oBAAoB,CAOtB;AAED,oEAAoE;AACpE,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,qBAAqB,EACjC,OAAO,GAAE;IAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,2BAA2B,CAAC;IAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,0BAA0B,CAAA;CAAO,GACnH,OAAO,CAAC,oBAAoB,CAAC,CAI/B;AAiBD,sDAAsD;AACtD,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CAoBlF;AAED,yCAAyC;AACzC,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CA0BtF"}
|