@shrkcrft/inspector 0.1.0-alpha.30 → 0.1.0-alpha.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acceptance-replay.js +1 -1
- package/dist/agent-contract-templates.js +6 -6
- package/dist/agent-contract.d.ts.map +1 -1
- package/dist/agent-contract.js +13 -8
- package/dist/agent-orchestration.js +2 -2
- package/dist/agent-task-prep.d.ts +16 -0
- package/dist/agent-task-prep.d.ts.map +1 -1
- package/dist/agent-task-prep.js +51 -4
- package/dist/ai-readiness.d.ts.map +1 -1
- package/dist/ai-readiness.js +21 -3
- package/dist/architecture-map.d.ts +16 -0
- package/dist/architecture-map.d.ts.map +1 -1
- package/dist/architecture-map.js +42 -26
- package/dist/area-explore.d.ts +2 -2
- package/dist/area-explore.d.ts.map +1 -1
- package/dist/area-explore.js +36 -16
- package/dist/area-map.d.ts +56 -11
- package/dist/area-map.d.ts.map +1 -1
- package/dist/area-map.js +106 -25
- package/dist/asset-doctor-proposed-exit.d.ts +21 -0
- package/dist/asset-doctor-proposed-exit.d.ts.map +1 -0
- package/dist/asset-doctor-proposed-exit.js +22 -0
- package/dist/asset-provenance.js +1 -1
- package/dist/boundaries-changed-only.d.ts +24 -1
- package/dist/boundaries-changed-only.d.ts.map +1 -1
- package/dist/boundaries-changed-only.js +12 -2
- package/dist/boundary-check-options.model.d.ts +40 -0
- package/dist/boundary-check-options.model.d.ts.map +1 -0
- package/dist/boundary-check-options.model.js +1 -0
- package/dist/boundary-check-result.model.d.ts +89 -0
- package/dist/boundary-check-result.model.d.ts.map +1 -0
- package/dist/boundary-check-result.model.js +1 -0
- package/dist/boundary-configuration-status.d.ts +38 -0
- package/dist/boundary-configuration-status.d.ts.map +1 -0
- package/dist/boundary-configuration-status.js +118 -0
- package/dist/boundary-configuration-status.model.d.ts +37 -0
- package/dist/boundary-configuration-status.model.d.ts.map +1 -0
- package/dist/boundary-configuration-status.model.js +1 -0
- package/dist/boundary-load-issue.model.d.ts +30 -0
- package/dist/boundary-load-issue.model.d.ts.map +1 -0
- package/dist/boundary-load-issue.model.js +1 -0
- package/dist/boundary-rule-check.model.d.ts +44 -0
- package/dist/boundary-rule-check.model.d.ts.map +1 -0
- package/dist/boundary-rule-check.model.js +1 -0
- package/dist/boundary-rule-invalidation.model.d.ts +31 -0
- package/dist/boundary-rule-invalidation.model.d.ts.map +1 -0
- package/dist/boundary-rule-invalidation.model.js +1 -0
- package/dist/boundary-rule-set-diff.model.d.ts +75 -0
- package/dist/boundary-rule-set-diff.model.d.ts.map +1 -0
- package/dist/boundary-rule-set-diff.model.js +1 -0
- package/dist/boundary-rule-sources.d.ts +28 -0
- package/dist/boundary-rule-sources.d.ts.map +1 -0
- package/dist/boundary-rule-sources.js +110 -0
- package/dist/boundary-stale-exception-finding.model.d.ts +12 -0
- package/dist/boundary-stale-exception-finding.model.d.ts.map +1 -0
- package/dist/boundary-stale-exception-finding.model.js +1 -0
- package/dist/boundary-unit-liveness.d.ts +35 -0
- package/dist/boundary-unit-liveness.d.ts.map +1 -0
- package/dist/boundary-unit-liveness.js +71 -0
- package/dist/change-intent.d.ts +3 -0
- package/dist/change-intent.d.ts.map +1 -1
- package/dist/change-intent.js +61 -27
- package/dist/changes-summary.d.ts.map +1 -1
- package/dist/changes-summary.js +19 -9
- package/dist/ci-integrity-report.js +1 -1
- package/dist/ci-predict.d.ts.map +1 -1
- package/dist/ci-predict.js +38 -5
- package/dist/code-intelligence-doctor.d.ts +6 -0
- package/dist/code-intelligence-doctor.d.ts.map +1 -1
- package/dist/code-intelligence-doctor.js +22 -7
- package/dist/command-recommender.d.ts +45 -2
- package/dist/command-recommender.d.ts.map +1 -1
- package/dist/command-recommender.js +41 -263
- package/dist/command-resolution-status.d.ts +44 -0
- package/dist/command-resolution-status.d.ts.map +1 -0
- package/dist/command-resolution-status.js +44 -0
- package/dist/command-safety-level.d.ts +15 -0
- package/dist/command-safety-level.d.ts.map +1 -0
- package/dist/command-safety-level.js +43 -0
- package/dist/command-taxonomy.js +1 -1
- package/dist/compliance-evidence.js +1 -1
- package/dist/compliance-profiles.js +1 -1
- package/dist/construct-registry.d.ts +40 -0
- package/dist/construct-registry.d.ts.map +1 -1
- package/dist/construct-registry.js +186 -82
- package/dist/context-tuning.d.ts +4 -0
- package/dist/context-tuning.d.ts.map +1 -1
- package/dist/context-tuning.js +10 -7
- package/dist/contract-template-registry.d.ts +10 -0
- package/dist/contract-template-registry.d.ts.map +1 -1
- package/dist/contract-template-registry.js +59 -33
- package/dist/contribution-kind.d.ts +52 -0
- package/dist/contribution-kind.d.ts.map +1 -0
- package/dist/contribution-kind.js +52 -0
- package/dist/contribution-load-failures.d.ts +106 -0
- package/dist/contribution-load-failures.d.ts.map +1 -0
- package/dist/contribution-load-failures.js +575 -0
- package/dist/contributions-report.d.ts +28 -0
- package/dist/contributions-report.d.ts.map +1 -0
- package/dist/contributions-report.js +242 -0
- package/dist/convention-registry.d.ts +22 -0
- package/dist/convention-registry.d.ts.map +1 -1
- package/dist/convention-registry.js +79 -39
- package/dist/coverage-report.d.ts.map +1 -1
- package/dist/coverage-report.js +6 -6
- package/dist/custom-checks.d.ts +60 -1
- package/dist/custom-checks.d.ts.map +1 -1
- package/dist/custom-checks.js +159 -6
- package/dist/dashboard/dashboard-data.d.ts +6 -0
- package/dist/dashboard/dashboard-data.d.ts.map +1 -1
- package/dist/dashboard/dashboard-data.js +99 -8
- package/dist/dashboard/dashboard-knowledge.d.ts.map +1 -1
- package/dist/dashboard/dashboard-knowledge.js +14 -2
- package/dist/decision-records.d.ts +20 -0
- package/dist/decision-records.d.ts.map +1 -1
- package/dist/decision-records.js +68 -20
- package/dist/declared-cross-references.d.ts +61 -0
- package/dist/declared-cross-references.d.ts.map +1 -0
- package/dist/declared-cross-references.js +550 -0
- package/dist/declared-gate-plane-rules.d.ts +24 -0
- package/dist/declared-gate-plane-rules.d.ts.map +1 -0
- package/dist/declared-gate-plane-rules.js +39 -0
- package/dist/declared-reference-coverage.d.ts +27 -0
- package/dist/declared-reference-coverage.d.ts.map +1 -0
- package/dist/declared-reference-coverage.js +50 -0
- package/dist/declared-xref-status.d.ts +19 -0
- package/dist/declared-xref-status.d.ts.map +1 -0
- package/dist/declared-xref-status.js +19 -0
- package/dist/delegate-pack-recipes.d.ts +13 -2
- package/dist/delegate-pack-recipes.d.ts.map +1 -1
- package/dist/delegate-pack-recipes.js +45 -14
- package/dist/demo-package.js +2 -2
- package/dist/demo-script.js +2 -2
- package/dist/demo-workflow.js +3 -3
- package/dist/dev-cycle.js +1 -1
- package/dist/dev-session.js +1 -1
- package/dist/doc-references.d.ts +23 -2
- package/dist/doc-references.d.ts.map +1 -1
- package/dist/doc-references.js +96 -17
- package/dist/doctor-result.d.ts +8 -0
- package/dist/doctor-result.d.ts.map +1 -1
- package/dist/doctor-verdict-kind.d.ts +19 -0
- package/dist/doctor-verdict-kind.d.ts.map +1 -0
- package/dist/doctor-verdict-kind.js +19 -0
- package/dist/doctor-verdict.d.ts +18 -0
- package/dist/doctor-verdict.d.ts.map +1 -0
- package/dist/doctor-verdict.js +28 -0
- package/dist/drift.d.ts +17 -0
- package/dist/drift.d.ts.map +1 -1
- package/dist/drift.js +40 -10
- package/dist/entrypoint-matrix.d.ts.map +1 -1
- package/dist/entrypoint-matrix.js +4 -1
- package/dist/feedback-ingestion.d.ts +28 -2
- package/dist/feedback-ingestion.d.ts.map +1 -1
- package/dist/feedback-ingestion.js +68 -19
- package/dist/fix-preview.d.ts.map +1 -1
- package/dist/fix-preview.js +9 -5
- package/dist/framework-extractor-outcomes.d.ts +27 -0
- package/dist/framework-extractor-outcomes.d.ts.map +1 -0
- package/dist/framework-extractor-outcomes.js +83 -0
- package/dist/fuzzy-impact.js +1 -1
- package/dist/healing-plan.d.ts.map +1 -1
- package/dist/healing-plan.js +3 -4
- package/dist/helper-catalog.d.ts +25 -0
- package/dist/helper-catalog.d.ts.map +1 -0
- package/dist/helper-catalog.js +91 -0
- package/dist/helper-registry.d.ts.map +1 -1
- package/dist/helper-registry.js +17 -1
- package/dist/helper-view.d.ts +33 -0
- package/dist/helper-view.d.ts.map +1 -0
- package/dist/helper-view.js +1 -0
- package/dist/i-asset-doctor-flags.d.ts +16 -0
- package/dist/i-asset-doctor-flags.d.ts.map +1 -0
- package/dist/i-asset-doctor-flags.js +1 -0
- package/dist/i-command-resolution.d.ts +22 -0
- package/dist/i-command-resolution.d.ts.map +1 -0
- package/dist/i-command-resolution.js +1 -0
- package/dist/i-command-resolve-options.d.ts +24 -0
- package/dist/i-command-resolve-options.d.ts.map +1 -0
- package/dist/i-command-resolve-options.js +1 -0
- package/dist/i-command-safety.d.ts +13 -0
- package/dist/i-command-safety.d.ts.map +1 -0
- package/dist/i-command-safety.js +1 -0
- package/dist/i-contribution-accepted-entry.d.ts +18 -0
- package/dist/i-contribution-accepted-entry.d.ts.map +1 -0
- package/dist/i-contribution-accepted-entry.js +1 -0
- package/dist/i-contribution-entry-rejection.d.ts +21 -0
- package/dist/i-contribution-entry-rejection.d.ts.map +1 -0
- package/dist/i-contribution-entry-rejection.js +1 -0
- package/dist/i-contribution-file-issue.d.ts +18 -0
- package/dist/i-contribution-file-issue.d.ts.map +1 -0
- package/dist/i-contribution-file-issue.js +1 -0
- package/dist/i-contribution-file-report.d.ts +40 -0
- package/dist/i-contribution-file-report.d.ts.map +1 -0
- package/dist/i-contribution-file-report.js +1 -0
- package/dist/i-contribution-file-validation.d.ts +24 -0
- package/dist/i-contribution-file-validation.d.ts.map +1 -0
- package/dist/i-contribution-file-validation.js +1 -0
- package/dist/i-contributions-report.d.ts +31 -0
- package/dist/i-contributions-report.d.ts.map +1 -0
- package/dist/i-contributions-report.js +1 -0
- package/dist/i-declared-xref-field.d.ts +25 -0
- package/dist/i-declared-xref-field.d.ts.map +1 -0
- package/dist/i-declared-xref-field.js +1 -0
- package/dist/i-declared-xref-issue.d.ts +25 -0
- package/dist/i-declared-xref-issue.d.ts.map +1 -0
- package/dist/i-declared-xref-issue.js +1 -0
- package/dist/i-declared-xref-report.d.ts +48 -0
- package/dist/i-declared-xref-report.d.ts.map +1 -0
- package/dist/i-declared-xref-report.js +1 -0
- package/dist/i-declared-xref-row.d.ts +29 -0
- package/dist/i-declared-xref-row.d.ts.map +1 -0
- package/dist/i-declared-xref-row.js +1 -0
- package/dist/i-doctor-verdict.d.ts +10 -0
- package/dist/i-doctor-verdict.d.ts.map +1 -0
- package/dist/i-doctor-verdict.js +1 -0
- package/dist/i-kind-outcomes.d.ts +13 -0
- package/dist/i-kind-outcomes.d.ts.map +1 -0
- package/dist/i-kind-outcomes.js +1 -0
- package/dist/i-pack-doctor-verdict.d.ts +15 -0
- package/dist/i-pack-doctor-verdict.d.ts.map +1 -0
- package/dist/i-pack-doctor-verdict.js +1 -0
- package/dist/i-probed-id-field.d.ts +17 -0
- package/dist/i-probed-id-field.d.ts.map +1 -0
- package/dist/i-probed-id-field.js +1 -0
- package/dist/i-reference-kind-declaration.d.ts +38 -0
- package/dist/i-reference-kind-declaration.d.ts.map +1 -0
- package/dist/i-reference-kind-declaration.js +1 -0
- package/dist/i-reference-warm-options.d.ts +21 -0
- package/dist/i-reference-warm-options.d.ts.map +1 -0
- package/dist/i-reference-warm-options.js +1 -0
- package/dist/i-registry-outcomes.d.ts +16 -0
- package/dist/i-registry-outcomes.d.ts.map +1 -0
- package/dist/i-registry-outcomes.js +1 -0
- package/dist/i-scaffold-pattern-doctor-report.d.ts +35 -0
- package/dist/i-scaffold-pattern-doctor-report.d.ts.map +1 -0
- package/dist/i-scaffold-pattern-doctor-report.js +1 -0
- package/dist/i-search-tuning-key-probe.d.ts +30 -0
- package/dist/i-search-tuning-key-probe.d.ts.map +1 -0
- package/dist/i-search-tuning-key-probe.js +1 -0
- package/dist/i-search-tuning-lint-issue.d.ts +61 -0
- package/dist/i-search-tuning-lint-issue.d.ts.map +1 -0
- package/dist/i-search-tuning-lint-issue.js +1 -0
- package/dist/i-search-tuning-lint-report.d.ts +38 -0
- package/dist/i-search-tuning-lint-report.d.ts.map +1 -0
- package/dist/i-search-tuning-lint-report.js +1 -0
- package/dist/i-unresolvable-reference-scan.d.ts +14 -0
- package/dist/i-unresolvable-reference-scan.d.ts.map +1 -0
- package/dist/i-unresolvable-reference-scan.js +1 -0
- package/dist/i-unresolvable-reference.d.ts +29 -0
- package/dist/i-unresolvable-reference.d.ts.map +1 -0
- package/dist/i-unresolvable-reference.js +1 -0
- package/dist/i-workspace-profile-payload.d.ts +12 -0
- package/dist/i-workspace-profile-payload.d.ts.map +1 -0
- package/dist/i-workspace-profile-payload.js +1 -0
- package/dist/impact-analysis.d.ts +15 -0
- package/dist/impact-analysis.d.ts.map +1 -1
- package/dist/impact-analysis.js +58 -13
- package/dist/impact-render.d.ts.map +1 -1
- package/dist/impact-render.js +22 -0
- package/dist/import-hygiene.d.ts +35 -1
- package/dist/import-hygiene.d.ts.map +1 -1
- package/dist/import-hygiene.js +107 -13
- package/dist/index.d.ts +141 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +172 -0
- package/dist/inspection-discovery.d.ts +45 -0
- package/dist/inspection-discovery.d.ts.map +1 -0
- package/dist/inspection-discovery.js +70 -0
- package/dist/knowledge-advisory-code.d.ts +17 -0
- package/dist/knowledge-advisory-code.d.ts.map +1 -0
- package/dist/knowledge-advisory-code.js +17 -0
- package/dist/knowledge-aged-entry.d.ts +10 -0
- package/dist/knowledge-aged-entry.d.ts.map +1 -0
- package/dist/knowledge-aged-entry.js +1 -0
- package/dist/knowledge-authoring.d.ts +24 -1
- package/dist/knowledge-authoring.d.ts.map +1 -1
- package/dist/knowledge-authoring.js +46 -7
- package/dist/knowledge-entry-verdict-record.d.ts +22 -0
- package/dist/knowledge-entry-verdict-record.d.ts.map +1 -0
- package/dist/knowledge-entry-verdict-record.js +1 -0
- package/dist/knowledge-entry-verdict.d.ts +17 -0
- package/dist/knowledge-entry-verdict.d.ts.map +1 -0
- package/dist/knowledge-entry-verdict.js +17 -0
- package/dist/knowledge-graph.d.ts +6 -0
- package/dist/knowledge-graph.d.ts.map +1 -1
- package/dist/knowledge-graph.js +18 -7
- package/dist/knowledge-kind-bucket.d.ts +19 -0
- package/dist/knowledge-kind-bucket.d.ts.map +1 -0
- package/dist/knowledge-kind-bucket.js +1 -0
- package/dist/knowledge-load-failure.d.ts +23 -0
- package/dist/knowledge-load-failure.d.ts.map +1 -0
- package/dist/knowledge-load-failure.js +1 -0
- package/dist/knowledge-reference-kind-bucket.d.ts +11 -0
- package/dist/knowledge-reference-kind-bucket.d.ts.map +1 -0
- package/dist/knowledge-reference-kind-bucket.js +1 -0
- package/dist/knowledge-stale-advisory.d.ts +14 -0
- package/dist/knowledge-stale-advisory.d.ts.map +1 -0
- package/dist/knowledge-stale-advisory.js +1 -0
- package/dist/knowledge-stale-coverage.d.ts +19 -0
- package/dist/knowledge-stale-coverage.d.ts.map +1 -0
- package/dist/knowledge-stale-coverage.js +1 -0
- package/dist/knowledge-stale-gate-flags.d.ts +33 -0
- package/dist/knowledge-stale-gate-flags.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-flags.js +1 -0
- package/dist/knowledge-stale-gate-input.d.ts +46 -0
- package/dist/knowledge-stale-gate-input.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-input.js +1 -0
- package/dist/knowledge-stale-gate-result.d.ts +33 -0
- package/dist/knowledge-stale-gate-result.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-result.js +1 -0
- package/dist/knowledge-stale-gate-rule.d.ts +33 -0
- package/dist/knowledge-stale-gate-rule.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-rule.js +1 -0
- package/dist/knowledge-stale-gate-violation.d.ts +13 -0
- package/dist/knowledge-stale-gate-violation.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-violation.js +1 -0
- package/dist/knowledge-stale-gate.d.ts +83 -0
- package/dist/knowledge-stale-gate.d.ts.map +1 -0
- package/dist/knowledge-stale-gate.js +429 -0
- package/dist/knowledge-stale-quality-gate.d.ts +26 -0
- package/dist/knowledge-stale-quality-gate.d.ts.map +1 -0
- package/dist/knowledge-stale-quality-gate.js +110 -0
- package/dist/knowledge-stale.d.ts +122 -9
- package/dist/knowledge-stale.d.ts.map +1 -1
- package/dist/knowledge-stale.js +996 -291
- package/dist/knowledge-unverifiable-reason.d.ts +12 -0
- package/dist/knowledge-unverifiable-reason.d.ts.map +1 -0
- package/dist/knowledge-unverifiable-reason.js +12 -0
- package/dist/loader-diagnostics.d.ts +14 -2
- package/dist/loader-diagnostics.d.ts.map +1 -1
- package/dist/match-terms.d.ts +48 -0
- package/dist/match-terms.d.ts.map +1 -0
- package/dist/match-terms.js +155 -0
- package/dist/migration-profile-registry.d.ts +10 -0
- package/dist/migration-profile-registry.d.ts.map +1 -1
- package/dist/migration-profile-registry.js +57 -34
- package/dist/migration-readiness.d.ts.map +1 -1
- package/dist/migration-readiness.js +1 -3
- package/dist/nearest-id.d.ts +10 -26
- package/dist/nearest-id.d.ts.map +1 -1
- package/dist/nearest-id.js +9 -59
- package/dist/pack-asset-freshness.d.ts +65 -0
- package/dist/pack-asset-freshness.d.ts.map +1 -0
- package/dist/pack-asset-freshness.js +340 -0
- package/dist/pack-author-ux.d.ts +24 -3
- package/dist/pack-author-ux.d.ts.map +1 -1
- package/dist/pack-author-ux.js +87 -93
- package/dist/pack-contributions-inventory.d.ts +79 -39
- package/dist/pack-contributions-inventory.d.ts.map +1 -1
- package/dist/pack-contributions-inventory.js +443 -286
- package/dist/pack-doctor-verdict.d.ts +29 -0
- package/dist/pack-doctor-verdict.d.ts.map +1 -0
- package/dist/pack-doctor-verdict.js +45 -0
- package/dist/pack-doctor.d.ts +74 -1
- package/dist/pack-doctor.d.ts.map +1 -1
- package/dist/pack-doctor.js +281 -1
- package/dist/pack-helper-plan.d.ts +24 -0
- package/dist/pack-helper-plan.d.ts.map +1 -0
- package/dist/pack-helper-plan.js +77 -0
- package/dist/pack-helper-registry.d.ts +14 -0
- package/dist/pack-helper-registry.d.ts.map +1 -1
- package/dist/pack-helper-registry.js +76 -37
- package/dist/pack-manifest-reader.d.ts +8 -0
- package/dist/pack-manifest-reader.d.ts.map +1 -0
- package/dist/pack-manifest-reader.js +79 -0
- package/dist/pack-release-check.d.ts +14 -1
- package/dist/pack-release-check.d.ts.map +1 -1
- package/dist/pack-release-check.js +23 -1
- package/dist/pack-signature-status.d.ts +18 -6
- package/dist/pack-signature-status.d.ts.map +1 -1
- package/dist/pack-signature-status.js +59 -105
- package/dist/pack-test-runner.d.ts +27 -5
- package/dist/pack-test-runner.d.ts.map +1 -1
- package/dist/pack-test-runner.js +91 -35
- package/dist/pack-typecheck.d.ts +8 -0
- package/dist/pack-typecheck.d.ts.map +1 -0
- package/dist/pack-typecheck.js +76 -0
- package/dist/plan-review.d.ts +2 -0
- package/dist/plan-review.d.ts.map +1 -1
- package/dist/plan-review.js +17 -5
- package/dist/plan-simulation.d.ts.map +1 -1
- package/dist/plan-simulation.js +16 -5
- package/dist/playbook-load-issue.d.ts +16 -0
- package/dist/playbook-load-issue.d.ts.map +1 -0
- package/dist/playbook-load-issue.js +1 -0
- package/dist/playbook-registry.d.ts +32 -1
- package/dist/playbook-registry.d.ts.map +1 -1
- package/dist/playbook-registry.js +144 -55
- package/dist/policy-declaration.d.ts +18 -0
- package/dist/policy-declaration.d.ts.map +1 -0
- package/dist/policy-declaration.js +1 -0
- package/dist/policy-engine.d.ts +8 -0
- package/dist/policy-engine.d.ts.map +1 -1
- package/dist/policy-engine.js +26 -9
- package/dist/policy-overrides.d.ts.map +1 -1
- package/dist/policy-overrides.js +4 -4
- package/dist/policy-registry.d.ts +27 -0
- package/dist/policy-registry.d.ts.map +1 -1
- package/dist/policy-registry.js +87 -20
- package/dist/probed-id-fields.d.ts +21 -0
- package/dist/probed-id-fields.d.ts.map +1 -0
- package/dist/probed-id-fields.js +25 -0
- package/dist/probed-id-source.d.ts +11 -0
- package/dist/probed-id-source.d.ts.map +1 -0
- package/dist/probed-id-source.js +11 -0
- package/dist/profile-registry.d.ts +25 -2
- package/dist/profile-registry.d.ts.map +1 -1
- package/dist/profile-registry.js +59 -6
- package/dist/quality-gate-examination.d.ts +15 -0
- package/dist/quality-gate-examination.d.ts.map +1 -0
- package/dist/quality-gate-examination.js +15 -0
- package/dist/quality-gate-row-status.d.ts +19 -0
- package/dist/quality-gate-row-status.d.ts.map +1 -0
- package/dist/quality-gate-row-status.js +28 -0
- package/dist/quality-gate-status.d.ts +16 -0
- package/dist/quality-gate-status.d.ts.map +1 -0
- package/dist/quality-gate-status.js +16 -0
- package/dist/quality-html.d.ts.map +1 -1
- package/dist/quality-html.js +14 -3
- package/dist/quality-report-coverage.d.ts +26 -0
- package/dist/quality-report-coverage.d.ts.map +1 -0
- package/dist/quality-report-coverage.js +48 -0
- package/dist/quality-report.d.ts +28 -1
- package/dist/quality-report.d.ts.map +1 -1
- package/dist/quality-report.js +263 -35
- package/dist/query-intent-kind.d.ts +18 -0
- package/dist/query-intent-kind.d.ts.map +1 -0
- package/dist/query-intent-kind.js +18 -0
- package/dist/query-intent-result.d.ts +23 -0
- package/dist/query-intent-result.d.ts.map +1 -0
- package/dist/query-intent-result.js +1 -0
- package/dist/query-intent.d.ts +18 -0
- package/dist/query-intent.d.ts.map +1 -0
- package/dist/query-intent.js +336 -0
- package/dist/query-resolver.d.ts +18 -0
- package/dist/query-resolver.d.ts.map +1 -1
- package/dist/query-resolver.js +7 -4
- package/dist/ranked-recommendations.d.ts +36 -0
- package/dist/ranked-recommendations.d.ts.map +1 -0
- package/dist/ranked-recommendations.js +1 -0
- package/dist/ranker-explainability.d.ts.map +1 -1
- package/dist/ranker-explainability.js +38 -10
- package/dist/recommend-recipe.d.ts +17 -0
- package/dist/recommend-recipe.d.ts.map +1 -0
- package/dist/recommend-recipe.js +1 -0
- package/dist/recommend-recipes.d.ts +9 -0
- package/dist/recommend-recipes.d.ts.map +1 -0
- package/dist/recommend-recipes.js +106 -0
- package/dist/recommendation-candidate.d.ts +30 -0
- package/dist/recommendation-candidate.d.ts.map +1 -0
- package/dist/recommendation-candidate.js +1 -0
- package/dist/recommendation-confidence.d.ts +27 -0
- package/dist/recommendation-confidence.d.ts.map +1 -0
- package/dist/recommendation-confidence.js +1 -0
- package/dist/recommendation-ranking-options.d.ts +24 -0
- package/dist/recommendation-ranking-options.d.ts.map +1 -0
- package/dist/recommendation-ranking-options.js +1 -0
- package/dist/recommendation-ranking.d.ts +50 -0
- package/dist/recommendation-ranking.d.ts.map +1 -0
- package/dist/recommendation-ranking.js +527 -0
- package/dist/recommendation-source.d.ts +23 -0
- package/dist/recommendation-source.d.ts.map +1 -0
- package/dist/recommendation-source.js +23 -0
- package/dist/recommendation-suppression.d.ts +14 -0
- package/dist/recommendation-suppression.d.ts.map +1 -0
- package/dist/recommendation-suppression.js +14 -0
- package/dist/reference-asset-kind.d.ts +14 -0
- package/dist/reference-asset-kind.d.ts.map +1 -0
- package/dist/reference-asset-kind.js +14 -0
- package/dist/reference-content-check.d.ts +32 -0
- package/dist/reference-content-check.d.ts.map +1 -0
- package/dist/reference-content-check.js +143 -0
- package/dist/reference-failure.d.ts +31 -0
- package/dist/reference-failure.d.ts.map +1 -0
- package/dist/reference-failure.js +31 -0
- package/dist/reference-id-status.d.ts +15 -0
- package/dist/reference-id-status.d.ts.map +1 -0
- package/dist/reference-id-status.js +15 -0
- package/dist/reference-kind-declarations.d.ts +42 -0
- package/dist/reference-kind-declarations.d.ts.map +1 -0
- package/dist/reference-kind-declarations.js +142 -0
- package/dist/reference-lookup.d.ts +6 -0
- package/dist/reference-lookup.d.ts.map +1 -1
- package/dist/reference-lookup.js +13 -5
- package/dist/reference-registry.d.ts +109 -11
- package/dist/reference-registry.d.ts.map +1 -1
- package/dist/reference-registry.js +186 -30
- package/dist/reference-subject.d.ts +20 -0
- package/dist/reference-subject.d.ts.map +1 -0
- package/dist/reference-subject.js +1 -0
- package/dist/registration-hint-discovery-status.d.ts +25 -0
- package/dist/registration-hint-discovery-status.d.ts.map +1 -0
- package/dist/registration-hint-discovery-status.js +25 -0
- package/dist/registration-hint-registry.d.ts +80 -0
- package/dist/registration-hint-registry.d.ts.map +1 -1
- package/dist/registration-hint-registry.js +356 -138
- package/dist/registry-lifecycle.d.ts +200 -19
- package/dist/registry-lifecycle.d.ts.map +1 -1
- package/dist/registry-lifecycle.js +526 -136
- package/dist/release-readiness.d.ts.map +1 -1
- package/dist/release-readiness.js +10 -7
- package/dist/release-smoke.d.ts.map +1 -1
- package/dist/release-smoke.js +11 -7
- package/dist/report-site.d.ts.map +1 -1
- package/dist/report-site.js +25 -7
- package/dist/repository-intelligence.d.ts.map +1 -1
- package/dist/repository-intelligence.js +3 -2
- package/dist/repository-knowledge-model.d.ts.map +1 -1
- package/dist/repository-knowledge-model.js +18 -5
- package/dist/resolve-project-config.d.ts +64 -0
- package/dist/resolve-project-config.d.ts.map +1 -1
- package/dist/resolve-project-config.js +240 -32
- package/dist/reuse/compute-reuse-coverage.d.ts +29 -0
- package/dist/reuse/compute-reuse-coverage.d.ts.map +1 -0
- package/dist/reuse/compute-reuse-coverage.js +198 -0
- package/dist/reuse/rank-reuse-candidates.d.ts +38 -0
- package/dist/reuse/rank-reuse-candidates.d.ts.map +1 -0
- package/dist/reuse/rank-reuse-candidates.js +212 -0
- package/dist/reuse/rank-reuse-options.d.ts +20 -0
- package/dist/reuse/rank-reuse-options.d.ts.map +1 -0
- package/dist/reuse/rank-reuse-options.js +1 -0
- package/dist/reuse/rank-reuse-suggestions.d.ts +15 -0
- package/dist/reuse/rank-reuse-suggestions.d.ts.map +1 -0
- package/dist/reuse/rank-reuse-suggestions.js +31 -0
- package/dist/reuse/resolve-curated-reuse.d.ts +43 -0
- package/dist/reuse/resolve-curated-reuse.d.ts.map +1 -0
- package/dist/reuse/resolve-curated-reuse.js +115 -0
- package/dist/reuse/reuse-candidate.d.ts +29 -0
- package/dist/reuse/reuse-candidate.d.ts.map +1 -0
- package/dist/reuse/reuse-candidate.js +1 -0
- package/dist/reuse/reuse-coverage-report.d.ts +74 -0
- package/dist/reuse/reuse-coverage-report.d.ts.map +1 -0
- package/dist/reuse/reuse-coverage-report.js +1 -0
- package/dist/reuse/reuse-curated-coverage.d.ts +36 -0
- package/dist/reuse/reuse-curated-coverage.d.ts.map +1 -0
- package/dist/reuse/reuse-curated-coverage.js +1 -0
- package/dist/reuse/reuse-curated-resolution.d.ts +36 -0
- package/dist/reuse/reuse-curated-resolution.d.ts.map +1 -0
- package/dist/reuse/reuse-curated-resolution.js +1 -0
- package/dist/reuse/reuse-curated-status.d.ts +21 -0
- package/dist/reuse/reuse-curated-status.d.ts.map +1 -0
- package/dist/reuse/reuse-curated-status.js +21 -0
- package/dist/reuse/reuse-match-detail.d.ts +15 -0
- package/dist/reuse/reuse-match-detail.d.ts.map +1 -0
- package/dist/reuse/reuse-match-detail.js +1 -0
- package/dist/reuse/reuse-ranking.d.ts +37 -0
- package/dist/reuse/reuse-ranking.d.ts.map +1 -0
- package/dist/reuse/reuse-ranking.js +1 -0
- package/dist/reuse/reuse-suggestion.d.ts +19 -0
- package/dist/reuse/reuse-suggestion.d.ts.map +1 -0
- package/dist/reuse/reuse-suggestion.js +1 -0
- package/dist/reuse/reuse-symbol-lookup.d.ts +28 -0
- package/dist/reuse/reuse-symbol-lookup.d.ts.map +1 -0
- package/dist/reuse/reuse-symbol-lookup.js +1 -0
- package/dist/reuse/reuse-tokenize.d.ts +11 -0
- package/dist/reuse/reuse-tokenize.d.ts.map +1 -0
- package/dist/reuse/reuse-tokenize.js +26 -0
- package/dist/reuse/score-reuse-name.d.ts +16 -0
- package/dist/reuse/score-reuse-name.d.ts.map +1 -0
- package/dist/reuse/score-reuse-name.js +35 -0
- package/dist/reuse/score-reuse-primitive.d.ts +33 -0
- package/dist/reuse/score-reuse-primitive.d.ts.map +1 -0
- package/dist/reuse/score-reuse-primitive.js +92 -0
- package/dist/review-packet.d.ts +2 -0
- package/dist/review-packet.d.ts.map +1 -1
- package/dist/review-packet.js +13 -6
- package/dist/role-views.d.ts.map +1 -1
- package/dist/role-views.js +16 -16
- package/dist/routing-recommends-channels.d.ts +24 -0
- package/dist/routing-recommends-channels.d.ts.map +1 -0
- package/dist/routing-recommends-channels.js +19 -0
- package/dist/run-boundary-check.d.ts +118 -0
- package/dist/run-boundary-check.d.ts.map +1 -0
- package/dist/run-boundary-check.js +592 -0
- package/dist/safety-audit.js +1 -1
- package/dist/scaffold-coverage.js +1 -1
- package/dist/scaffold-pattern-doctor-report.d.ts +19 -0
- package/dist/scaffold-pattern-doctor-report.d.ts.map +1 -0
- package/dist/scaffold-pattern-doctor-report.js +54 -0
- package/dist/scaffold-patterns.d.ts +75 -1
- package/dist/scaffold-patterns.d.ts.map +1 -1
- package/dist/scaffold-patterns.js +375 -84
- package/dist/schema-inventory.d.ts.map +1 -1
- package/dist/schema-inventory.js +4 -3
- package/dist/search-document-id.d.ts +52 -0
- package/dist/search-document-id.d.ts.map +1 -0
- package/dist/search-document-id.js +72 -0
- package/dist/search-document-prefix.d.ts +7 -0
- package/dist/search-document-prefix.d.ts.map +1 -0
- package/dist/search-document-prefix.js +1 -0
- package/dist/search-index.d.ts.map +1 -1
- package/dist/search-index.js +20 -23
- package/dist/search-tuning-explain.d.ts +6 -0
- package/dist/search-tuning-explain.d.ts.map +1 -1
- package/dist/search-tuning-explain.js +19 -17
- package/dist/search-tuning-key-probes.d.ts +16 -0
- package/dist/search-tuning-key-probes.d.ts.map +1 -0
- package/dist/search-tuning-key-probes.js +65 -0
- package/dist/search-tuning-key-resolution.d.ts +25 -0
- package/dist/search-tuning-key-resolution.d.ts.map +1 -0
- package/dist/search-tuning-key-resolution.js +1 -0
- package/dist/search-tuning-key-resolver.d.ts +4 -0
- package/dist/search-tuning-key-resolver.d.ts.map +1 -0
- package/dist/search-tuning-key-resolver.js +107 -0
- package/dist/search-tuning-key-status.d.ts +24 -0
- package/dist/search-tuning-key-status.d.ts.map +1 -0
- package/dist/search-tuning-key-status.js +24 -0
- package/dist/search-tuning-lint.d.ts +9 -0
- package/dist/search-tuning-lint.d.ts.map +1 -0
- package/dist/search-tuning-lint.js +468 -0
- package/dist/search-tuning-registry.d.ts +43 -0
- package/dist/search-tuning-registry.d.ts.map +1 -1
- package/dist/search-tuning-registry.js +214 -49
- package/dist/self-audit.d.ts +12 -0
- package/dist/self-audit.d.ts.map +1 -1
- package/dist/self-audit.js +36 -10
- package/dist/self-config-doctor-v2.d.ts +145 -3
- package/dist/self-config-doctor-v2.d.ts.map +1 -1
- package/dist/self-config-doctor-v2.js +1304 -181
- package/dist/self-config-doctor.d.ts +20 -1
- package/dist/self-config-doctor.d.ts.map +1 -1
- package/dist/self-config-doctor.js +53 -280
- package/dist/settled-unit-states.d.ts +9 -0
- package/dist/settled-unit-states.d.ts.map +1 -0
- package/dist/settled-unit-states.js +14 -0
- package/dist/sharkcraft-inspector.d.ts +34 -0
- package/dist/sharkcraft-inspector.d.ts.map +1 -1
- package/dist/sharkcraft-inspector.js +273 -26
- package/dist/spec/spec-evidence.d.ts.map +1 -1
- package/dist/spec/spec-evidence.js +14 -20
- package/dist/split-identifier.d.ts +21 -0
- package/dist/split-identifier.d.ts.map +1 -0
- package/dist/split-identifier.js +27 -0
- package/dist/start-here.d.ts.map +1 -1
- package/dist/start-here.js +1 -2
- package/dist/substitute-placeholders.d.ts +8 -0
- package/dist/substitute-placeholders.d.ts.map +1 -0
- package/dist/substitute-placeholders.js +9 -0
- package/dist/symbol-index.d.ts +33 -0
- package/dist/symbol-index.d.ts.map +1 -1
- package/dist/symbol-index.js +241 -3
- package/dist/symbol-member-entry.d.ts +26 -0
- package/dist/symbol-member-entry.d.ts.map +1 -0
- package/dist/symbol-member-entry.js +1 -0
- package/dist/symbol-member-kind.d.ts +14 -0
- package/dist/symbol-member-kind.d.ts.map +1 -0
- package/dist/symbol-member-kind.js +14 -0
- package/dist/task-packet.d.ts.map +1 -1
- package/dist/task-packet.js +52 -9
- package/dist/task-ranker.d.ts +8 -0
- package/dist/task-ranker.d.ts.map +1 -1
- package/dist/task-ranker.js +25 -13
- package/dist/task-risk.js +1 -1
- package/dist/task-routing-hint-registry.d.ts +20 -1
- package/dist/task-routing-hint-registry.d.ts.map +1 -1
- package/dist/task-routing-hint-registry.js +186 -42
- package/dist/template-drift.d.ts.map +1 -1
- package/dist/template-drift.js +30 -9
- package/dist/template-lint.d.ts.map +1 -1
- package/dist/template-lint.js +160 -2
- package/dist/term-query.d.ts +10 -0
- package/dist/term-query.d.ts.map +1 -0
- package/dist/term-query.js +1 -0
- package/dist/test-definitions.d.ts +6 -3
- package/dist/test-definitions.d.ts.map +1 -1
- package/dist/test-runner.d.ts +95 -10
- package/dist/test-runner.d.ts.map +1 -1
- package/dist/test-runner.js +309 -308
- package/dist/tuning-query-tokens.d.ts +29 -0
- package/dist/tuning-query-tokens.d.ts.map +1 -0
- package/dist/tuning-query-tokens.js +51 -0
- package/dist/typecheck-files.d.ts +36 -0
- package/dist/typecheck-files.d.ts.map +1 -0
- package/dist/typecheck-files.js +158 -0
- package/dist/uncertainty.js +1 -1
- package/dist/universal-search.d.ts.map +1 -1
- package/dist/universal-search.js +5 -3
- package/dist/unregistered-exports.d.ts +19 -0
- package/dist/unregistered-exports.d.ts.map +1 -0
- package/dist/unregistered-exports.js +141 -0
- package/dist/unresolvable-reason.d.ts +11 -0
- package/dist/unresolvable-reason.d.ts.map +1 -0
- package/dist/unresolvable-reason.js +11 -0
- package/dist/upgrade-advisor.d.ts.map +1 -1
- package/dist/upgrade-advisor.js +16 -9
- package/dist/validate-contribution-file.d.ts +4 -0
- package/dist/validate-contribution-file.d.ts.map +1 -0
- package/dist/validate-contribution-file.js +228 -0
- package/dist/why-file.d.ts +3 -0
- package/dist/why-file.d.ts.map +1 -1
- package/dist/why-file.js +7 -3
- package/package.json +17 -17
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type IAssetReference } from '@shrkcrft/core';
|
|
2
|
+
import { ReferenceFailure } from './reference-failure.js';
|
|
3
|
+
/** The outcome of one content or count assertion. */
|
|
4
|
+
export interface IReferenceAssertionResult {
|
|
5
|
+
readonly ok: boolean;
|
|
6
|
+
/** True when the assertion could not be evaluated at all — nothing was proved. */
|
|
7
|
+
readonly unverifiable?: boolean;
|
|
8
|
+
readonly failure?: ReferenceFailure;
|
|
9
|
+
readonly expected?: string | number;
|
|
10
|
+
readonly actual?: string | number;
|
|
11
|
+
readonly message: string;
|
|
12
|
+
}
|
|
13
|
+
/** Whether `ref` carries a `contains` / `matches` assertion. */
|
|
14
|
+
export declare function hasContentAssertion(ref: IAssetReference): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Check `ref.contains` / `ref.matches` against its target. `span` narrows the
|
|
17
|
+
* read to a pinned symbol's declaration. Returns `null` when the reference
|
|
18
|
+
* carries no content assertion.
|
|
19
|
+
*/
|
|
20
|
+
export declare function checkReferenceContent(projectRoot: string, ref: IAssetReference, span?: {
|
|
21
|
+
start: number;
|
|
22
|
+
end: number;
|
|
23
|
+
}): IReferenceAssertionResult | null;
|
|
24
|
+
/**
|
|
25
|
+
* Re-derive `ref.count` through the extraction authority and compare it to the
|
|
26
|
+
* claimed number. Returns `null` when the reference declares no count.
|
|
27
|
+
*
|
|
28
|
+
* A source that matched 0 files never measured anything, so it is unverifiable
|
|
29
|
+
* — never a pass, even for `expected: 0`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function checkReferenceCount(projectRoot: string, ref: IAssetReference, excludeDirs?: readonly string[]): IReferenceAssertionResult | null;
|
|
32
|
+
//# sourceMappingURL=reference-content-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference-content-check.d.ts","sourceRoot":"","sources":["../src/reference-content-check.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAwB,KAAK,eAAe,EAAsB,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,qDAAqD;AACrD,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,kFAAkF;IAClF,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAaD,gEAAgE;AAChE,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAEjE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,eAAe,EACpB,IAAI,CAAC,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACpC,yBAAyB,GAAG,IAAI,CAoDlC;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,eAAe,EACpB,WAAW,GAAE,SAAS,MAAM,EAAO,GAClC,yBAAyB,GAAG,IAAI,CAqClC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content assertions on a declared reference: `contains` / `matches` (read the
|
|
3
|
+
* target's text) and `count` (re-derive a number the asset claims).
|
|
4
|
+
*
|
|
5
|
+
* Existence is the weakest proxy for what an asset claims — a file survives a
|
|
6
|
+
* rename-inside refactor untouched while every statement about its contents
|
|
7
|
+
* goes false. These turn prose claims into checks WITHOUT a new parser:
|
|
8
|
+
*
|
|
9
|
+
* - `contains` / `matches` read the file (or the pinned symbol's declaration
|
|
10
|
+
* span), zoned through the ONE lexical-zone authority (`blankOutsideZone`),
|
|
11
|
+
* so `scan: 'code'` means here exactly what it means on the policy plane;
|
|
12
|
+
* - `count` is measured by the ONE extraction authority (`inspectSource`), so
|
|
13
|
+
* it gets every extractor, glob and zone the gate planes have.
|
|
14
|
+
*
|
|
15
|
+
* Every result reports what was found beside what was expected, so the fix is a
|
|
16
|
+
* one-token edit.
|
|
17
|
+
*/
|
|
18
|
+
import { readFileSync, statSync } from 'node:fs';
|
|
19
|
+
import * as nodePath from 'node:path';
|
|
20
|
+
import { blankOutsideZone, inspectSource } from '@shrkcrft/boundaries';
|
|
21
|
+
import { validateWiringSource } from '@shrkcrft/core';
|
|
22
|
+
import { ReferenceFailure } from "./reference-failure.js";
|
|
23
|
+
const SHOWN_LITERAL = 60;
|
|
24
|
+
function shown(s) {
|
|
25
|
+
const one = s.replace(/\s+/g, ' ');
|
|
26
|
+
return one.length > SHOWN_LITERAL ? `${one.slice(0, SHOWN_LITERAL)}…` : one;
|
|
27
|
+
}
|
|
28
|
+
function unverifiable(message) {
|
|
29
|
+
return { ok: false, unverifiable: true, failure: ReferenceFailure.Unverifiable, message };
|
|
30
|
+
}
|
|
31
|
+
/** Whether `ref` carries a `contains` / `matches` assertion. */
|
|
32
|
+
export function hasContentAssertion(ref) {
|
|
33
|
+
return ref.contains !== undefined || ref.matches !== undefined;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Check `ref.contains` / `ref.matches` against its target. `span` narrows the
|
|
37
|
+
* read to a pinned symbol's declaration. Returns `null` when the reference
|
|
38
|
+
* carries no content assertion.
|
|
39
|
+
*/
|
|
40
|
+
export function checkReferenceContent(projectRoot, ref, span) {
|
|
41
|
+
if (!hasContentAssertion(ref))
|
|
42
|
+
return null;
|
|
43
|
+
if (!ref.path)
|
|
44
|
+
return unverifiable('contains/matches needs a `path` to read — pin the file.');
|
|
45
|
+
const abs = nodePath.join(projectRoot, ref.path);
|
|
46
|
+
let text;
|
|
47
|
+
try {
|
|
48
|
+
if (statSync(abs).isDirectory()) {
|
|
49
|
+
return unverifiable(`contains/matches cannot read a directory (${ref.path}) — assert on it with \`count\`.`);
|
|
50
|
+
}
|
|
51
|
+
text = readFileSync(abs, 'utf8');
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return unverifiable(`could not read ${ref.path}.`);
|
|
55
|
+
}
|
|
56
|
+
const zone = ref.scan ?? 'all';
|
|
57
|
+
// Zone the WHOLE file, then slice: lexing from mid-declaration could start
|
|
58
|
+
// inside a string and invert every zone after it.
|
|
59
|
+
const zoned = blankOutsideZone(text, zone).content;
|
|
60
|
+
const scoped = span ? zoned.slice(span.start, span.end) : zoned;
|
|
61
|
+
const where = span && ref.symbol ? `the \`${ref.symbol}\` declaration in ${ref.path}` : ref.path;
|
|
62
|
+
const zoneNote = zone === 'all' ? '' : ` (scan: ${zone})`;
|
|
63
|
+
const held = [];
|
|
64
|
+
if (ref.contains !== undefined) {
|
|
65
|
+
if (!scoped.includes(ref.contains)) {
|
|
66
|
+
return {
|
|
67
|
+
ok: false,
|
|
68
|
+
failure: ReferenceFailure.ContentMismatch,
|
|
69
|
+
expected: `contains "${shown(ref.contains)}"`,
|
|
70
|
+
actual: 'not found',
|
|
71
|
+
message: `${where} no longer contains "${shown(ref.contains)}"${zoneNote}.`,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
held.push(`contains "${shown(ref.contains)}"`);
|
|
75
|
+
}
|
|
76
|
+
if (ref.matches !== undefined) {
|
|
77
|
+
let re;
|
|
78
|
+
try {
|
|
79
|
+
re = new RegExp(ref.matches, 'm');
|
|
80
|
+
}
|
|
81
|
+
catch (e) {
|
|
82
|
+
return unverifiable(`matches /${ref.matches}/ does not compile: ${e.message}`);
|
|
83
|
+
}
|
|
84
|
+
if (!re.test(scoped)) {
|
|
85
|
+
return {
|
|
86
|
+
ok: false,
|
|
87
|
+
failure: ReferenceFailure.ContentMismatch,
|
|
88
|
+
expected: `matches /${ref.matches}/`,
|
|
89
|
+
actual: 'no match',
|
|
90
|
+
message: `${where} no longer matches /${ref.matches}/${zoneNote}.`,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
held.push(`matches /${ref.matches}/`);
|
|
94
|
+
}
|
|
95
|
+
return { ok: true, message: `${where} still ${held.join(' and ')}${zoneNote}.` };
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Re-derive `ref.count` through the extraction authority and compare it to the
|
|
99
|
+
* claimed number. Returns `null` when the reference declares no count.
|
|
100
|
+
*
|
|
101
|
+
* A source that matched 0 files never measured anything, so it is unverifiable
|
|
102
|
+
* — never a pass, even for `expected: 0`.
|
|
103
|
+
*/
|
|
104
|
+
export function checkReferenceCount(projectRoot, ref, excludeDirs = []) {
|
|
105
|
+
const count = ref.count;
|
|
106
|
+
if (!count)
|
|
107
|
+
return null;
|
|
108
|
+
const source = count.source;
|
|
109
|
+
if (!source || typeof source !== 'object')
|
|
110
|
+
return unverifiable('count.source is missing.');
|
|
111
|
+
if (source.$use !== undefined) {
|
|
112
|
+
return unverifiable('count.source uses `$use`, which a reference does not resolve — inline the selector.');
|
|
113
|
+
}
|
|
114
|
+
const problem = validateWiringSource(source);
|
|
115
|
+
if (problem)
|
|
116
|
+
return unverifiable(`count.source ${problem}.`);
|
|
117
|
+
const res = inspectSource(projectRoot, source, excludeDirs);
|
|
118
|
+
if (res.error)
|
|
119
|
+
return unverifiable(`count.source could not be evaluated: ${res.error}`);
|
|
120
|
+
if (res.filesScanned === 0) {
|
|
121
|
+
return unverifiable(`count.source matched 0 files (${(source.files ?? []).join(', ')}) — the count was never measured` +
|
|
122
|
+
(res.hint ? ` (${res.hint})` : '') +
|
|
123
|
+
'.');
|
|
124
|
+
}
|
|
125
|
+
const measure = count.measure ?? 'ids';
|
|
126
|
+
const actual = measure === 'sites' ? res.sites.length : res.ids.length;
|
|
127
|
+
const basis = `${measure} across ${res.filesScanned} file(s)`;
|
|
128
|
+
if (actual === count.expected) {
|
|
129
|
+
return {
|
|
130
|
+
ok: true,
|
|
131
|
+
expected: count.expected,
|
|
132
|
+
actual,
|
|
133
|
+
message: `count ${actual} = expected ${count.expected} (${basis}).`,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
ok: false,
|
|
138
|
+
failure: ReferenceFailure.CountMismatch,
|
|
139
|
+
expected: count.expected,
|
|
140
|
+
actual,
|
|
141
|
+
message: `count ${actual} ≠ expected ${count.expected} (${basis}) — set expected: ${actual}.`,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WHY a reference check did not pass — additive to its `outcome`.
|
|
3
|
+
*
|
|
4
|
+
* `outcome` (ok / stale / missing / unknown) is kept for back-compat, but it
|
|
5
|
+
* conflated unrelated failures: a missing FILE reference read `stale` while a
|
|
6
|
+
* symbol pinned to a missing file read `missing`, and nothing separated "the
|
|
7
|
+
* path is gone" from "the path is there but the thing inside it is not". Each
|
|
8
|
+
* failure mode can be failed on separately (`--fail-on path-missing`).
|
|
9
|
+
*/
|
|
10
|
+
export declare enum ReferenceFailure {
|
|
11
|
+
/** The file / directory (or a symbol's pinned file) does not exist. */
|
|
12
|
+
PathMissing = "path-missing",
|
|
13
|
+
/** The path exists, but the symbol / member it pins does not. */
|
|
14
|
+
AnchorMissing = "anchor-missing",
|
|
15
|
+
/** The target exists but no longer `contains` / `matches` what the asset claims. */
|
|
16
|
+
ContentMismatch = "content-mismatch",
|
|
17
|
+
/** A declared `count` re-derived to a different number. */
|
|
18
|
+
CountMismatch = "count-mismatch",
|
|
19
|
+
/** An id-keyed reference (template, playbook, policy, …) is not registered. */
|
|
20
|
+
IdUnregistered = "id-unregistered",
|
|
21
|
+
/** The check could not run — nothing was proved either way. */
|
|
22
|
+
Unverifiable = "unverifiable",
|
|
23
|
+
/**
|
|
24
|
+
* The reference itself is malformed — a kind outside the vocabulary, or the
|
|
25
|
+
* field its kind cannot be checked without (`path`, `symbol`, `id`) is
|
|
26
|
+
* missing. Nothing was checked, and unlike `unverifiable` (a well-formed
|
|
27
|
+
* `url` the check deliberately never fetches) the author can fix it.
|
|
28
|
+
*/
|
|
29
|
+
Malformed = "malformed"
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=reference-failure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference-failure.d.ts","sourceRoot":"","sources":["../src/reference-failure.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,oBAAY,gBAAgB;IAC1B,uEAAuE;IACvE,WAAW,iBAAiB;IAC5B,iEAAiE;IACjE,aAAa,mBAAmB;IAChC,oFAAoF;IACpF,eAAe,qBAAqB;IACpC,2DAA2D;IAC3D,aAAa,mBAAmB;IAChC,+EAA+E;IAC/E,cAAc,oBAAoB;IAClC,+DAA+D;IAC/D,YAAY,iBAAiB;IAC7B;;;;;OAKG;IACH,SAAS,cAAc;CACxB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WHY a reference check did not pass — additive to its `outcome`.
|
|
3
|
+
*
|
|
4
|
+
* `outcome` (ok / stale / missing / unknown) is kept for back-compat, but it
|
|
5
|
+
* conflated unrelated failures: a missing FILE reference read `stale` while a
|
|
6
|
+
* symbol pinned to a missing file read `missing`, and nothing separated "the
|
|
7
|
+
* path is gone" from "the path is there but the thing inside it is not". Each
|
|
8
|
+
* failure mode can be failed on separately (`--fail-on path-missing`).
|
|
9
|
+
*/
|
|
10
|
+
export var ReferenceFailure;
|
|
11
|
+
(function (ReferenceFailure) {
|
|
12
|
+
/** The file / directory (or a symbol's pinned file) does not exist. */
|
|
13
|
+
ReferenceFailure["PathMissing"] = "path-missing";
|
|
14
|
+
/** The path exists, but the symbol / member it pins does not. */
|
|
15
|
+
ReferenceFailure["AnchorMissing"] = "anchor-missing";
|
|
16
|
+
/** The target exists but no longer `contains` / `matches` what the asset claims. */
|
|
17
|
+
ReferenceFailure["ContentMismatch"] = "content-mismatch";
|
|
18
|
+
/** A declared `count` re-derived to a different number. */
|
|
19
|
+
ReferenceFailure["CountMismatch"] = "count-mismatch";
|
|
20
|
+
/** An id-keyed reference (template, playbook, policy, …) is not registered. */
|
|
21
|
+
ReferenceFailure["IdUnregistered"] = "id-unregistered";
|
|
22
|
+
/** The check could not run — nothing was proved either way. */
|
|
23
|
+
ReferenceFailure["Unverifiable"] = "unverifiable";
|
|
24
|
+
/**
|
|
25
|
+
* The reference itself is malformed — a kind outside the vocabulary, or the
|
|
26
|
+
* field its kind cannot be checked without (`path`, `symbol`, `id`) is
|
|
27
|
+
* missing. Nothing was checked, and unlike `unverifiable` (a well-formed
|
|
28
|
+
* `url` the check deliberately never fetches) the author can fix it.
|
|
29
|
+
*/
|
|
30
|
+
ReferenceFailure["Malformed"] = "malformed";
|
|
31
|
+
})(ReferenceFailure || (ReferenceFailure = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tri-state answer to "is this id registered?".
|
|
3
|
+
*
|
|
4
|
+
* A boolean cannot say "I could not look": a lookup known to be unable to
|
|
5
|
+
* answer (the command index was not injected, outside the CLI) collapsed to
|
|
6
|
+
* either `true` (every `shrk …` string "existed") or `false` (every correct
|
|
7
|
+
* command was "missing"). `Unverifiable` is the third answer, and every consumer
|
|
8
|
+
* reports it as NOT VERIFIED — never as a pass and never as a finding.
|
|
9
|
+
*/
|
|
10
|
+
export declare enum ReferenceIdStatus {
|
|
11
|
+
Exists = "exists",
|
|
12
|
+
Missing = "missing",
|
|
13
|
+
Unverifiable = "unverifiable"
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=reference-id-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference-id-status.d.ts","sourceRoot":"","sources":["../src/reference-id-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,YAAY,iBAAiB;CAC9B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tri-state answer to "is this id registered?".
|
|
3
|
+
*
|
|
4
|
+
* A boolean cannot say "I could not look": a lookup known to be unable to
|
|
5
|
+
* answer (the command index was not injected, outside the CLI) collapsed to
|
|
6
|
+
* either `true` (every `shrk …` string "existed") or `false` (every correct
|
|
7
|
+
* command was "missing"). `Unverifiable` is the third answer, and every consumer
|
|
8
|
+
* reports it as NOT VERIFIED — never as a pass and never as a finding.
|
|
9
|
+
*/
|
|
10
|
+
export var ReferenceIdStatus;
|
|
11
|
+
(function (ReferenceIdStatus) {
|
|
12
|
+
ReferenceIdStatus["Exists"] = "exists";
|
|
13
|
+
ReferenceIdStatus["Missing"] = "missing";
|
|
14
|
+
ReferenceIdStatus["Unverifiable"] = "unverifiable";
|
|
15
|
+
})(ReferenceIdStatus || (ReferenceIdStatus = {}));
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE declaration table: for every kind THE id resolver answers for, how its
|
|
3
|
+
* ids come to exist.
|
|
4
|
+
*
|
|
5
|
+
* Round 12 (12.3): a registration hint's `discovery.profileIds` resolved
|
|
6
|
+
* against a kind the consumer could not see how to fill, so the self-config
|
|
7
|
+
* doctor sat at NOT VERIFIED (exit 2) forever. The loud skip was right; what
|
|
8
|
+
* was missing is a guarantee that every referenceable kind is DECLARABLE. This
|
|
9
|
+
* table is that guarantee's data:
|
|
10
|
+
*
|
|
11
|
+
* - `Record<IdReferenceKind, …>` — a kind added to `ALL_ID_REFERENCE_KINDS`
|
|
12
|
+
* without a row is a compile error;
|
|
13
|
+
* - the r76 declarability lock declares one id through EVERY path of every
|
|
14
|
+
* row (a real pack under node_modules for a pack key) and proves the
|
|
15
|
+
* resolver lists it, so a row cannot name a path that fills nothing;
|
|
16
|
+
* - it has real consumers, so it cannot drift into a doc-only list: the
|
|
17
|
+
* doctor's loud-skip reason names how to fill an empty kind, its
|
|
18
|
+
* `*-missing` findings print `listVerb` as `next:`, and `shrk profiles
|
|
19
|
+
* list` renders its empty state from here.
|
|
20
|
+
*/
|
|
21
|
+
import type { IReferenceKindDeclaration } from './i-reference-kind-declaration.js';
|
|
22
|
+
import type { IdReferenceKind, ReferenceKind } from './reference-registry.js';
|
|
23
|
+
export declare const REFERENCE_KIND_DECLARATIONS: Readonly<Record<IdReferenceKind, IReferenceKindDeclaration>>;
|
|
24
|
+
/**
|
|
25
|
+
* Every way `kind` can be filled, as display strings — `builtin`, `pack key
|
|
26
|
+
* <key>`, `config key <key>`, then local files — or `[]` for a kind with no
|
|
27
|
+
* row (`command`, `file`, … are not id registries).
|
|
28
|
+
*/
|
|
29
|
+
export declare function referenceKindDeclarationPaths(kind: ReferenceKind): readonly string[];
|
|
30
|
+
/**
|
|
31
|
+
* THE declarability answer: can ANY declaration (builtin, config key, local
|
|
32
|
+
* file, pack key) fill `kind`'s registry? A reference to a kind for which this
|
|
33
|
+
* is false can never resolve — the contributions report files it as
|
|
34
|
+
* `undeclarable-kind`, never as a fixable empty registry. The r76 lock keeps
|
|
35
|
+
* it true for every kind the resolver lists.
|
|
36
|
+
*/
|
|
37
|
+
export declare function isReferenceKindDeclarable(kind: ReferenceKind): boolean;
|
|
38
|
+
/** `pack key migrationProfileFiles · sharkcraft/migration-profiles.ts` — the one wording every surface prints. */
|
|
39
|
+
export declare function formatReferenceKindDeclaration(kind: ReferenceKind): string;
|
|
40
|
+
/** The command that shows `kind`'s ids (its `listVerb`), or `undefined` for a kind with no row. */
|
|
41
|
+
export declare function referenceKindListVerb(kind: ReferenceKind): string | undefined;
|
|
42
|
+
//# sourceMappingURL=reference-kind-declarations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference-kind-declarations.d.ts","sourceRoot":"","sources":["../src/reference-kind-declarations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE9E,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,MAAM,CAAC,eAAe,EAAE,yBAAyB,CAAC,CAsGjG,CAAC;AAQL;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,aAAa,GAAG,SAAS,MAAM,EAAE,CASpF;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAEtE;AAED,kHAAkH;AAClH,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAG1E;AAED,mGAAmG;AACnG,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAE7E"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
export const REFERENCE_KIND_DECLARATIONS = Object.freeze({
|
|
2
|
+
template: {
|
|
3
|
+
listVerb: 'shrk templates list',
|
|
4
|
+
configKeys: ['templateFiles'],
|
|
5
|
+
localFiles: ['sharkcraft/templates.ts', 'sharkcraft/knowledge/templates.ts'],
|
|
6
|
+
packKeys: ['templateFiles'],
|
|
7
|
+
},
|
|
8
|
+
pipeline: {
|
|
9
|
+
listVerb: 'shrk pipelines list',
|
|
10
|
+
configKeys: ['pipelineFiles'],
|
|
11
|
+
localFiles: ['sharkcraft/pipelines.ts', 'sharkcraft/knowledge/pipelines.ts'],
|
|
12
|
+
packKeys: ['pipelineFiles'],
|
|
13
|
+
},
|
|
14
|
+
playbook: {
|
|
15
|
+
listVerb: 'shrk playbooks list',
|
|
16
|
+
configKeys: ['playbookFiles'],
|
|
17
|
+
localFiles: ['sharkcraft/playbooks.ts', 'sharkcraft/playbooks/index.ts'],
|
|
18
|
+
packKeys: ['playbookFiles'],
|
|
19
|
+
},
|
|
20
|
+
policy: {
|
|
21
|
+
listVerb: 'shrk policy list',
|
|
22
|
+
localFiles: ['sharkcraft/policies.ts'],
|
|
23
|
+
packKeys: ['policyCheckFiles'],
|
|
24
|
+
},
|
|
25
|
+
construct: {
|
|
26
|
+
listVerb: 'shrk constructs list',
|
|
27
|
+
localFiles: ['sharkcraft/constructs.ts', 'sharkcraft/constructs.js', 'sharkcraft/constructs/index.ts'],
|
|
28
|
+
packKeys: ['constructFiles'],
|
|
29
|
+
},
|
|
30
|
+
helper: {
|
|
31
|
+
// The built-in HELPERS table ships empty — helpers are declared, not builtin.
|
|
32
|
+
listVerb: 'shrk helper list',
|
|
33
|
+
localFiles: ['sharkcraft/helpers.ts', 'sharkcraft/helpers/index.ts'],
|
|
34
|
+
packKeys: ['helperFiles'],
|
|
35
|
+
},
|
|
36
|
+
'boundary-rule': {
|
|
37
|
+
// `sharkcraft/boundaries.ts` is NOT read unless `boundaryFiles` lists it.
|
|
38
|
+
listVerb: 'shrk boundaries list',
|
|
39
|
+
configKeys: ['boundaryFiles'],
|
|
40
|
+
packKeys: ['boundaryFiles'],
|
|
41
|
+
},
|
|
42
|
+
'path-convention': {
|
|
43
|
+
listVerb: 'shrk paths list',
|
|
44
|
+
configKeys: ['pathFiles'],
|
|
45
|
+
localFiles: ['sharkcraft/paths.ts', 'sharkcraft/knowledge/paths.ts'],
|
|
46
|
+
packKeys: ['pathFiles', 'pathConventionFiles'],
|
|
47
|
+
},
|
|
48
|
+
rule: {
|
|
49
|
+
listVerb: 'shrk rules list',
|
|
50
|
+
configKeys: ['ruleFiles'],
|
|
51
|
+
localFiles: ['sharkcraft/rules.ts', 'sharkcraft/knowledge/rules.ts'],
|
|
52
|
+
packKeys: ['ruleFiles'],
|
|
53
|
+
},
|
|
54
|
+
knowledge: {
|
|
55
|
+
listVerb: 'shrk knowledge list',
|
|
56
|
+
configKeys: ['knowledgeFiles', 'docsFiles'],
|
|
57
|
+
localFiles: ['sharkcraft/knowledge.ts', 'sharkcraft/knowledge/index.ts'],
|
|
58
|
+
packKeys: ['knowledgeFiles', 'docsFiles'],
|
|
59
|
+
},
|
|
60
|
+
decision: {
|
|
61
|
+
listVerb: 'shrk self-config resolve <id>',
|
|
62
|
+
localFiles: ['sharkcraft/decisions.ts', 'sharkcraft/decisions/*.md', 'docs/adr/*.md'],
|
|
63
|
+
packKeys: ['decisionFiles'],
|
|
64
|
+
},
|
|
65
|
+
convention: {
|
|
66
|
+
listVerb: 'shrk conventions list',
|
|
67
|
+
configKeys: ['conventionFiles'],
|
|
68
|
+
localFiles: ['sharkcraft/conventions.ts', 'sharkcraft/conventions/index.ts'],
|
|
69
|
+
packKeys: ['conventionFiles'],
|
|
70
|
+
},
|
|
71
|
+
'contract-template': {
|
|
72
|
+
listVerb: 'shrk contract template list',
|
|
73
|
+
localFiles: ['sharkcraft/contract-templates.ts', 'sharkcraft/contract-templates/index.ts'],
|
|
74
|
+
packKeys: ['contractTemplateFiles'],
|
|
75
|
+
},
|
|
76
|
+
'migration-profile': {
|
|
77
|
+
listVerb: 'shrk profiles list --kind migration',
|
|
78
|
+
localFiles: ['sharkcraft/migration-profiles.ts', 'sharkcraft/migration-profiles/index.ts'],
|
|
79
|
+
packKeys: ['migrationProfileFiles'],
|
|
80
|
+
},
|
|
81
|
+
'workspace-profile': {
|
|
82
|
+
// THE WorkspaceProfile vocabulary (@shrkcrft/workspace) — never empty.
|
|
83
|
+
listVerb: 'shrk profiles list --kind workspace',
|
|
84
|
+
builtin: true,
|
|
85
|
+
},
|
|
86
|
+
'routing-hint': {
|
|
87
|
+
listVerb: 'shrk self-config resolve <id>',
|
|
88
|
+
configKeys: ['taskRoutingHintFiles'],
|
|
89
|
+
localFiles: ['sharkcraft/task-routing-hints.ts', 'sharkcraft/task-routing-hints/index.ts'],
|
|
90
|
+
packKeys: ['taskRoutingHintFiles'],
|
|
91
|
+
},
|
|
92
|
+
'registration-hint': {
|
|
93
|
+
listVerb: 'shrk registrations list',
|
|
94
|
+
localFiles: ['sharkcraft/registration-hints.ts', 'sharkcraft/registration-hints/index.ts'],
|
|
95
|
+
packKeys: ['registrationHintFiles'],
|
|
96
|
+
},
|
|
97
|
+
'scaffold-pattern': {
|
|
98
|
+
listVerb: 'shrk scaffolds list',
|
|
99
|
+
localFiles: ['sharkcraft/scaffold-patterns.ts'],
|
|
100
|
+
packKeys: ['scaffoldPatternFiles'],
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
function declarationOf(kind) {
|
|
104
|
+
return Object.prototype.hasOwnProperty.call(REFERENCE_KIND_DECLARATIONS, kind)
|
|
105
|
+
? REFERENCE_KIND_DECLARATIONS[kind]
|
|
106
|
+
: undefined;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Every way `kind` can be filled, as display strings — `builtin`, `pack key
|
|
110
|
+
* <key>`, `config key <key>`, then local files — or `[]` for a kind with no
|
|
111
|
+
* row (`command`, `file`, … are not id registries).
|
|
112
|
+
*/
|
|
113
|
+
export function referenceKindDeclarationPaths(kind) {
|
|
114
|
+
const d = declarationOf(kind);
|
|
115
|
+
if (!d)
|
|
116
|
+
return [];
|
|
117
|
+
return [
|
|
118
|
+
...(d.builtin ? ['builtin (always populated)'] : []),
|
|
119
|
+
...(d.packKeys ?? []).map((k) => `pack key ${k}`),
|
|
120
|
+
...(d.configKeys ?? []).map((k) => `config key ${String(k)}`),
|
|
121
|
+
...(d.localFiles ?? []),
|
|
122
|
+
];
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* THE declarability answer: can ANY declaration (builtin, config key, local
|
|
126
|
+
* file, pack key) fill `kind`'s registry? A reference to a kind for which this
|
|
127
|
+
* is false can never resolve — the contributions report files it as
|
|
128
|
+
* `undeclarable-kind`, never as a fixable empty registry. The r76 lock keeps
|
|
129
|
+
* it true for every kind the resolver lists.
|
|
130
|
+
*/
|
|
131
|
+
export function isReferenceKindDeclarable(kind) {
|
|
132
|
+
return referenceKindDeclarationPaths(kind).length > 0;
|
|
133
|
+
}
|
|
134
|
+
/** `pack key migrationProfileFiles · sharkcraft/migration-profiles.ts` — the one wording every surface prints. */
|
|
135
|
+
export function formatReferenceKindDeclaration(kind) {
|
|
136
|
+
const paths = referenceKindDeclarationPaths(kind);
|
|
137
|
+
return paths.length > 0 ? paths.join(' · ') : 'nothing — no builtin, config key, local file or pack key declares it';
|
|
138
|
+
}
|
|
139
|
+
/** The command that shows `kind`'s ids (its `listVerb`), or `undefined` for a kind with no row. */
|
|
140
|
+
export function referenceKindListVerb(kind) {
|
|
141
|
+
return declarationOf(kind)?.listVerb;
|
|
142
|
+
}
|
|
@@ -3,6 +3,12 @@ import type { ISharkcraftInspection } from './sharkcraft-inspector.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Adapt a SharkCraft inspection to the {@link IReferenceLookup} contract the
|
|
5
5
|
* preset reference resolver expects. Pure read-through; no state.
|
|
6
|
+
*
|
|
7
|
+
* A projection of THE reference registry, never a second id authority: it
|
|
8
|
+
* used to build its template / pipeline sets from `inspection.templates` /
|
|
9
|
+
* `inspection.pipelines` rather than the registries `templates list` and
|
|
10
|
+
* `pipelines list` read — two answers to "does this id exist?" that agreed
|
|
11
|
+
* only while nobody filtered one of them.
|
|
6
12
|
*/
|
|
7
13
|
export declare function inspectionReferenceLookup(inspection: ISharkcraftInspection): IReferenceLookup;
|
|
8
14
|
//# sourceMappingURL=reference-lookup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reference-lookup.d.ts","sourceRoot":"","sources":["../src/reference-lookup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"reference-lookup.d.ts","sourceRoot":"","sources":["../src/reference-lookup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,qBAAqB,GAChC,gBAAgB,CAclB"}
|
package/dist/reference-lookup.js
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
|
+
import { referenceIdsFor } from "./reference-registry.js";
|
|
1
2
|
/**
|
|
2
3
|
* Adapt a SharkCraft inspection to the {@link IReferenceLookup} contract the
|
|
3
4
|
* preset reference resolver expects. Pure read-through; no state.
|
|
5
|
+
*
|
|
6
|
+
* A projection of THE reference registry, never a second id authority: it
|
|
7
|
+
* used to build its template / pipeline sets from `inspection.templates` /
|
|
8
|
+
* `inspection.pipelines` rather than the registries `templates list` and
|
|
9
|
+
* `pipelines list` read — two answers to "does this id exist?" that agreed
|
|
10
|
+
* only while nobody filtered one of them.
|
|
4
11
|
*/
|
|
5
12
|
export function inspectionReferenceLookup(inspection) {
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
13
|
+
const ids = (kind) => new Set(referenceIdsFor(inspection, kind));
|
|
14
|
+
const knowledgeIds = ids('knowledge');
|
|
15
|
+
const ruleIds = ids('rule');
|
|
16
|
+
const pathIds = ids('path-convention');
|
|
17
|
+
const templateIds = ids('template');
|
|
18
|
+
const pipelineIds = ids('pipeline');
|
|
11
19
|
return {
|
|
12
20
|
hasKnowledge: (id) => knowledgeIds.has(id),
|
|
13
21
|
hasRule: (id) => ruleIds.has(id),
|