@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
package/dist/policy-registry.js
CHANGED
|
@@ -1,37 +1,82 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import * as nodePath from 'node:path';
|
|
3
|
-
import { importModuleViaLoader } from '@shrkcrft/core';
|
|
3
|
+
import { importModuleViaLoader, readContributionExport, RejectionCause, } from '@shrkcrft/core';
|
|
4
4
|
const CACHE = new Map();
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* THE policy-declaration acceptance predicate (round 12, 12.1): a non-empty
|
|
7
|
+
* string `id` — `[]` means accepted. An id-less declaration used to be
|
|
8
|
+
* filtered out with no signal. (A declaration's `evaluate` is the policy
|
|
9
|
+
* engine's to run; an id alone is enough to be referenced.)
|
|
10
|
+
*/
|
|
11
|
+
export function policyCheckRejectionReasons(raw) {
|
|
12
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw))
|
|
13
|
+
return ['(entry): must be an object'];
|
|
14
|
+
const id = raw.id;
|
|
15
|
+
return typeof id === 'string' && id.length > 0 ? [] : ['id: must be a non-empty string'];
|
|
16
|
+
}
|
|
17
|
+
async function declarationsFrom(file, source, namespace, sink, label, packageName) {
|
|
18
|
+
let exp;
|
|
6
19
|
try {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
.flatMap((d) => [d.id, namespace(d.id)]);
|
|
20
|
+
exp = readContributionExport(await importModuleViaLoader(file), {
|
|
21
|
+
namedKeys: ['policyChecks'],
|
|
22
|
+
singleObject: false,
|
|
23
|
+
});
|
|
12
24
|
}
|
|
13
|
-
catch {
|
|
14
|
-
// A policy file that will not load
|
|
15
|
-
//
|
|
25
|
+
catch (e) {
|
|
26
|
+
// A policy file that will not load must not crash listing — and must not
|
|
27
|
+
// vanish either: it is a load failure THE failure map reports.
|
|
28
|
+
sink.issues.push({
|
|
29
|
+
severity: 'warning',
|
|
30
|
+
code: 'load-failed',
|
|
31
|
+
message: `${label}: ${(e.message ?? String(e)).split('\n')[0].trim()}`,
|
|
32
|
+
source: file,
|
|
33
|
+
...(packageName ? { packageName } : {}),
|
|
34
|
+
});
|
|
16
35
|
return [];
|
|
17
36
|
}
|
|
37
|
+
const ids = [];
|
|
38
|
+
exp.items.forEach((d, index) => {
|
|
39
|
+
const reasons = policyCheckRejectionReasons(d);
|
|
40
|
+
if (reasons.length > 0) {
|
|
41
|
+
sink.rejected.push({
|
|
42
|
+
file,
|
|
43
|
+
index,
|
|
44
|
+
...(exp.exportName ? { exportName: exp.exportName } : {}),
|
|
45
|
+
reasons,
|
|
46
|
+
cause: RejectionCause.Invalid,
|
|
47
|
+
});
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const decl = d;
|
|
51
|
+
sink.declarations.push({
|
|
52
|
+
id: decl.id,
|
|
53
|
+
qualifiedId: namespace(decl.id),
|
|
54
|
+
source,
|
|
55
|
+
sourceFile: file,
|
|
56
|
+
...(Array.isArray(decl.references) ? { references: decl.references } : {}),
|
|
57
|
+
});
|
|
58
|
+
ids.push(decl.id, namespace(decl.id));
|
|
59
|
+
});
|
|
60
|
+
return ids;
|
|
18
61
|
}
|
|
19
|
-
/**
|
|
20
|
-
|
|
62
|
+
/** One load of every declared policy check — local files first, then pack contributions — cached per project. */
|
|
63
|
+
async function loadPolicyCache(inspection) {
|
|
21
64
|
const validPacks = inspection.packs?.validPacks ?? [];
|
|
22
65
|
const cacheKey = `${inspection.projectRoot}:${validPacks
|
|
23
66
|
.map((p) => p.packageName + '@' + p.packageVersion)
|
|
24
67
|
.join(',')}`;
|
|
25
68
|
const cached = CACHE.get(inspection.projectRoot);
|
|
26
69
|
if (cached && cached.cacheKey === cacheKey)
|
|
27
|
-
return cached
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
70
|
+
return cached;
|
|
71
|
+
const entry = { cacheKey, list: [], declarations: [], issues: [], rejected: [] };
|
|
72
|
+
// The local policy file is the policy engine's own default. `localPolicyFiles`
|
|
73
|
+
// is an engine INPUT (`evaluatePolicy`), not a config key — the strict config
|
|
74
|
+
// schema rejects it — so the config read that used to sit here was dead.
|
|
75
|
+
for (const rel of ['sharkcraft/policies.ts']) {
|
|
31
76
|
const full = nodePath.isAbsolute(rel) ? rel : nodePath.join(inspection.projectRoot, rel);
|
|
32
77
|
if (!existsSync(full))
|
|
33
78
|
continue;
|
|
34
|
-
|
|
79
|
+
entry.list.push(...(await declarationsFrom(full, 'local', (id) => `local:${id}`, entry, `Failed to load ${rel}`)));
|
|
35
80
|
}
|
|
36
81
|
for (const pack of validPacks) {
|
|
37
82
|
const contributions = pack.manifest?.contributions;
|
|
@@ -41,11 +86,33 @@ export async function loadPolicyIds(inspection) {
|
|
|
41
86
|
const full = nodePath.resolve(pack.packageRoot, rel);
|
|
42
87
|
if (!existsSync(full))
|
|
43
88
|
continue;
|
|
44
|
-
|
|
89
|
+
entry.list.push(...(await declarationsFrom(full, 'pack', (id) => `pack:${pack.packageName}:${id}`, entry, `Pack ${pack.packageName} (${rel})`, pack.packageName)));
|
|
45
90
|
}
|
|
46
91
|
}
|
|
47
|
-
CACHE.set(inspection.projectRoot,
|
|
48
|
-
return
|
|
92
|
+
CACHE.set(inspection.projectRoot, entry);
|
|
93
|
+
return entry;
|
|
94
|
+
}
|
|
95
|
+
/** Load every declared policy id — local files first, then pack contributions. */
|
|
96
|
+
export async function loadPolicyIds(inspection) {
|
|
97
|
+
return (await loadPolicyCache(inspection)).list;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The declared policy checks WITH what did not take effect (round 12, 12.1):
|
|
101
|
+
* files that failed to import and every declaration the loader refused — from
|
|
102
|
+
* the same one load {@link loadPolicyIds} reads.
|
|
103
|
+
*/
|
|
104
|
+
export async function loadPolicyDeclarationsWithIssues(inspection) {
|
|
105
|
+
const c = await loadPolicyCache(inspection);
|
|
106
|
+
return { declarations: c.declarations, issues: c.issues, rejected: c.rejected };
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* The declared policy checks (id, source, `references[]`) from the SAME cache
|
|
110
|
+
* {@link warmPolicyCache} fills — one reader of the declarations. Returns `[]`
|
|
111
|
+
* until the cache is warm; the staleness sweep reports that as "not in sweep",
|
|
112
|
+
* never as "no policies".
|
|
113
|
+
*/
|
|
114
|
+
export function listPolicyDeclarations(inspection) {
|
|
115
|
+
return CACHE.get(inspection.projectRoot)?.declarations ?? [];
|
|
49
116
|
}
|
|
50
117
|
/**
|
|
51
118
|
* The cached policy ids.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE field → kind binding table for the asset id-list fields the self-config
|
|
3
|
+
* doctor probes (round 12, 12.3).
|
|
4
|
+
*
|
|
5
|
+
* The 12.3 defect was a BINDING, not a missing registry: `discovery.profileIds`
|
|
6
|
+
* (a WorkspaceProfile applicability filter) was probed against
|
|
7
|
+
* `migration-profile`, a readiness-gate registry, so it sat at NOT VERIFIED
|
|
8
|
+
* forever — and filling that unrelated registry flipped the doctor to a false
|
|
9
|
+
* "not registered" for a real, detected profile. The template path answered
|
|
10
|
+
* the same question against the same wrong kind with no empty-registry guard.
|
|
11
|
+
*
|
|
12
|
+
* The doctor's template, registration-hint and convention families iterate
|
|
13
|
+
* THIS table (each row through `probeIds`, THE resolver's loud-skip path), and
|
|
14
|
+
* the r76 binding lock proves every `*Ids` field of `IConventionAppliesTo`,
|
|
15
|
+
* `IRegistrationHintDiscovery` and template `metadata` has a row naming a
|
|
16
|
+
* declarable kind — so a new id-bearing field cannot ship unbound, and a
|
|
17
|
+
* binding cannot silently point at the wrong registry again.
|
|
18
|
+
*/
|
|
19
|
+
import type { IProbedIdField } from './i-probed-id-field.js';
|
|
20
|
+
export declare const PROBED_ID_FIELDS: readonly IProbedIdField[];
|
|
21
|
+
//# sourceMappingURL=probed-id-fields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probed-id-fields.d.ts","sourceRoot":"","sources":["../src/probed-id-fields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EAuBhB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ProbedIdSource } from "./probed-id-source.js";
|
|
2
|
+
export const PROBED_ID_FIELDS = Object.freeze([
|
|
3
|
+
{ source: ProbedIdSource.Template, field: 'metadata.requiredConventionIds', kind: 'convention', label: 'convention' },
|
|
4
|
+
{ source: ProbedIdSource.Template, field: 'metadata.requiredHelperIds', kind: 'helper', label: 'helper' },
|
|
5
|
+
{ source: ProbedIdSource.Template, field: 'metadata.requiredProfileIds', kind: 'workspace-profile', label: 'profile' },
|
|
6
|
+
{
|
|
7
|
+
source: ProbedIdSource.Template,
|
|
8
|
+
field: 'metadata.registrationHintIds',
|
|
9
|
+
kind: 'registration-hint',
|
|
10
|
+
label: 'registration-hint',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
source: ProbedIdSource.RegistrationHint,
|
|
14
|
+
field: 'discovery.conventionIds',
|
|
15
|
+
kind: 'convention',
|
|
16
|
+
label: 'convention',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
source: ProbedIdSource.RegistrationHint,
|
|
20
|
+
field: 'discovery.profileIds',
|
|
21
|
+
kind: 'workspace-profile',
|
|
22
|
+
label: 'profile',
|
|
23
|
+
},
|
|
24
|
+
{ source: ProbedIdSource.Convention, field: 'appliesTo.profileIds', kind: 'workspace-profile', label: 'profile' },
|
|
25
|
+
]);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The asset kinds whose id-list fields the self-config doctor probes through
|
|
3
|
+
* THE id resolver via {@link PROBED_ID_FIELDS} (each value is also the
|
|
4
|
+
* finding's `sourceKind` and the prefix of its `<source>-<label>-missing` code).
|
|
5
|
+
*/
|
|
6
|
+
export declare enum ProbedIdSource {
|
|
7
|
+
Template = "template",
|
|
8
|
+
RegistrationHint = "registration-hint",
|
|
9
|
+
Convention = "convention"
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=probed-id-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probed-id-source.d.ts","sourceRoot":"","sources":["../src/probed-id-source.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,oBAAY,cAAc;IACxB,QAAQ,aAAa;IACrB,gBAAgB,sBAAsB;IACtC,UAAU,eAAe;CAC1B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The asset kinds whose id-list fields the self-config doctor probes through
|
|
3
|
+
* THE id resolver via {@link PROBED_ID_FIELDS} (each value is also the
|
|
4
|
+
* finding's `sourceKind` and the prefix of its `<source>-<label>-missing` code).
|
|
5
|
+
*/
|
|
6
|
+
export var ProbedIdSource;
|
|
7
|
+
(function (ProbedIdSource) {
|
|
8
|
+
ProbedIdSource["Template"] = "template";
|
|
9
|
+
ProbedIdSource["RegistrationHint"] = "registration-hint";
|
|
10
|
+
ProbedIdSource["Convention"] = "convention";
|
|
11
|
+
})(ProbedIdSource || (ProbedIdSource = {}));
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
import type { IdReferenceKind } from './reference-registry.js';
|
|
1
2
|
import type { ISharkcraftInspection } from './sharkcraft-inspector.js';
|
|
2
3
|
export declare const PROFILE_REGISTRY_SCHEMA = "sharkcraft.profile-registry/v1";
|
|
3
4
|
export declare enum ProfileKind {
|
|
4
|
-
Migration = "migration"
|
|
5
|
+
Migration = "migration",
|
|
6
|
+
/** Builtin: the engine's WorkspaceProfile vocabulary, with per-repo detection. */
|
|
7
|
+
Workspace = "workspace"
|
|
5
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* The reference kind each profile kind's ids resolve as — so the declaration
|
|
11
|
+
* table (`REFERENCE_KIND_DECLARATIONS`) can say how a profile kind is filled,
|
|
12
|
+
* and a new {@link ProfileKind} without a resolver kind is a compile error.
|
|
13
|
+
*/
|
|
14
|
+
export declare const PROFILE_KIND_REFERENCE_KIND: Readonly<Record<ProfileKind, IdReferenceKind>>;
|
|
6
15
|
export declare enum ProfileSource {
|
|
7
16
|
Builtin = "builtin",
|
|
8
17
|
Local = "local",
|
|
@@ -19,7 +28,12 @@ export interface IProfileEntry {
|
|
|
19
28
|
readonly sourceFile?: string;
|
|
20
29
|
readonly tags?: readonly string[];
|
|
21
30
|
readonly appliesWhen?: readonly string[];
|
|
22
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* `workspace` entries only: whether THIS repo exhibits the profile (the
|
|
33
|
+
* same fact as `payload.detected`). Absent on other kinds.
|
|
34
|
+
*/
|
|
35
|
+
readonly detected?: boolean;
|
|
36
|
+
/** The full profile payload (shape depends on `kind`; `IWorkspaceProfilePayload` for `workspace`). */
|
|
23
37
|
readonly payload: unknown;
|
|
24
38
|
}
|
|
25
39
|
export interface IProfileRegistryIssue {
|
|
@@ -29,6 +43,13 @@ export interface IProfileRegistryIssue {
|
|
|
29
43
|
readonly profileId?: string;
|
|
30
44
|
readonly kind?: ProfileKind;
|
|
31
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* THE builtin `workspace` profile entries: one per {@link WorkspaceProfile}
|
|
48
|
+
* id, labelled by THE label table, `detected` from this inspection's workspace
|
|
49
|
+
* detection. Synchronous and never empty — the resolver's `workspace-profile`
|
|
50
|
+
* kind reads it, so it can never loud-skip.
|
|
51
|
+
*/
|
|
52
|
+
export declare function listWorkspaceProfileEntries(inspection: ISharkcraftInspection): readonly IProfileEntry[];
|
|
32
53
|
export declare function loadAllProfiles(inspection: ISharkcraftInspection): Promise<{
|
|
33
54
|
entries: readonly IProfileEntry[];
|
|
34
55
|
issues: readonly IProfileRegistryIssue[];
|
|
@@ -38,4 +59,6 @@ export declare function listProfiles(inspection: ISharkcraftInspection, options?
|
|
|
38
59
|
}): Promise<readonly IProfileEntry[]>;
|
|
39
60
|
export declare function findProfile(inspection: ISharkcraftInspection, id: string, kind?: ProfileKind): Promise<IProfileEntry | null>;
|
|
40
61
|
export declare function listProfileIssues(inspection: ISharkcraftInspection): Promise<readonly IProfileRegistryIssue[]>;
|
|
62
|
+
/** True when `value` names a {@link ProfileKind} — THE parse the CLI `--kind` flag and MCP `kind` input share. */
|
|
63
|
+
export declare function isProfileKind(value: string): value is ProfileKind;
|
|
41
64
|
//# sourceMappingURL=profile-registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-registry.d.ts","sourceRoot":"","sources":["../src/profile-registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"profile-registry.d.ts","sourceRoot":"","sources":["../src/profile-registry.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,eAAO,MAAM,uBAAuB,mCAAmC,CAAC;AAExE,oBAAY,WAAW;IACrB,SAAS,cAAc;IACvB,kFAAkF;IAClF,SAAS,cAAc;CACxB;AAED;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,eAAe,CAAC,CAGrF,CAAC;AAEH,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,sGAAsG;IACtG,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,qBAAqB,GAAG,SAAS,aAAa,EAAE,CAoBvG;AAED,wBAAsB,eAAe,CACnC,UAAU,EAAE,qBAAqB,GAChC,OAAO,CAAC;IACT,OAAO,EAAE,SAAS,aAAa,EAAE,CAAC;IAClC,MAAM,EAAE,SAAS,qBAAqB,EAAE,CAAC;CAC1C,CAAC,CAuCD;AAED,wBAAsB,YAAY,CAChC,UAAU,EAAE,qBAAqB,EACjC,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,WAAW,CAAA;CAAO,GACnC,OAAO,CAAC,SAAS,aAAa,EAAE,CAAC,CAInC;AAED,wBAAsB,WAAW,CAC/B,UAAU,EAAE,qBAAqB,EACjC,EAAE,EAAE,MAAM,EACV,IAAI,CAAC,EAAE,WAAW,GACjB,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAK/B;AAED,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,qBAAqB,GAChC,OAAO,CAAC,SAAS,qBAAqB,EAAE,CAAC,CAG3C;AAED,kHAAkH;AAClH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,WAAW,CAEjE"}
|
package/dist/profile-registry.js
CHANGED
|
@@ -1,20 +1,40 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generic profile registry.
|
|
3
3
|
*
|
|
4
|
-
* Unifies profile-shaped
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Unifies profile-shaped vocabularies under a single `shrk profiles ...`
|
|
5
|
+
* surface (and MCP `list_profiles` / `get_profile`):
|
|
6
|
+
*
|
|
7
|
+
* - `workspace` — BUILTIN: the engine's {@link WorkspaceProfile} vocabulary
|
|
8
|
+
* (`has-typescript`, `is-library`, …). The applicability filters
|
|
9
|
+
* (`IPreset.appliesTo`, a convention's `appliesTo.profileIds`, a
|
|
10
|
+
* registration hint's `discovery.profileIds`, a template's
|
|
11
|
+
* `metadata.requiredProfileIds`) name these ids, and THE id resolver's
|
|
12
|
+
* `workspace-profile` kind reads {@link listWorkspaceProfileEntries} — the
|
|
13
|
+
* same function `profiles list --kind workspace` prints. Every id is listed;
|
|
14
|
+
* `detected` says whether this repo exhibits it.
|
|
15
|
+
* - `migration` — pack-contributed (`migrationProfileFiles`) or local
|
|
16
|
+
* (`sharkcraft/migration-profiles.ts`) migration-readiness gates.
|
|
8
17
|
*
|
|
9
18
|
* Read-only.
|
|
10
19
|
*/
|
|
20
|
+
import { describeWorkspaceProfile, listWorkspaceProfiles } from '@shrkcrft/workspace';
|
|
11
21
|
import { loadMigrationProfiles } from "./migration-profile-registry.js";
|
|
12
22
|
export const PROFILE_REGISTRY_SCHEMA = 'sharkcraft.profile-registry/v1';
|
|
13
23
|
export var ProfileKind;
|
|
14
24
|
(function (ProfileKind) {
|
|
15
25
|
ProfileKind["Migration"] = "migration";
|
|
16
|
-
/**
|
|
26
|
+
/** Builtin: the engine's WorkspaceProfile vocabulary, with per-repo detection. */
|
|
27
|
+
ProfileKind["Workspace"] = "workspace";
|
|
17
28
|
})(ProfileKind || (ProfileKind = {}));
|
|
29
|
+
/**
|
|
30
|
+
* The reference kind each profile kind's ids resolve as — so the declaration
|
|
31
|
+
* table (`REFERENCE_KIND_DECLARATIONS`) can say how a profile kind is filled,
|
|
32
|
+
* and a new {@link ProfileKind} without a resolver kind is a compile error.
|
|
33
|
+
*/
|
|
34
|
+
export const PROFILE_KIND_REFERENCE_KIND = Object.freeze({
|
|
35
|
+
[ProfileKind.Migration]: 'migration-profile',
|
|
36
|
+
[ProfileKind.Workspace]: 'workspace-profile',
|
|
37
|
+
});
|
|
18
38
|
export var ProfileSource;
|
|
19
39
|
(function (ProfileSource) {
|
|
20
40
|
ProfileSource["Builtin"] = "builtin";
|
|
@@ -22,8 +42,37 @@ export var ProfileSource;
|
|
|
22
42
|
ProfileSource["Pack"] = "pack";
|
|
23
43
|
ProfileSource["Fixture"] = "fixture";
|
|
24
44
|
})(ProfileSource || (ProfileSource = {}));
|
|
45
|
+
/**
|
|
46
|
+
* THE builtin `workspace` profile entries: one per {@link WorkspaceProfile}
|
|
47
|
+
* id, labelled by THE label table, `detected` from this inspection's workspace
|
|
48
|
+
* detection. Synchronous and never empty — the resolver's `workspace-profile`
|
|
49
|
+
* kind reads it, so it can never loud-skip.
|
|
50
|
+
*/
|
|
51
|
+
export function listWorkspaceProfileEntries(inspection) {
|
|
52
|
+
const evidence = new Map();
|
|
53
|
+
for (const e of inspection.workspace?.profileEvidence ?? [])
|
|
54
|
+
evidence.set(e.profile, e.reason);
|
|
55
|
+
const detected = new Set(inspection.workspace?.profiles ?? []);
|
|
56
|
+
return listWorkspaceProfiles().map((id) => {
|
|
57
|
+
const isDetected = detected.has(id);
|
|
58
|
+
const reason = evidence.get(id);
|
|
59
|
+
const payload = {
|
|
60
|
+
detected: isDetected,
|
|
61
|
+
...(isDetected && reason !== undefined ? { reason } : {}),
|
|
62
|
+
};
|
|
63
|
+
return {
|
|
64
|
+
id,
|
|
65
|
+
kind: ProfileKind.Workspace,
|
|
66
|
+
title: describeWorkspaceProfile(id),
|
|
67
|
+
source: ProfileSource.Builtin,
|
|
68
|
+
detected: isDetected,
|
|
69
|
+
payload,
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
}
|
|
25
73
|
export async function loadAllProfiles(inspection) {
|
|
26
|
-
|
|
74
|
+
// Builtin first: the vocabulary every applicability filter names.
|
|
75
|
+
const entries = [...listWorkspaceProfileEntries(inspection)];
|
|
27
76
|
const issues = [];
|
|
28
77
|
// Migration profiles
|
|
29
78
|
try {
|
|
@@ -74,3 +123,7 @@ export async function listProfileIssues(inspection) {
|
|
|
74
123
|
const { issues } = await loadAllProfiles(inspection);
|
|
75
124
|
return issues;
|
|
76
125
|
}
|
|
126
|
+
/** True when `value` names a {@link ProfileKind} — THE parse the CLI `--kind` flag and MCP `kind` input share. */
|
|
127
|
+
export function isProfileKind(value) {
|
|
128
|
+
return Object.values(ProfileKind).includes(value);
|
|
129
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How one quality gate's run counts toward the quality report's coverage —
|
|
3
|
+
* THE classification behind `IQualityReport.overall` and `shrk quality`'s item
|
|
4
|
+
* status, so the MCP / dashboard / report-site verdict and the CLI verdict
|
|
5
|
+
* cannot disagree about a gate.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum QualityGateExamination {
|
|
8
|
+
/** It ran over its whole scope: its `passed` is a verdict. */
|
|
9
|
+
Examined = "examined",
|
|
10
|
+
/** It examined nothing and was optional: a deliberate skip, never counted as a pass. */
|
|
11
|
+
DeliberateSkip = "deliberate-skip",
|
|
12
|
+
/** It could not run, examined nothing while required, or examined only part of its scope. */
|
|
13
|
+
Unexamined = "unexamined"
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=quality-gate-examination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality-gate-examination.d.ts","sourceRoot":"","sources":["../src/quality-gate-examination.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oBAAY,sBAAsB;IAChC,8DAA8D;IAC9D,QAAQ,aAAa;IACrB,wFAAwF;IACxF,cAAc,oBAAoB;IAClC,6FAA6F;IAC7F,UAAU,eAAe;CAC1B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How one quality gate's run counts toward the quality report's coverage —
|
|
3
|
+
* THE classification behind `IQualityReport.overall` and `shrk quality`'s item
|
|
4
|
+
* status, so the MCP / dashboard / report-site verdict and the CLI verdict
|
|
5
|
+
* cannot disagree about a gate.
|
|
6
|
+
*/
|
|
7
|
+
export var QualityGateExamination;
|
|
8
|
+
(function (QualityGateExamination) {
|
|
9
|
+
/** It ran over its whole scope: its `passed` is a verdict. */
|
|
10
|
+
QualityGateExamination["Examined"] = "examined";
|
|
11
|
+
/** It examined nothing and was optional: a deliberate skip, never counted as a pass. */
|
|
12
|
+
QualityGateExamination["DeliberateSkip"] = "deliberate-skip";
|
|
13
|
+
/** It could not run, examined nothing while required, or examined only part of its scope. */
|
|
14
|
+
QualityGateExamination["Unexamined"] = "unexamined";
|
|
15
|
+
})(QualityGateExamination || (QualityGateExamination = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { QualityGateStatus } from './quality-gate-status.js';
|
|
2
|
+
import type { IQualityGateResult } from './quality-report.js';
|
|
3
|
+
/**
|
|
4
|
+
* THE row status of one quality gate, for every renderer (the dashboard, the
|
|
5
|
+
* HTML report, the report site), derived from the one classification
|
|
6
|
+
* (`examineQualityGate`) that `overall` and `shrk quality` also read.
|
|
7
|
+
*
|
|
8
|
+
* a deliberate (optional) skip → skipped
|
|
9
|
+
* a gate that ran and failed (a finding dominates) → fail / warn
|
|
10
|
+
* unexamined: could not run, examined nothing while
|
|
11
|
+
* required, or passed over part of its scope → not-verified
|
|
12
|
+
* anything else → pass
|
|
13
|
+
*
|
|
14
|
+
* Before round 11 each renderer re-derived the row from `g.passed`, so a gate
|
|
15
|
+
* whose boundary rule had a dead scope glob read `pass` / `OK` next to an
|
|
16
|
+
* overall `not-verified`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function qualityGateStatus(g: IQualityGateResult): QualityGateStatus;
|
|
19
|
+
//# sourceMappingURL=quality-gate-row-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality-gate-row-status.d.ts","sourceRoot":"","sources":["../src/quality-gate-row-status.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,kBAAkB,GAAG,iBAAiB,CAM1E"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { QualityGateExamination } from "./quality-gate-examination.js";
|
|
2
|
+
import { QualityGateStatus } from "./quality-gate-status.js";
|
|
3
|
+
import { examineQualityGate } from "./quality-report-coverage.js";
|
|
4
|
+
/**
|
|
5
|
+
* THE row status of one quality gate, for every renderer (the dashboard, the
|
|
6
|
+
* HTML report, the report site), derived from the one classification
|
|
7
|
+
* (`examineQualityGate`) that `overall` and `shrk quality` also read.
|
|
8
|
+
*
|
|
9
|
+
* a deliberate (optional) skip → skipped
|
|
10
|
+
* a gate that ran and failed (a finding dominates) → fail / warn
|
|
11
|
+
* unexamined: could not run, examined nothing while
|
|
12
|
+
* required, or passed over part of its scope → not-verified
|
|
13
|
+
* anything else → pass
|
|
14
|
+
*
|
|
15
|
+
* Before round 11 each renderer re-derived the row from `g.passed`, so a gate
|
|
16
|
+
* whose boundary rule had a dead scope glob read `pass` / `OK` next to an
|
|
17
|
+
* overall `not-verified`.
|
|
18
|
+
*/
|
|
19
|
+
export function qualityGateStatus(g) {
|
|
20
|
+
const exam = examineQualityGate(g);
|
|
21
|
+
if (exam === QualityGateExamination.DeliberateSkip)
|
|
22
|
+
return QualityGateStatus.Skipped;
|
|
23
|
+
if (g.executed && !g.passed)
|
|
24
|
+
return g.blocking ? QualityGateStatus.Fail : QualityGateStatus.Warn;
|
|
25
|
+
if (exam === QualityGateExamination.Unexamined)
|
|
26
|
+
return QualityGateStatus.NotVerified;
|
|
27
|
+
return QualityGateStatus.Pass;
|
|
28
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How one quality gate's ROW reads on every renderer (the dashboard, the HTML
|
|
3
|
+
* report, the report site), derived once by `qualityGateStatus` from the one
|
|
4
|
+
* classification (`examineQualityGate`). A gate that passed over part of its
|
|
5
|
+
* scope is `not-verified`, never `pass` / `OK`.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum QualityGateStatus {
|
|
8
|
+
Pass = "pass",
|
|
9
|
+
Warn = "warn",
|
|
10
|
+
Fail = "fail",
|
|
11
|
+
/** It could not run, examined nothing while required, or examined only part of its scope. */
|
|
12
|
+
NotVerified = "not-verified",
|
|
13
|
+
/** It examined nothing and was optional: a deliberate skip. */
|
|
14
|
+
Skipped = "skipped"
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=quality-gate-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality-gate-status.d.ts","sourceRoot":"","sources":["../src/quality-gate-status.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oBAAY,iBAAiB;IAC3B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,6FAA6F;IAC7F,WAAW,iBAAiB;IAC5B,+DAA+D;IAC/D,OAAO,YAAY;CACpB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How one quality gate's ROW reads on every renderer (the dashboard, the HTML
|
|
3
|
+
* report, the report site), derived once by `qualityGateStatus` from the one
|
|
4
|
+
* classification (`examineQualityGate`). A gate that passed over part of its
|
|
5
|
+
* scope is `not-verified`, never `pass` / `OK`.
|
|
6
|
+
*/
|
|
7
|
+
export var QualityGateStatus;
|
|
8
|
+
(function (QualityGateStatus) {
|
|
9
|
+
QualityGateStatus["Pass"] = "pass";
|
|
10
|
+
QualityGateStatus["Warn"] = "warn";
|
|
11
|
+
QualityGateStatus["Fail"] = "fail";
|
|
12
|
+
/** It could not run, examined nothing while required, or examined only part of its scope. */
|
|
13
|
+
QualityGateStatus["NotVerified"] = "not-verified";
|
|
14
|
+
/** It examined nothing and was optional: a deliberate skip. */
|
|
15
|
+
QualityGateStatus["Skipped"] = "skipped";
|
|
16
|
+
})(QualityGateStatus || (QualityGateStatus = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quality-html.d.ts","sourceRoot":"","sources":["../src/quality-html.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"quality-html.d.ts","sourceRoot":"","sources":["../src/quality-html.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AA8B1D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAiDhE"}
|
package/dist/quality-html.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { QualityGateStatus } from "./quality-gate-status.js";
|
|
2
|
+
import { qualityGateStatus } from "./quality-gate-row-status.js";
|
|
1
3
|
const CSS = `
|
|
2
4
|
*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;margin:0;background:#0f1419;color:#e6e1cf;padding:2rem;line-height:1.55}
|
|
3
5
|
h1,h2,h3{margin-top:1.4rem;color:#bae67e}
|
|
@@ -18,7 +20,8 @@ function escapeHtml(s) {
|
|
|
18
20
|
function badgeFor(overall) {
|
|
19
21
|
if (overall === 'pass')
|
|
20
22
|
return `<span class="badge b-pass">${overall}</span>`;
|
|
21
|
-
|
|
23
|
+
// Not verified is never drawn as a pass.
|
|
24
|
+
if (overall === 'warn' || overall === 'not-verified')
|
|
22
25
|
return `<span class="badge b-warn">${overall}</span>`;
|
|
23
26
|
return `<span class="badge b-fail">${overall}</span>`;
|
|
24
27
|
}
|
|
@@ -35,8 +38,16 @@ export function renderQualityHtml(report) {
|
|
|
35
38
|
out.push('<h2>Gates</h2>');
|
|
36
39
|
out.push('<table><thead><tr><th>Gate</th><th>Verdict</th><th>Blocking</th><th>Executed</th><th>Notes</th></tr></thead><tbody>');
|
|
37
40
|
for (const g of report.gates) {
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
// THE row status (`qualityGateStatus`): a gate that passed over part of
|
|
42
|
+
// its scope is `not-verified`, never drawn as a pass.
|
|
43
|
+
const verdict = qualityGateStatus(g);
|
|
44
|
+
const tag = verdict === QualityGateStatus.Pass
|
|
45
|
+
? 'b-pass'
|
|
46
|
+
: verdict === QualityGateStatus.Fail
|
|
47
|
+
? 'b-fail'
|
|
48
|
+
: verdict === QualityGateStatus.Skipped
|
|
49
|
+
? 'b-skip'
|
|
50
|
+
: 'b-warn';
|
|
40
51
|
out.push(`<tr><td><code>${escapeHtml(g.id)}</code> — ${escapeHtml(g.label)}</td>` +
|
|
41
52
|
`<td><span class="badge ${tag}">${verdict}</span></td>` +
|
|
42
53
|
`<td>${g.blocking ? 'yes' : 'no'}</td>` +
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IVerdictCoverage } from '@shrkcrft/core';
|
|
2
|
+
import { QualityGateExamination } from './quality-gate-examination.js';
|
|
3
|
+
import type { IQualityGateResult } from './quality-report.js';
|
|
4
|
+
/**
|
|
5
|
+
* THE classification of one quality gate's run:
|
|
6
|
+
*
|
|
7
|
+
* - not executed (it threw, or MCP would not run it) → unexamined
|
|
8
|
+
* - `data.examinedNothing` (zero tests, zero rules) → unexamined when the
|
|
9
|
+
* gate is required (blocking), a deliberate skip when it is optional
|
|
10
|
+
* - passed, with `data.partial` (a boundary rule whose scope glob went dead,
|
|
11
|
+
* an agent test the runner could not evaluate) → unexamined
|
|
12
|
+
* - anything else → examined
|
|
13
|
+
*
|
|
14
|
+
* `shrk quality` maps each gate onto its item through this one function, and
|
|
15
|
+
* `buildQualityReport` derives `overall` from it, so no consumer can read a
|
|
16
|
+
* pass over a gate the other calls partial.
|
|
17
|
+
*/
|
|
18
|
+
export declare function examineQualityGate(g: IQualityGateResult): QualityGateExamination;
|
|
19
|
+
/**
|
|
20
|
+
* What a quality report examined, as one coverage record (unit `quality
|
|
21
|
+
* gates`): every gate but the deliberate skips was asked for, and the
|
|
22
|
+
* unexamined ones are named. Core's `coverageShortfall` over it is what turns
|
|
23
|
+
* a clean report into `not-verified`.
|
|
24
|
+
*/
|
|
25
|
+
export declare function qualityReportCoverage(gates: readonly IQualityGateResult[]): IVerdictCoverage;
|
|
26
|
+
//# sourceMappingURL=quality-report-coverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality-report-coverage.d.ts","sourceRoot":"","sources":["../src/quality-report-coverage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,kBAAkB,GAAG,sBAAsB,CAOhF;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS,kBAAkB,EAAE,GAAG,gBAAgB,CAgB5F"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { QualityGateExamination } from "./quality-gate-examination.js";
|
|
2
|
+
/**
|
|
3
|
+
* THE classification of one quality gate's run:
|
|
4
|
+
*
|
|
5
|
+
* - not executed (it threw, or MCP would not run it) → unexamined
|
|
6
|
+
* - `data.examinedNothing` (zero tests, zero rules) → unexamined when the
|
|
7
|
+
* gate is required (blocking), a deliberate skip when it is optional
|
|
8
|
+
* - passed, with `data.partial` (a boundary rule whose scope glob went dead,
|
|
9
|
+
* an agent test the runner could not evaluate) → unexamined
|
|
10
|
+
* - anything else → examined
|
|
11
|
+
*
|
|
12
|
+
* `shrk quality` maps each gate onto its item through this one function, and
|
|
13
|
+
* `buildQualityReport` derives `overall` from it, so no consumer can read a
|
|
14
|
+
* pass over a gate the other calls partial.
|
|
15
|
+
*/
|
|
16
|
+
export function examineQualityGate(g) {
|
|
17
|
+
if (!g.executed)
|
|
18
|
+
return QualityGateExamination.Unexamined;
|
|
19
|
+
if (g.data?.['examinedNothing'] === true) {
|
|
20
|
+
return g.blocking ? QualityGateExamination.Unexamined : QualityGateExamination.DeliberateSkip;
|
|
21
|
+
}
|
|
22
|
+
if (g.passed && g.data?.['partial'] === true)
|
|
23
|
+
return QualityGateExamination.Unexamined;
|
|
24
|
+
return QualityGateExamination.Examined;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* What a quality report examined, as one coverage record (unit `quality
|
|
28
|
+
* gates`): every gate but the deliberate skips was asked for, and the
|
|
29
|
+
* unexamined ones are named. Core's `coverageShortfall` over it is what turns
|
|
30
|
+
* a clean report into `not-verified`.
|
|
31
|
+
*/
|
|
32
|
+
export function qualityReportCoverage(gates) {
|
|
33
|
+
const exams = gates.map((g) => ({ id: g.id, exam: examineQualityGate(g) }));
|
|
34
|
+
const deliberate = exams.filter((e) => e.exam === QualityGateExamination.DeliberateSkip).length;
|
|
35
|
+
const unexamined = exams.filter((e) => e.exam === QualityGateExamination.Unexamined).map((e) => e.id);
|
|
36
|
+
const expected = gates.length - deliberate;
|
|
37
|
+
return {
|
|
38
|
+
unit: 'quality gates',
|
|
39
|
+
expected,
|
|
40
|
+
examined: expected - unexamined.length,
|
|
41
|
+
...(unexamined.length > 0
|
|
42
|
+
? {
|
|
43
|
+
unexamined,
|
|
44
|
+
reason: 'could not run, examined nothing while required, or examined only part of their scope',
|
|
45
|
+
}
|
|
46
|
+
: {}),
|
|
47
|
+
};
|
|
48
|
+
}
|