@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
|
@@ -5,50 +5,124 @@
|
|
|
5
5
|
* into a single in-memory list. Patterns are data; this module never executes
|
|
6
6
|
* shell commands or evaluates pack code beyond a dynamic import.
|
|
7
7
|
*/
|
|
8
|
-
import { existsSync } from 'node:fs';
|
|
8
|
+
import { existsSync, readdirSync, statSync } from 'node:fs';
|
|
9
9
|
import * as nodePath from 'node:path';
|
|
10
|
-
import { importModuleViaLoader } from '@shrkcrft/core';
|
|
11
|
-
import { isRecognizedScaffoldStrategy, } from '@shrkcrft/plugin-api';
|
|
10
|
+
import { DEAD_SELECTOR_CAUSES, importModuleViaLoader, MARKABLE_UNIT_LISTS, MarkableUnitList, mergeUnitMarks, normalizeUnitList, qualifyListPath, qualifyUnitMarks, RejectionCause, settleUnitLiveness, stampUnitMarks, UnitDeadWeight, UnitLivenessState, unitListProblems, unitProblemsOf, } from '@shrkcrft/core';
|
|
11
|
+
import { isRecognizedScaffoldStrategy, normalizeScaffoldPattern, resolveScaffoldStrategy, } from '@shrkcrft/plugin-api';
|
|
12
|
+
/** THE closed set of a pattern's `confidence` — the loader and the doctor read one set. */
|
|
13
|
+
const SCAFFOLD_CONFIDENCES = new Set(['high', 'medium', 'low']);
|
|
14
|
+
/**
|
|
15
|
+
* THE scaffold-pattern acceptance predicate (round 12, 12.1 / 12.1d): `id`,
|
|
16
|
+
* `templateId`, a non-empty `matchPaths` and a `confidence` from the closed
|
|
17
|
+
* set — `[]` means accepted. `confidence` was checked only by `scaffolds
|
|
18
|
+
* doctor`, so a pattern without one was ACCEPTED and `scaffolds list` crashed
|
|
19
|
+
* on it (`p.pattern.confidence.padEnd`).
|
|
20
|
+
*/
|
|
21
|
+
export function scaffoldPatternRejectionReasons(raw) {
|
|
22
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw))
|
|
23
|
+
return ['(entry): must be an object'];
|
|
24
|
+
const p = raw;
|
|
25
|
+
const out = [];
|
|
26
|
+
if (typeof p.id !== 'string' || p.id.length === 0)
|
|
27
|
+
out.push('id: must be a non-empty string');
|
|
28
|
+
if (typeof p.templateId !== 'string' || p.templateId.length === 0) {
|
|
29
|
+
out.push('templateId: must be a non-empty string');
|
|
30
|
+
}
|
|
31
|
+
if (!Array.isArray(p.matchPaths) || p.matchPaths.length === 0) {
|
|
32
|
+
out.push('matchPaths: must be a non-empty array');
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
// Round 13: each entry is a glob string or a well-formed
|
|
36
|
+
// `{ pattern, expectEmpty: true, reason? }` marker — THE core parser's
|
|
37
|
+
// problems, one per bad entry. An object used to load as the glob
|
|
38
|
+
// `[object Object]` (matching nothing, silently).
|
|
39
|
+
out.push(...unitListProblems(p.matchPaths, MATCH_PATHS));
|
|
40
|
+
}
|
|
41
|
+
if ('expectEmptyUnits' in p) {
|
|
42
|
+
out.push(`expectEmptyUnits: derived by the loader — mark the entry itself: matchPaths: [{ pattern, expectEmpty: true }]`);
|
|
43
|
+
}
|
|
44
|
+
if (typeof p.confidence !== 'string' || !SCAFFOLD_CONFIDENCES.has(p.confidence)) {
|
|
45
|
+
out.push(`confidence: must be high|medium|low (got "${String(p.confidence)}")`);
|
|
46
|
+
}
|
|
47
|
+
return out;
|
|
48
|
+
}
|
|
49
|
+
/** THE list path of `matchPaths` — the loader's marks and the doctor's observations share it. */
|
|
50
|
+
const MATCH_PATHS = MARKABLE_UNIT_LISTS[MarkableUnitList.ScaffoldPatternMatchPaths].listPath;
|
|
51
|
+
/**
|
|
52
|
+
* A pattern's `matchPaths` as plain globs plus its marker ledger — idempotent,
|
|
53
|
+
* so a hand-built pattern that still carries `{ pattern, expectEmpty }` entries
|
|
54
|
+
* is read by its units instead of as the glob `[object Object]`.
|
|
55
|
+
*/
|
|
56
|
+
function patternUnits(p) {
|
|
57
|
+
const list = Array.isArray(p.matchPaths) ? p.matchPaths : [];
|
|
58
|
+
const n = normalizeUnitList(list, MATCH_PATHS);
|
|
59
|
+
return n.ok
|
|
60
|
+
? { units: n.value.units, marks: mergeUnitMarks(p.expectEmptyUnits, n.value.marks) }
|
|
61
|
+
: { units: list.filter((g) => typeof g === 'string'), marks: p.expectEmptyUnits ?? [] };
|
|
62
|
+
}
|
|
12
63
|
export async function loadScaffoldPatternsFromFile(file) {
|
|
13
|
-
if (!existsSync(file))
|
|
14
|
-
return { patterns: [], warnings: [`scaffold pattern file missing: ${file}`] };
|
|
64
|
+
if (!existsSync(file)) {
|
|
65
|
+
return { patterns: [], indices: [], warnings: [`scaffold pattern file missing: ${file}`], rejected: [] };
|
|
66
|
+
}
|
|
15
67
|
try {
|
|
16
68
|
const mod = await importModuleViaLoader(file);
|
|
17
69
|
const raw = mod.default ?? mod;
|
|
18
70
|
if (!Array.isArray(raw)) {
|
|
19
71
|
return {
|
|
20
72
|
patterns: [],
|
|
73
|
+
indices: [],
|
|
21
74
|
warnings: [`scaffold pattern file did not default-export an array: ${file}`],
|
|
75
|
+
rejected: [],
|
|
22
76
|
};
|
|
23
77
|
}
|
|
24
78
|
const out = [];
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
79
|
+
const indices = [];
|
|
80
|
+
const rejected = [];
|
|
81
|
+
raw.forEach((candidate, index) => {
|
|
82
|
+
const reasons = scaffoldPatternRejectionReasons(candidate);
|
|
83
|
+
if (reasons.length > 0) {
|
|
84
|
+
const id = candidate && typeof candidate === 'object' ? candidate.id : undefined;
|
|
85
|
+
rejected.push({
|
|
86
|
+
file,
|
|
87
|
+
index,
|
|
88
|
+
exportName: 'default',
|
|
89
|
+
...(typeof id === 'string' && id.length > 0 ? { entryId: id } : {}),
|
|
90
|
+
reasons,
|
|
91
|
+
cause: RejectionCause.Invalid,
|
|
92
|
+
});
|
|
93
|
+
return;
|
|
39
94
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
95
|
+
// THE normaliser (round 13): `matchPaths` markers become plain globs + the
|
|
96
|
+
// `expectEmptyUnits` ledger (the pack stamp is added by the inspection
|
|
97
|
+
// loader, which knows the pack). A new object — the module's export is
|
|
98
|
+
// never patched.
|
|
99
|
+
const normalized = normalizeScaffoldPattern(candidate);
|
|
100
|
+
if (!normalized.ok) {
|
|
101
|
+
const id = candidate.id;
|
|
102
|
+
rejected.push({
|
|
103
|
+
file,
|
|
104
|
+
index,
|
|
105
|
+
exportName: 'default',
|
|
106
|
+
...(typeof id === 'string' && id.length > 0 ? { entryId: id } : {}),
|
|
107
|
+
reasons: unitProblemsOf(normalized.error),
|
|
108
|
+
cause: RejectionCause.Invalid,
|
|
109
|
+
});
|
|
110
|
+
return;
|
|
43
111
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
112
|
+
const p = normalized.value;
|
|
113
|
+
// The list every consumer iterates (`extractVariablesForFile`): a missing
|
|
114
|
+
// one is normalised to a frozen [] rather than reaching it as undefined.
|
|
115
|
+
out.push(Array.isArray(p.variables) ? p : { ...p, variables: Object.freeze([]) });
|
|
116
|
+
indices.push(index);
|
|
117
|
+
});
|
|
118
|
+
return { patterns: out, indices, warnings: [], rejected };
|
|
47
119
|
}
|
|
48
120
|
catch (e) {
|
|
49
121
|
return {
|
|
50
122
|
patterns: [],
|
|
123
|
+
indices: [],
|
|
51
124
|
warnings: [`failed to import scaffold pattern file ${file}: ${e.message}`],
|
|
125
|
+
rejected: [],
|
|
52
126
|
};
|
|
53
127
|
}
|
|
54
128
|
}
|
|
@@ -59,22 +133,35 @@ export async function loadScaffoldPatternsFromFile(file) {
|
|
|
59
133
|
export async function loadScaffoldPatternsFromInspection(inspection) {
|
|
60
134
|
const seen = new Map();
|
|
61
135
|
const warnings = [];
|
|
136
|
+
const rejected = [];
|
|
137
|
+
const duplicate = (p, file, index, prev) => {
|
|
138
|
+
rejected.push({
|
|
139
|
+
file,
|
|
140
|
+
index,
|
|
141
|
+
exportName: 'default',
|
|
142
|
+
entryId: p.id,
|
|
143
|
+
reasons: [`id: "${p.id}" is already declared in ${prev.source.file ?? prev.source.type}`],
|
|
144
|
+
cause: RejectionCause.DuplicateId,
|
|
145
|
+
});
|
|
146
|
+
};
|
|
62
147
|
// Also load a local sharkcraft/scaffold-patterns.ts when present.
|
|
63
148
|
if (inspection.sharkcraftDir) {
|
|
64
149
|
const local = nodePath.join(inspection.sharkcraftDir, 'scaffold-patterns.ts');
|
|
65
150
|
if (existsSync(local)) {
|
|
66
151
|
const r = await loadScaffoldPatternsFromFile(local);
|
|
67
152
|
warnings.push(...r.warnings);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
153
|
+
rejected.push(...r.rejected);
|
|
154
|
+
r.patterns.forEach((p, i) => {
|
|
155
|
+
const prev = seen.get(p.id);
|
|
156
|
+
if (prev) {
|
|
157
|
+
duplicate(p, local, r.indices[i] ?? i, prev);
|
|
158
|
+
return;
|
|
72
159
|
}
|
|
73
160
|
seen.set(p.id, {
|
|
74
161
|
pattern: p,
|
|
75
162
|
source: { type: 'local', file: local },
|
|
76
163
|
});
|
|
77
|
-
}
|
|
164
|
+
});
|
|
78
165
|
}
|
|
79
166
|
}
|
|
80
167
|
for (const pack of inspection.packs.validPacks) {
|
|
@@ -83,13 +170,19 @@ export async function loadScaffoldPatternsFromInspection(inspection) {
|
|
|
83
170
|
const full = nodePath.resolve(pack.packageRoot, rel);
|
|
84
171
|
const r = await loadScaffoldPatternsFromFile(full);
|
|
85
172
|
warnings.push(...r.warnings);
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
173
|
+
rejected.push(...r.rejected);
|
|
174
|
+
for (const [i, p] of r.patterns.entries()) {
|
|
175
|
+
const prev = seen.get(p.id);
|
|
176
|
+
if (prev) {
|
|
177
|
+
duplicate(p, full, r.indices[i] ?? i, prev);
|
|
89
178
|
continue;
|
|
90
179
|
}
|
|
91
180
|
seen.set(p.id, {
|
|
92
|
-
|
|
181
|
+
// A pack's markers carry the pack (round 13): a pack marker that went
|
|
182
|
+
// live is INFO for the consumer, who cannot edit it.
|
|
183
|
+
pattern: p.expectEmptyUnits
|
|
184
|
+
? { ...p, expectEmptyUnits: stampUnitMarks(p.expectEmptyUnits, pack.packageName) }
|
|
185
|
+
: p,
|
|
93
186
|
source: {
|
|
94
187
|
type: 'pack',
|
|
95
188
|
packageName: pack.packageName,
|
|
@@ -104,10 +197,59 @@ export async function loadScaffoldPatternsFromInspection(inspection) {
|
|
|
104
197
|
}
|
|
105
198
|
}
|
|
106
199
|
}
|
|
107
|
-
return { patterns: [...seen.values()], warnings };
|
|
200
|
+
return { patterns: [...seen.values()], warnings, rejected };
|
|
108
201
|
}
|
|
109
|
-
|
|
202
|
+
/**
|
|
203
|
+
* `coverage` (optional, from {@link enumerateScaffoldPatternCandidates}) adds
|
|
204
|
+
* the per-unit dead-selector checks: a `matchPaths` glob matching no file, and
|
|
205
|
+
* a pattern matching no file after `excludePaths`. Without it only the
|
|
206
|
+
* definitions are validated (back-compat).
|
|
207
|
+
*/
|
|
208
|
+
export function doctorScaffoldPatterns(patterns, inspection, coverage) {
|
|
110
209
|
const issues = [];
|
|
210
|
+
if (coverage) {
|
|
211
|
+
// Every per-unit finding comes from THE settle (round 13): a dead glob or
|
|
212
|
+
// pattern is a warning; an intended-empty glob and a stale marker are info
|
|
213
|
+
// (the acceptance rides in coverage; went-live fails only through
|
|
214
|
+
// `selectorUnitFails` under `--fail-on-dead-units`).
|
|
215
|
+
const liveness = scaffoldPatternLiveness(patterns, coverage);
|
|
216
|
+
for (const { pattern: p } of patterns) {
|
|
217
|
+
if (!coverage.byPattern.has(p.id))
|
|
218
|
+
continue;
|
|
219
|
+
for (const u of liveness.globs.units.filter((x) => x.list === qualifyListPath(p.id, MATCH_PATHS))) {
|
|
220
|
+
if (u.state === UnitLivenessState.Dead) {
|
|
221
|
+
issues.push({
|
|
222
|
+
patternId: p.id,
|
|
223
|
+
field: 'matchPaths',
|
|
224
|
+
severity: 'warning',
|
|
225
|
+
code: 'matchPaths-matched-nothing',
|
|
226
|
+
target: u.unit,
|
|
227
|
+
message: `matchPaths glob "${u.unit}" matches no file, so the pattern never sees files through it — ${DEAD_SELECTOR_CAUSES}`,
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
else if (u.state === UnitLivenessState.IntendedEmpty || u.state === UnitLivenessState.WentLive) {
|
|
231
|
+
issues.push({
|
|
232
|
+
patternId: p.id,
|
|
233
|
+
field: 'matchPaths',
|
|
234
|
+
severity: 'info',
|
|
235
|
+
code: u.state === UnitLivenessState.IntendedEmpty ? 'matchPaths-intended-empty' : 'matchPaths-went-live',
|
|
236
|
+
target: u.unit,
|
|
237
|
+
// THE settle's sentence; the pattern is already the finding's subject.
|
|
238
|
+
message: `matchPaths glob "${u.unit}" — ${u.message}`,
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
if (liveness.patterns.dead.some((u) => u.unit === p.id)) {
|
|
243
|
+
issues.push({
|
|
244
|
+
patternId: p.id,
|
|
245
|
+
field: 'matchPaths',
|
|
246
|
+
severity: 'warning',
|
|
247
|
+
code: 'pattern-dead',
|
|
248
|
+
message: 'matches no file (after excludePaths), so inference can never suggest it',
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
111
253
|
const knownTemplateIds = new Set(inspection.templateRegistry.list().map((t) => t.id));
|
|
112
254
|
for (const { pattern: p } of patterns) {
|
|
113
255
|
if (!p.title) {
|
|
@@ -129,7 +271,7 @@ export function doctorScaffoldPatterns(patterns, inspection) {
|
|
|
129
271
|
message: 'appliesWhen is empty — pattern will not be consulted by any lifecycle hook',
|
|
130
272
|
});
|
|
131
273
|
}
|
|
132
|
-
if (
|
|
274
|
+
if (!SCAFFOLD_CONFIDENCES.has(String(p.confidence))) {
|
|
133
275
|
issues.push({
|
|
134
276
|
patternId: p.id,
|
|
135
277
|
field: 'confidence',
|
|
@@ -208,67 +350,216 @@ export function matchScaffoldPattern(pattern, relativePath) {
|
|
|
208
350
|
if (globToRegExp(x).test(path))
|
|
209
351
|
return false;
|
|
210
352
|
}
|
|
211
|
-
for (const m of pattern.
|
|
353
|
+
for (const m of patternUnits(pattern).units) {
|
|
212
354
|
if (globToRegExp(m).test(path))
|
|
213
355
|
return true;
|
|
214
356
|
}
|
|
215
357
|
return false;
|
|
216
358
|
}
|
|
359
|
+
// ─── Candidate enumeration (the one walker infer and the doctor share) ────────
|
|
360
|
+
/** Directory names the candidate walk never enters. */
|
|
361
|
+
const SCAFFOLD_WALK_SKIP = new Set([
|
|
362
|
+
'node_modules',
|
|
363
|
+
'.git',
|
|
364
|
+
'dist',
|
|
365
|
+
'.sharkcraft',
|
|
366
|
+
'__tests__',
|
|
367
|
+
]);
|
|
368
|
+
/**
|
|
369
|
+
* THE scaffold candidate walker: every file under `root` once (skipping
|
|
370
|
+
* vendor/build/VCS and test dirs), with its project-relative POSIX path.
|
|
371
|
+
* `infer templates` and the scaffold doctor both read it, so the doctor's
|
|
372
|
+
* per-pattern counts equal infer's candidates by construction. Returns the
|
|
373
|
+
* number of files visited.
|
|
374
|
+
*/
|
|
375
|
+
export function walkScaffoldCandidateFiles(root, onFile) {
|
|
376
|
+
let walked = 0;
|
|
377
|
+
const visit = (dir) => {
|
|
378
|
+
let entries;
|
|
379
|
+
try {
|
|
380
|
+
entries = readdirSync(dir);
|
|
381
|
+
}
|
|
382
|
+
catch {
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
for (const e of entries) {
|
|
386
|
+
if (SCAFFOLD_WALK_SKIP.has(e))
|
|
387
|
+
continue;
|
|
388
|
+
const full = nodePath.join(dir, e);
|
|
389
|
+
let st;
|
|
390
|
+
try {
|
|
391
|
+
st = statSync(full);
|
|
392
|
+
}
|
|
393
|
+
catch {
|
|
394
|
+
continue;
|
|
395
|
+
}
|
|
396
|
+
if (st.isDirectory())
|
|
397
|
+
visit(full);
|
|
398
|
+
else if (st.isFile()) {
|
|
399
|
+
walked += 1;
|
|
400
|
+
onFile(full, nodePath.relative(root, full).split(nodePath.sep).join('/'));
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
};
|
|
404
|
+
if (existsSync(root))
|
|
405
|
+
visit(root);
|
|
406
|
+
return walked;
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Walk once and count, per pattern, the files it matches (the runtime matcher,
|
|
410
|
+
* `excludePaths` honoured) and the files each `matchPaths` glob matches on its
|
|
411
|
+
* own (`globToRegExp` — the pattern's own dialect, not the boundaries one).
|
|
412
|
+
*/
|
|
413
|
+
export function enumerateScaffoldPatternCandidates(projectRoot, patterns) {
|
|
414
|
+
// Compiled once per walk. A non-string / empty entry compiles to nothing —
|
|
415
|
+
// exactly what `matchScaffoldPattern` makes of it (`/^$/` or a throw) — and
|
|
416
|
+
// the doctor reports it as a definition error.
|
|
417
|
+
const compile = (list) => (list ?? []).map((g) => (typeof g === 'string' && g.length > 0 ? globToRegExp(g) : null));
|
|
418
|
+
const compiled = patterns.map(({ pattern }) => {
|
|
419
|
+
const units = patternUnits(pattern).units;
|
|
420
|
+
return {
|
|
421
|
+
pattern,
|
|
422
|
+
units,
|
|
423
|
+
globs: compile(units),
|
|
424
|
+
excludes: compile(pattern.excludePaths),
|
|
425
|
+
counts: units.map(() => 0),
|
|
426
|
+
files: [],
|
|
427
|
+
};
|
|
428
|
+
});
|
|
429
|
+
const firstMatch = [];
|
|
430
|
+
const walked = walkScaffoldCandidateFiles(projectRoot, (_abs, rel) => {
|
|
431
|
+
let first;
|
|
432
|
+
for (const c of compiled) {
|
|
433
|
+
let anyGlob = false;
|
|
434
|
+
c.globs.forEach((re, i) => {
|
|
435
|
+
if (re && re.test(rel)) {
|
|
436
|
+
c.counts[i] = (c.counts[i] ?? 0) + 1;
|
|
437
|
+
anyGlob = true;
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
// `matchScaffoldPattern`'s semantics: excluded first, then any glob.
|
|
441
|
+
if (anyGlob && !c.excludes.some((re) => re !== null && re.test(rel))) {
|
|
442
|
+
c.files.push(rel);
|
|
443
|
+
first ??= c.pattern.id;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
if (first)
|
|
447
|
+
firstMatch.push({ file: rel, patternId: first });
|
|
448
|
+
});
|
|
449
|
+
const byPattern = new Map();
|
|
450
|
+
for (const c of compiled) {
|
|
451
|
+
byPattern.set(c.pattern.id, {
|
|
452
|
+
patternId: c.pattern.id,
|
|
453
|
+
files: c.files,
|
|
454
|
+
perMatchPath: c.units.map((glob, i) => ({ glob, files: c.counts[i] ?? 0 })),
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
return { byPattern, firstMatch, walked };
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* THE two settles over an enumeration (round 13): every `matchPaths` glob
|
|
461
|
+
* (markable: exists = live = it matches a file), and the DERIVED pattern-level
|
|
462
|
+
* unit (does the pattern match a file after `excludePaths`; not authored, so
|
|
463
|
+
* never marked). A pattern whose every glob is intended-empty is left OUT of
|
|
464
|
+
* the pattern-level settle — its glob-level acceptance speaks for it: ONE
|
|
465
|
+
* planned fact is ONE acceptance, not the dead=2 it used to be.
|
|
466
|
+
*/
|
|
467
|
+
function scaffoldPatternLiveness(patterns, enumeration) {
|
|
468
|
+
const globObservations = [];
|
|
469
|
+
const marks = [];
|
|
470
|
+
for (const { pattern } of patterns) {
|
|
471
|
+
const list = qualifyListPath(pattern.id, MATCH_PATHS);
|
|
472
|
+
for (const g of enumeration.byPattern.get(pattern.id)?.perMatchPath ?? []) {
|
|
473
|
+
globObservations.push({
|
|
474
|
+
list,
|
|
475
|
+
unit: g.glob,
|
|
476
|
+
label: `${pattern.id}: ${g.glob}`,
|
|
477
|
+
exists: g.files > 0,
|
|
478
|
+
live: g.files > 0,
|
|
479
|
+
matched: g.files,
|
|
480
|
+
liveBecause: `matches ${g.files} file(s)`,
|
|
481
|
+
deadReason: 'matched no file',
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
marks.push(...qualifyUnitMarks(patternUnits(pattern).marks, pattern.id));
|
|
485
|
+
}
|
|
486
|
+
const globs = settleUnitLiveness({
|
|
487
|
+
subject: 'scaffold patterns',
|
|
488
|
+
unitLabel: MARKABLE_UNIT_LISTS[MarkableUnitList.ScaffoldPatternMatchPaths].unitLabel,
|
|
489
|
+
weight: UnitDeadWeight.Coverage,
|
|
490
|
+
observations: globObservations,
|
|
491
|
+
marks,
|
|
492
|
+
deadSummary: 'matched no file',
|
|
493
|
+
});
|
|
494
|
+
const patternObservations = [];
|
|
495
|
+
for (const { pattern } of patterns) {
|
|
496
|
+
const own = globs.units.filter((u) => u.list === qualifyListPath(pattern.id, MATCH_PATHS));
|
|
497
|
+
if (own.length > 0 && own.every((u) => u.state === UnitLivenessState.IntendedEmpty))
|
|
498
|
+
continue;
|
|
499
|
+
const files = enumeration.byPattern.get(pattern.id)?.files.length ?? 0;
|
|
500
|
+
patternObservations.push({
|
|
501
|
+
list: 'patterns',
|
|
502
|
+
unit: pattern.id,
|
|
503
|
+
exists: files > 0,
|
|
504
|
+
live: files > 0,
|
|
505
|
+
matched: files,
|
|
506
|
+
liveBecause: `matches ${files} file(s) after excludePaths`,
|
|
507
|
+
deadReason: 'match no file after excludePaths',
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
const settledPatterns = settleUnitLiveness({
|
|
511
|
+
subject: 'scaffold patterns',
|
|
512
|
+
unitLabel: 'patterns',
|
|
513
|
+
weight: UnitDeadWeight.Coverage,
|
|
514
|
+
observations: patternObservations,
|
|
515
|
+
marks: [],
|
|
516
|
+
deadSummary: 'match no file after excludePaths',
|
|
517
|
+
});
|
|
518
|
+
return { globs, patterns: settledPatterns };
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Per-unit coverage over an enumeration, from THE settles
|
|
522
|
+
* (`scaffoldPatternLiveness`): `matchPaths globs` (examined = globs matching a
|
|
523
|
+
* file; an intended-empty glob is its own printed acceptance) and `patterns`
|
|
524
|
+
* (examined = patterns matching a file after `excludePaths`). Empty when there
|
|
525
|
+
* are no patterns.
|
|
526
|
+
*/
|
|
527
|
+
export function scaffoldPatternCoverage(patterns, enumeration) {
|
|
528
|
+
if (patterns.length === 0)
|
|
529
|
+
return { coverage: [], deadUnits: [], liveness: [] };
|
|
530
|
+
const settled = scaffoldPatternLiveness(patterns, enumeration);
|
|
531
|
+
return {
|
|
532
|
+
coverage: [...settled.globs.coverage, ...settled.patterns.coverage],
|
|
533
|
+
deadUnits: [
|
|
534
|
+
...settled.globs.dead.map((u) => `scaffold pattern ${u.label}`),
|
|
535
|
+
...settled.patterns.dead.map((u) => `scaffold pattern ${u.unit} (no file)`),
|
|
536
|
+
],
|
|
537
|
+
liveness: [settled.globs, settled.patterns],
|
|
538
|
+
};
|
|
539
|
+
}
|
|
217
540
|
export function extractVariablesForFile(pattern, filePath, inspection) {
|
|
218
541
|
const warnings = [];
|
|
219
542
|
const values = {};
|
|
220
543
|
const base = nodePath.basename(filePath).replace(/\.(tsx?|jsx?)$/i, '');
|
|
221
544
|
const dirSegments = filePath.split(/[\\/]/).slice(0, -1);
|
|
222
545
|
const dir = dirSegments[dirSegments.length - 1] ?? '';
|
|
223
|
-
|
|
546
|
+
// THE strategy table (plugin-api `resolveScaffoldStrategy`) — the same one
|
|
547
|
+
// `isRecognizedScaffoldStrategy` reads, so "recognised" and "implemented"
|
|
548
|
+
// cannot drift apart.
|
|
549
|
+
const packageName = inspection.workspace.packageName ?? undefined;
|
|
550
|
+
for (const v of pattern.variables ?? []) {
|
|
224
551
|
const strat = String(v.from);
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
232
|
-
else if (strat === 'filename.pascal') {
|
|
233
|
-
value = base
|
|
234
|
-
.split(/[-_.]/)
|
|
235
|
-
.filter(Boolean)
|
|
236
|
-
.map((s) => s[0].toUpperCase() + s.slice(1))
|
|
237
|
-
.join('');
|
|
238
|
-
}
|
|
239
|
-
else if (strat === 'className') {
|
|
240
|
-
value = pascal(base);
|
|
241
|
-
}
|
|
242
|
-
else if (strat.startsWith('className.stripPrefix:')) {
|
|
243
|
-
const prefix = strat.slice('className.stripPrefix:'.length);
|
|
244
|
-
const pascalName = pascal(base);
|
|
245
|
-
value = pascalName.startsWith(prefix) ? pascalName.slice(prefix.length) : pascalName;
|
|
246
|
-
}
|
|
247
|
-
else if (strat === 'functionName') {
|
|
248
|
-
value = camel(base);
|
|
249
|
-
}
|
|
250
|
-
else if (strat === 'directoryName') {
|
|
251
|
-
value = dir;
|
|
252
|
-
}
|
|
253
|
-
else if (strat === 'nearestPackageName') {
|
|
254
|
-
value = inspection.workspace.packageName ?? '';
|
|
255
|
-
}
|
|
256
|
-
else {
|
|
552
|
+
const r = resolveScaffoldStrategy(strat, {
|
|
553
|
+
basename: base,
|
|
554
|
+
directory: dir,
|
|
555
|
+
...(packageName ? { packageName } : {}),
|
|
556
|
+
});
|
|
557
|
+
if (!r.recognized) {
|
|
257
558
|
warnings.push(`unrecognized extraction strategy "${strat}" for variable "${v.name}"`);
|
|
559
|
+
continue;
|
|
258
560
|
}
|
|
259
|
-
if (value)
|
|
260
|
-
values[v.name] = value;
|
|
561
|
+
if (r.value)
|
|
562
|
+
values[v.name] = r.value;
|
|
261
563
|
}
|
|
262
564
|
return { values, warnings };
|
|
263
565
|
}
|
|
264
|
-
function pascal(s) {
|
|
265
|
-
return s
|
|
266
|
-
.split(/[-_.]/)
|
|
267
|
-
.filter(Boolean)
|
|
268
|
-
.map((p) => p[0].toUpperCase() + p.slice(1))
|
|
269
|
-
.join('');
|
|
270
|
-
}
|
|
271
|
-
function camel(s) {
|
|
272
|
-
const p = pascal(s);
|
|
273
|
-
return p ? p[0].toLowerCase() + p.slice(1) : '';
|
|
274
|
-
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-inventory.d.ts","sourceRoot":"","sources":["../src/schema-inventory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,eAAO,MAAM,uBAAuB,mCAAmC,CAAC;AAExE,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,UAAU,oBAAoB;CAC/B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,sEAAsE;IACtE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IACjD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,wDAAwD;IACxD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,6CAA6C;IAC7C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,EAAE,OAAO,uBAAuB,CAAC;IAChD,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IACvD,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACjD;
|
|
1
|
+
{"version":3,"file":"schema-inventory.d.ts","sourceRoot":"","sources":["../src/schema-inventory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,eAAO,MAAM,uBAAuB,mCAAmC,CAAC;AAExE,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,UAAU,oBAAoB;CAC/B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,sEAAsE;IACtE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IACjD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,wDAAwD;IACxD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,6CAA6C;IAC7C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,EAAE,OAAO,uBAAuB,CAAC;IAChD,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IACvD,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACjD;AAsOD,wBAAgB,oBAAoB,IAAI,sBAAsB,CAQ7D;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,sBAAsB,GAAG,MAAM,CAehF;AAED,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,sBAAsB,GAAG,MAAM,CAiBpF;AAED,4DAA4D;AAC5D,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,MAAM,GAAG,qBAAqB,GAAG,IAAI,CAEjF"}
|
package/dist/schema-inventory.js
CHANGED
|
@@ -101,7 +101,7 @@ const SCHEMA_ENTRIES = [
|
|
|
101
101
|
],
|
|
102
102
|
currentVersion: 'v1',
|
|
103
103
|
summary: 'Pack manifest envelope (signed). Consumed by `shrk packs *`.',
|
|
104
|
-
emittedBy: 'shrk packs
|
|
104
|
+
emittedBy: 'shrk packs sign',
|
|
105
105
|
docs: 'docs/security.md',
|
|
106
106
|
},
|
|
107
107
|
{
|
|
@@ -192,8 +192,9 @@ const SCHEMA_ENTRIES = [
|
|
|
192
192
|
{ version: 'v1', status: SchemaStatus.Current },
|
|
193
193
|
],
|
|
194
194
|
currentVersion: 'v1',
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
// Its CLI verb was retired; the envelope is emitted by the inspector
|
|
196
|
+
// library (compliance-profiles.ts), so no command is named here.
|
|
197
|
+
summary: 'Compliance profile + check envelope (emitted by the inspector library; its CLI verb was retired).',
|
|
197
198
|
},
|
|
198
199
|
{
|
|
199
200
|
id: 'sharkcraft.review-packet',
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE search-document id codec: `<prefix>:<id>`.
|
|
3
|
+
*
|
|
4
|
+
* Every search document is keyed `<prefix>:<id>` (`knowledge:auth.login`,
|
|
5
|
+
* `rule:no-foo`, `facet:<construct>:<facet>`), and search tuning matches a
|
|
6
|
+
* boost key against that WHOLE id (`boostIds[doc.id]`). The format used to be
|
|
7
|
+
* hand-written at fourteen sites in the index builder, three in the task ranker
|
|
8
|
+
* and one in the context re-ranker, while the self-config doctor looked the
|
|
9
|
+
* whole key up in BARE-id registries. The two readings disagreed exactly: a
|
|
10
|
+
* correctly prefixed key (which fires) was reported "unknown", and a bare key
|
|
11
|
+
* (which can never fire) passed. One codec, read by every writer and every
|
|
12
|
+
* reader, so they cannot disagree again.
|
|
13
|
+
*
|
|
14
|
+
* Split on the FIRST `:` — facet ids themselves contain a `:`.
|
|
15
|
+
*/
|
|
16
|
+
import type { ReferenceKind } from './reference-registry.js';
|
|
17
|
+
import type { SearchDocumentPrefix } from './search-document-prefix.js';
|
|
18
|
+
/** Every search-document prefix, in declaration order. */
|
|
19
|
+
export declare const SEARCH_DOCUMENT_PREFIXES: readonly SearchDocumentPrefix[];
|
|
20
|
+
/** Prefix → the id registry its ids resolve against (`null` = none). */
|
|
21
|
+
export declare const SEARCH_DOCUMENT_ID_KINDS: Readonly<Record<SearchDocumentPrefix, ReferenceKind | null>>;
|
|
22
|
+
/** `searchDocumentId('knowledge', 'auth.login')` → `knowledge:auth.login`. */
|
|
23
|
+
export declare function searchDocumentId(prefix: SearchDocumentPrefix, id: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* `<prefix>:<id>` → `{ prefix, id }`, split on the FIRST `:`. `null` when the
|
|
26
|
+
* key has no `:` or either side is empty. The prefix is NOT validated — pair
|
|
27
|
+
* with {@link isSearchDocumentPrefix}.
|
|
28
|
+
*/
|
|
29
|
+
export declare function parseSearchDocumentId(key: string): {
|
|
30
|
+
readonly prefix: string;
|
|
31
|
+
readonly id: string;
|
|
32
|
+
} | null;
|
|
33
|
+
/** True when `prefix` is one `buildSearchIndex` emits. */
|
|
34
|
+
export declare function isSearchDocumentPrefix(prefix: string): prefix is SearchDocumentPrefix;
|
|
35
|
+
/** The `SearchKind` value the prefix's documents carry, or `undefined`. */
|
|
36
|
+
export declare function searchKindForPrefix(prefix: string): string | undefined;
|
|
37
|
+
/** The prefix whose documents carry `searchKind` (`construct-facet` → `facet`). */
|
|
38
|
+
export declare function searchDocumentPrefixForKind(searchKind: string): SearchDocumentPrefix | undefined;
|
|
39
|
+
/** The prefix whose ids live in `kind`'s registry (`path-convention` → `path`). */
|
|
40
|
+
export declare function searchDocumentPrefixForReferenceKind(kind: ReferenceKind): SearchDocumentPrefix | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* The registry entry a search-document id names: `knowledge:gamma.entry` →
|
|
43
|
+
* `{ referenceKind: 'knowledge', id: 'gamma.entry' }`. `undefined` when the id
|
|
44
|
+
* does not parse, its prefix is not one the index emits, or its prefix has no
|
|
45
|
+
* id registry (`doc:`, `preset:`, `facet:`, …) — such a document exists, but
|
|
46
|
+
* no registry can be asked about it.
|
|
47
|
+
*/
|
|
48
|
+
export declare function searchDocumentReference(docId: string): {
|
|
49
|
+
readonly referenceKind: ReferenceKind;
|
|
50
|
+
readonly id: string;
|
|
51
|
+
} | undefined;
|
|
52
|
+
//# sourceMappingURL=search-document-id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-document-id.d.ts","sourceRoot":"","sources":["../src/search-document-id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAiCxE,0DAA0D;AAC1D,eAAO,MAAM,wBAAwB,EAAE,SAAS,oBAAoB,EAEnE,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,aAAa,GAAG,IAAI,CAAC,CAK/F,CAAC;AAEJ,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,oBAAoB,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAEjF;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAI1G;AAED,0DAA0D;AAC1D,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,oBAAoB,CAErF;AAED,2EAA2E;AAC3E,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEtE;AAED,mFAAmF;AACnF,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAEhG;AAED,mFAAmF;AACnF,wBAAgB,oCAAoC,CAAC,IAAI,EAAE,aAAa,GAAG,oBAAoB,GAAG,SAAS,CAE1G;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,GACZ;IAAE,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAK5E"}
|