@shrkcrft/inspector 0.1.0-alpha.30 → 0.1.0-alpha.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acceptance-replay.js +1 -1
- package/dist/agent-contract-templates.js +6 -6
- package/dist/agent-contract.d.ts.map +1 -1
- package/dist/agent-contract.js +13 -8
- package/dist/agent-orchestration.js +2 -2
- package/dist/agent-task-prep.d.ts +16 -0
- package/dist/agent-task-prep.d.ts.map +1 -1
- package/dist/agent-task-prep.js +60 -5
- package/dist/ai-readiness.d.ts.map +1 -1
- package/dist/ai-readiness.js +21 -3
- package/dist/architecture-map.d.ts +16 -0
- package/dist/architecture-map.d.ts.map +1 -1
- package/dist/architecture-map.js +42 -26
- package/dist/area-explore.d.ts +2 -2
- package/dist/area-explore.d.ts.map +1 -1
- package/dist/area-explore.js +36 -16
- package/dist/area-map.d.ts +56 -11
- package/dist/area-map.d.ts.map +1 -1
- package/dist/area-map.js +106 -25
- package/dist/asset-doctor-proposed-exit.d.ts +21 -0
- package/dist/asset-doctor-proposed-exit.d.ts.map +1 -0
- package/dist/asset-doctor-proposed-exit.js +22 -0
- package/dist/asset-provenance.js +1 -1
- package/dist/boundaries-changed-only.d.ts +24 -1
- package/dist/boundaries-changed-only.d.ts.map +1 -1
- package/dist/boundaries-changed-only.js +12 -2
- package/dist/boundary-check-options.model.d.ts +40 -0
- package/dist/boundary-check-options.model.d.ts.map +1 -0
- package/dist/boundary-check-options.model.js +1 -0
- package/dist/boundary-check-result.model.d.ts +89 -0
- package/dist/boundary-check-result.model.d.ts.map +1 -0
- package/dist/boundary-check-result.model.js +1 -0
- package/dist/boundary-configuration-status.d.ts +38 -0
- package/dist/boundary-configuration-status.d.ts.map +1 -0
- package/dist/boundary-configuration-status.js +118 -0
- package/dist/boundary-configuration-status.model.d.ts +37 -0
- package/dist/boundary-configuration-status.model.d.ts.map +1 -0
- package/dist/boundary-configuration-status.model.js +1 -0
- package/dist/boundary-load-issue.model.d.ts +30 -0
- package/dist/boundary-load-issue.model.d.ts.map +1 -0
- package/dist/boundary-load-issue.model.js +1 -0
- package/dist/boundary-rule-check.model.d.ts +44 -0
- package/dist/boundary-rule-check.model.d.ts.map +1 -0
- package/dist/boundary-rule-check.model.js +1 -0
- package/dist/boundary-rule-invalidation.model.d.ts +31 -0
- package/dist/boundary-rule-invalidation.model.d.ts.map +1 -0
- package/dist/boundary-rule-invalidation.model.js +1 -0
- package/dist/boundary-rule-set-diff.model.d.ts +75 -0
- package/dist/boundary-rule-set-diff.model.d.ts.map +1 -0
- package/dist/boundary-rule-set-diff.model.js +1 -0
- package/dist/boundary-rule-sources.d.ts +28 -0
- package/dist/boundary-rule-sources.d.ts.map +1 -0
- package/dist/boundary-rule-sources.js +110 -0
- package/dist/boundary-stale-exception-finding.model.d.ts +12 -0
- package/dist/boundary-stale-exception-finding.model.d.ts.map +1 -0
- package/dist/boundary-stale-exception-finding.model.js +1 -0
- package/dist/boundary-unit-liveness.d.ts +35 -0
- package/dist/boundary-unit-liveness.d.ts.map +1 -0
- package/dist/boundary-unit-liveness.js +71 -0
- package/dist/change-intent.d.ts +3 -0
- package/dist/change-intent.d.ts.map +1 -1
- package/dist/change-intent.js +61 -27
- package/dist/changes-summary.d.ts.map +1 -1
- package/dist/changes-summary.js +19 -9
- package/dist/ci-integrity-report.js +1 -1
- package/dist/ci-predict.d.ts.map +1 -1
- package/dist/ci-predict.js +38 -5
- package/dist/code-intelligence-doctor.d.ts +6 -0
- package/dist/code-intelligence-doctor.d.ts.map +1 -1
- package/dist/code-intelligence-doctor.js +22 -7
- package/dist/codemod-assist.d.ts.map +1 -1
- package/dist/codemod-assist.js +3 -1
- package/dist/command-recommender.d.ts +45 -2
- package/dist/command-recommender.d.ts.map +1 -1
- package/dist/command-recommender.js +41 -263
- package/dist/command-resolution-status.d.ts +44 -0
- package/dist/command-resolution-status.d.ts.map +1 -0
- package/dist/command-resolution-status.js +44 -0
- package/dist/command-safety-level.d.ts +15 -0
- package/dist/command-safety-level.d.ts.map +1 -0
- package/dist/command-safety-level.js +43 -0
- package/dist/command-taxonomy.js +1 -1
- package/dist/comment-syntax.d.ts +15 -0
- package/dist/comment-syntax.d.ts.map +1 -0
- package/dist/comment-syntax.js +15 -0
- package/dist/compliance-evidence.js +1 -1
- package/dist/compliance-profiles.js +1 -1
- package/dist/construct-registry.d.ts +40 -0
- package/dist/construct-registry.d.ts.map +1 -1
- package/dist/construct-registry.js +186 -82
- package/dist/context-tuning.d.ts +4 -0
- package/dist/context-tuning.d.ts.map +1 -1
- package/dist/context-tuning.js +10 -7
- package/dist/contract-template-registry.d.ts +10 -0
- package/dist/contract-template-registry.d.ts.map +1 -1
- package/dist/contract-template-registry.js +59 -33
- package/dist/contribution-kind.d.ts +52 -0
- package/dist/contribution-kind.d.ts.map +1 -0
- package/dist/contribution-kind.js +52 -0
- package/dist/contribution-load-failures.d.ts +122 -0
- package/dist/contribution-load-failures.d.ts.map +1 -0
- package/dist/contribution-load-failures.js +592 -0
- package/dist/contributions-report.d.ts +28 -0
- package/dist/contributions-report.d.ts.map +1 -0
- package/dist/contributions-report.js +242 -0
- package/dist/convention-applicability.d.ts +46 -0
- package/dist/convention-applicability.d.ts.map +1 -0
- package/dist/convention-applicability.js +247 -0
- package/dist/convention-filter-level.d.ts +13 -0
- package/dist/convention-filter-level.d.ts.map +1 -0
- package/dist/convention-filter-level.js +13 -0
- package/dist/convention-registry.d.ts +51 -4
- package/dist/convention-registry.d.ts.map +1 -1
- package/dist/convention-registry.js +135 -60
- package/dist/coverage-report.d.ts.map +1 -1
- package/dist/coverage-report.js +6 -6
- package/dist/custom-checks.d.ts +60 -1
- package/dist/custom-checks.d.ts.map +1 -1
- package/dist/custom-checks.js +161 -6
- package/dist/dashboard/dashboard-data.d.ts +6 -0
- package/dist/dashboard/dashboard-data.d.ts.map +1 -1
- package/dist/dashboard/dashboard-data.js +99 -8
- package/dist/dashboard/dashboard-knowledge.d.ts.map +1 -1
- package/dist/dashboard/dashboard-knowledge.js +14 -2
- package/dist/decision-records.d.ts +24 -0
- package/dist/decision-records.d.ts.map +1 -1
- package/dist/decision-records.js +231 -84
- package/dist/declared-cross-references.d.ts +61 -0
- package/dist/declared-cross-references.d.ts.map +1 -0
- package/dist/declared-cross-references.js +550 -0
- package/dist/declared-gate-plane-rules.d.ts +24 -0
- package/dist/declared-gate-plane-rules.d.ts.map +1 -0
- package/dist/declared-gate-plane-rules.js +39 -0
- package/dist/declared-reference-coverage.d.ts +27 -0
- package/dist/declared-reference-coverage.d.ts.map +1 -0
- package/dist/declared-reference-coverage.js +55 -0
- package/dist/declared-xref-status.d.ts +19 -0
- package/dist/declared-xref-status.d.ts.map +1 -0
- package/dist/declared-xref-status.js +19 -0
- package/dist/delegate-pack-recipes.d.ts +13 -2
- package/dist/delegate-pack-recipes.d.ts.map +1 -1
- package/dist/delegate-pack-recipes.js +45 -14
- package/dist/demo-package.js +2 -2
- package/dist/demo-script.js +2 -2
- package/dist/demo-workflow.js +3 -3
- package/dist/dev-cycle.js +1 -1
- package/dist/dev-session.js +1 -1
- package/dist/doc-references.d.ts +23 -2
- package/dist/doc-references.d.ts.map +1 -1
- package/dist/doc-references.js +96 -17
- package/dist/doctor-result.d.ts +8 -0
- package/dist/doctor-result.d.ts.map +1 -1
- package/dist/doctor-verdict-kind.d.ts +19 -0
- package/dist/doctor-verdict-kind.d.ts.map +1 -0
- package/dist/doctor-verdict-kind.js +19 -0
- package/dist/doctor-verdict.d.ts +18 -0
- package/dist/doctor-verdict.d.ts.map +1 -0
- package/dist/doctor-verdict.js +28 -0
- package/dist/drift.d.ts +17 -0
- package/dist/drift.d.ts.map +1 -1
- package/dist/drift.js +40 -10
- package/dist/entrypoint-matrix.d.ts.map +1 -1
- package/dist/entrypoint-matrix.js +4 -1
- package/dist/feedback-ingestion.d.ts +28 -2
- package/dist/feedback-ingestion.d.ts.map +1 -1
- package/dist/feedback-ingestion.js +75 -20
- package/dist/file-languages.d.ts +9 -0
- package/dist/file-languages.d.ts.map +1 -0
- package/dist/file-languages.js +91 -0
- package/dist/fix-preview.d.ts.map +1 -1
- package/dist/fix-preview.js +87 -22
- package/dist/framework-extractor-outcomes.d.ts +27 -0
- package/dist/framework-extractor-outcomes.d.ts.map +1 -0
- package/dist/framework-extractor-outcomes.js +83 -0
- package/dist/fuzzy-impact.d.ts.map +1 -1
- package/dist/fuzzy-impact.js +3 -2
- package/dist/git-helpers.d.ts +29 -4
- package/dist/git-helpers.d.ts.map +1 -1
- package/dist/git-helpers.js +69 -10
- package/dist/healing-plan.d.ts.map +1 -1
- package/dist/healing-plan.js +3 -4
- package/dist/helper-catalog.d.ts +25 -0
- package/dist/helper-catalog.d.ts.map +1 -0
- package/dist/helper-catalog.js +91 -0
- package/dist/helper-registry.d.ts.map +1 -1
- package/dist/helper-registry.js +17 -1
- package/dist/helper-view.d.ts +33 -0
- package/dist/helper-view.d.ts.map +1 -0
- package/dist/helper-view.js +1 -0
- package/dist/i-asset-doctor-flags.d.ts +16 -0
- package/dist/i-asset-doctor-flags.d.ts.map +1 -0
- package/dist/i-asset-doctor-flags.js +1 -0
- package/dist/i-command-resolution.d.ts +22 -0
- package/dist/i-command-resolution.d.ts.map +1 -0
- package/dist/i-command-resolution.js +1 -0
- package/dist/i-command-resolve-options.d.ts +24 -0
- package/dist/i-command-resolve-options.d.ts.map +1 -0
- package/dist/i-command-resolve-options.js +1 -0
- package/dist/i-command-safety.d.ts +13 -0
- package/dist/i-command-safety.d.ts.map +1 -0
- package/dist/i-command-safety.js +1 -0
- package/dist/i-contribution-accepted-entry.d.ts +18 -0
- package/dist/i-contribution-accepted-entry.d.ts.map +1 -0
- package/dist/i-contribution-accepted-entry.js +1 -0
- package/dist/i-contribution-entry-rejection.d.ts +21 -0
- package/dist/i-contribution-entry-rejection.d.ts.map +1 -0
- package/dist/i-contribution-entry-rejection.js +1 -0
- package/dist/i-contribution-file-issue.d.ts +18 -0
- package/dist/i-contribution-file-issue.d.ts.map +1 -0
- package/dist/i-contribution-file-issue.js +1 -0
- package/dist/i-contribution-file-report.d.ts +40 -0
- package/dist/i-contribution-file-report.d.ts.map +1 -0
- package/dist/i-contribution-file-report.js +1 -0
- package/dist/i-contribution-file-validation.d.ts +32 -0
- package/dist/i-contribution-file-validation.d.ts.map +1 -0
- package/dist/i-contribution-file-validation.js +1 -0
- package/dist/i-contributions-report.d.ts +31 -0
- package/dist/i-contributions-report.d.ts.map +1 -0
- package/dist/i-contributions-report.js +1 -0
- package/dist/i-convention-applicability-reason.d.ts +29 -0
- package/dist/i-convention-applicability-reason.d.ts.map +1 -0
- package/dist/i-convention-applicability-reason.js +1 -0
- package/dist/i-convention-applicability.d.ts +9 -0
- package/dist/i-convention-applicability.d.ts.map +1 -0
- package/dist/i-convention-applicability.js +1 -0
- package/dist/i-convention-scope.d.ts +19 -0
- package/dist/i-convention-scope.d.ts.map +1 -0
- package/dist/i-convention-scope.js +1 -0
- package/dist/i-declared-xref-field.d.ts +25 -0
- package/dist/i-declared-xref-field.d.ts.map +1 -0
- package/dist/i-declared-xref-field.js +1 -0
- package/dist/i-declared-xref-issue.d.ts +25 -0
- package/dist/i-declared-xref-issue.d.ts.map +1 -0
- package/dist/i-declared-xref-issue.js +1 -0
- package/dist/i-declared-xref-report.d.ts +48 -0
- package/dist/i-declared-xref-report.d.ts.map +1 -0
- package/dist/i-declared-xref-report.js +1 -0
- package/dist/i-declared-xref-row.d.ts +29 -0
- package/dist/i-declared-xref-row.d.ts.map +1 -0
- package/dist/i-declared-xref-row.js +1 -0
- package/dist/i-doctor-verdict.d.ts +10 -0
- package/dist/i-doctor-verdict.d.ts.map +1 -0
- package/dist/i-doctor-verdict.js +1 -0
- package/dist/i-file-language.d.ts +11 -0
- package/dist/i-file-language.d.ts.map +1 -0
- package/dist/i-file-language.js +1 -0
- package/dist/i-kind-outcomes.d.ts +13 -0
- package/dist/i-kind-outcomes.d.ts.map +1 -0
- package/dist/i-kind-outcomes.js +1 -0
- package/dist/i-not-applicable-convention.d.ts +17 -0
- package/dist/i-not-applicable-convention.d.ts.map +1 -0
- package/dist/i-not-applicable-convention.js +1 -0
- package/dist/i-pack-doctor-verdict.d.ts +15 -0
- package/dist/i-pack-doctor-verdict.d.ts.map +1 -0
- package/dist/i-pack-doctor-verdict.js +1 -0
- package/dist/i-probed-id-field.d.ts +17 -0
- package/dist/i-probed-id-field.d.ts.map +1 -0
- package/dist/i-probed-id-field.js +1 -0
- package/dist/i-reference-kind-declaration.d.ts +38 -0
- package/dist/i-reference-kind-declaration.d.ts.map +1 -0
- package/dist/i-reference-kind-declaration.js +1 -0
- package/dist/i-reference-pack-origin.d.ts +13 -0
- package/dist/i-reference-pack-origin.d.ts.map +1 -0
- package/dist/i-reference-pack-origin.js +1 -0
- package/dist/i-reference-warm-options.d.ts +21 -0
- package/dist/i-reference-warm-options.d.ts.map +1 -0
- package/dist/i-reference-warm-options.js +1 -0
- package/dist/i-registry-outcomes.d.ts +16 -0
- package/dist/i-registry-outcomes.d.ts.map +1 -0
- package/dist/i-registry-outcomes.js +1 -0
- package/dist/i-scaffold-pattern-doctor-report.d.ts +35 -0
- package/dist/i-scaffold-pattern-doctor-report.d.ts.map +1 -0
- package/dist/i-scaffold-pattern-doctor-report.js +1 -0
- package/dist/i-search-tuning-key-probe.d.ts +30 -0
- package/dist/i-search-tuning-key-probe.d.ts.map +1 -0
- package/dist/i-search-tuning-key-probe.js +1 -0
- package/dist/i-search-tuning-lint-issue.d.ts +61 -0
- package/dist/i-search-tuning-lint-issue.d.ts.map +1 -0
- package/dist/i-search-tuning-lint-issue.js +1 -0
- package/dist/i-search-tuning-lint-report.d.ts +38 -0
- package/dist/i-search-tuning-lint-report.d.ts.map +1 -0
- package/dist/i-search-tuning-lint-report.js +1 -0
- package/dist/i-stale-path-hint-input.d.ts +18 -0
- package/dist/i-stale-path-hint-input.d.ts.map +1 -0
- package/dist/i-stale-path-hint-input.js +1 -0
- package/dist/i-unresolvable-reference-scan.d.ts +14 -0
- package/dist/i-unresolvable-reference-scan.d.ts.map +1 -0
- package/dist/i-unresolvable-reference-scan.js +1 -0
- package/dist/i-unresolvable-reference.d.ts +29 -0
- package/dist/i-unresolvable-reference.d.ts.map +1 -0
- package/dist/i-unresolvable-reference.js +1 -0
- package/dist/i-unverifiable-remedy-group.d.ts +10 -0
- package/dist/i-unverifiable-remedy-group.d.ts.map +1 -0
- package/dist/i-unverifiable-remedy-group.js +1 -0
- package/dist/i-workspace-profile-payload.d.ts +12 -0
- package/dist/i-workspace-profile-payload.d.ts.map +1 -0
- package/dist/i-workspace-profile-payload.js +1 -0
- package/dist/impact-analysis.d.ts +15 -0
- package/dist/impact-analysis.d.ts.map +1 -1
- package/dist/impact-analysis.js +58 -13
- package/dist/impact-render.d.ts.map +1 -1
- package/dist/impact-render.js +22 -0
- package/dist/import-hygiene.d.ts +35 -1
- package/dist/import-hygiene.d.ts.map +1 -1
- package/dist/import-hygiene.js +107 -13
- package/dist/index.d.ts +158 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +197 -0
- package/dist/inspection-discovery.d.ts +45 -0
- package/dist/inspection-discovery.d.ts.map +1 -0
- package/dist/inspection-discovery.js +70 -0
- package/dist/knowledge-advisory-code.d.ts +17 -0
- package/dist/knowledge-advisory-code.d.ts.map +1 -0
- package/dist/knowledge-advisory-code.js +17 -0
- package/dist/knowledge-aged-entry.d.ts +10 -0
- package/dist/knowledge-aged-entry.d.ts.map +1 -0
- package/dist/knowledge-aged-entry.js +1 -0
- package/dist/knowledge-authoring.d.ts +25 -2
- package/dist/knowledge-authoring.d.ts.map +1 -1
- package/dist/knowledge-authoring.js +53 -13
- package/dist/knowledge-contribution-slots.d.ts +18 -0
- package/dist/knowledge-contribution-slots.d.ts.map +1 -0
- package/dist/knowledge-contribution-slots.js +25 -0
- package/dist/knowledge-entry-rejections.d.ts +17 -0
- package/dist/knowledge-entry-rejections.d.ts.map +1 -0
- package/dist/knowledge-entry-rejections.js +79 -0
- package/dist/knowledge-entry-verdict-record.d.ts +34 -0
- package/dist/knowledge-entry-verdict-record.d.ts.map +1 -0
- package/dist/knowledge-entry-verdict-record.js +1 -0
- package/dist/knowledge-entry-verdict.d.ts +17 -0
- package/dist/knowledge-entry-verdict.d.ts.map +1 -0
- package/dist/knowledge-entry-verdict.js +17 -0
- package/dist/knowledge-graph.d.ts +6 -0
- package/dist/knowledge-graph.d.ts.map +1 -1
- package/dist/knowledge-graph.js +18 -7
- package/dist/knowledge-kind-bucket.d.ts +19 -0
- package/dist/knowledge-kind-bucket.d.ts.map +1 -0
- package/dist/knowledge-kind-bucket.js +1 -0
- package/dist/knowledge-load-failure.d.ts +23 -0
- package/dist/knowledge-load-failure.d.ts.map +1 -0
- package/dist/knowledge-load-failure.js +1 -0
- package/dist/knowledge-min-referenced-valve.d.ts +12 -0
- package/dist/knowledge-min-referenced-valve.d.ts.map +1 -0
- package/dist/knowledge-min-referenced-valve.js +12 -0
- package/dist/knowledge-reference-kind-bucket.d.ts +11 -0
- package/dist/knowledge-reference-kind-bucket.d.ts.map +1 -0
- package/dist/knowledge-reference-kind-bucket.js +1 -0
- package/dist/knowledge-rejected-entry.d.ts +28 -0
- package/dist/knowledge-rejected-entry.d.ts.map +1 -0
- package/dist/knowledge-rejected-entry.js +1 -0
- package/dist/knowledge-rename-command.d.ts +20 -0
- package/dist/knowledge-rename-command.d.ts.map +1 -0
- package/dist/knowledge-rename-command.js +34 -0
- package/dist/knowledge-rename-verb.d.ts +11 -0
- package/dist/knowledge-rename-verb.d.ts.map +1 -0
- package/dist/knowledge-rename-verb.js +11 -0
- package/dist/knowledge-rename.d.ts +1 -1
- package/dist/knowledge-rename.d.ts.map +1 -1
- package/dist/knowledge-rename.js +6 -5
- package/dist/knowledge-stale-advisory.d.ts +14 -0
- package/dist/knowledge-stale-advisory.d.ts.map +1 -0
- package/dist/knowledge-stale-advisory.js +1 -0
- package/dist/knowledge-stale-coverage.d.ts +19 -0
- package/dist/knowledge-stale-coverage.d.ts.map +1 -0
- package/dist/knowledge-stale-coverage.js +1 -0
- package/dist/knowledge-stale-gate-flags.d.ts +33 -0
- package/dist/knowledge-stale-gate-flags.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-flags.js +1 -0
- package/dist/knowledge-stale-gate-input.d.ts +46 -0
- package/dist/knowledge-stale-gate-input.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-input.js +1 -0
- package/dist/knowledge-stale-gate-result.d.ts +33 -0
- package/dist/knowledge-stale-gate-result.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-result.js +1 -0
- package/dist/knowledge-stale-gate-rule.d.ts +33 -0
- package/dist/knowledge-stale-gate-rule.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-rule.js +1 -0
- package/dist/knowledge-stale-gate-violation.d.ts +13 -0
- package/dist/knowledge-stale-gate-violation.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-violation.js +1 -0
- package/dist/knowledge-stale-gate.d.ts +85 -0
- package/dist/knowledge-stale-gate.d.ts.map +1 -0
- package/dist/knowledge-stale-gate.js +501 -0
- package/dist/knowledge-stale-quality-gate.d.ts +26 -0
- package/dist/knowledge-stale-quality-gate.d.ts.map +1 -0
- package/dist/knowledge-stale-quality-gate.js +140 -0
- package/dist/knowledge-stale.d.ts +132 -9
- package/dist/knowledge-stale.d.ts.map +1 -1
- package/dist/knowledge-stale.js +1193 -294
- package/dist/knowledge-unverifiable-reason.d.ts +12 -0
- package/dist/knowledge-unverifiable-reason.d.ts.map +1 -0
- package/dist/knowledge-unverifiable-reason.js +12 -0
- package/dist/knowledge-unverifiable-remedy.d.ts +56 -0
- package/dist/knowledge-unverifiable-remedy.d.ts.map +1 -0
- package/dist/knowledge-unverifiable-remedy.js +0 -0
- package/dist/loader-diagnostics.d.ts +14 -2
- package/dist/loader-diagnostics.d.ts.map +1 -1
- package/dist/match-terms.d.ts +48 -0
- package/dist/match-terms.d.ts.map +1 -0
- package/dist/match-terms.js +155 -0
- package/dist/migration-profile-registry.d.ts +10 -0
- package/dist/migration-profile-registry.d.ts.map +1 -1
- package/dist/migration-profile-registry.js +57 -34
- package/dist/migration-readiness.d.ts.map +1 -1
- package/dist/migration-readiness.js +1 -3
- package/dist/nearest-id.d.ts +10 -26
- package/dist/nearest-id.d.ts.map +1 -1
- package/dist/nearest-id.js +9 -59
- package/dist/pack-asset-freshness.d.ts +65 -0
- package/dist/pack-asset-freshness.d.ts.map +1 -0
- package/dist/pack-asset-freshness.js +340 -0
- package/dist/pack-author-ux.d.ts +24 -3
- package/dist/pack-author-ux.d.ts.map +1 -1
- package/dist/pack-author-ux.js +87 -93
- package/dist/pack-contributions-inventory.d.ts +79 -39
- package/dist/pack-contributions-inventory.d.ts.map +1 -1
- package/dist/pack-contributions-inventory.js +445 -286
- package/dist/pack-doctor-verdict.d.ts +29 -0
- package/dist/pack-doctor-verdict.d.ts.map +1 -0
- package/dist/pack-doctor-verdict.js +45 -0
- package/dist/pack-doctor.d.ts +74 -1
- package/dist/pack-doctor.d.ts.map +1 -1
- package/dist/pack-doctor.js +281 -1
- package/dist/pack-helper-plan.d.ts +24 -0
- package/dist/pack-helper-plan.d.ts.map +1 -0
- package/dist/pack-helper-plan.js +77 -0
- package/dist/pack-helper-registry.d.ts +14 -0
- package/dist/pack-helper-registry.d.ts.map +1 -1
- package/dist/pack-helper-registry.js +76 -37
- package/dist/pack-manifest-reader.d.ts +8 -0
- package/dist/pack-manifest-reader.d.ts.map +1 -0
- package/dist/pack-manifest-reader.js +79 -0
- package/dist/pack-release-check.d.ts +14 -1
- package/dist/pack-release-check.d.ts.map +1 -1
- package/dist/pack-release-check.js +23 -1
- package/dist/pack-signature-status.d.ts +18 -6
- package/dist/pack-signature-status.d.ts.map +1 -1
- package/dist/pack-signature-status.js +59 -105
- package/dist/pack-test-runner.d.ts +27 -5
- package/dist/pack-test-runner.d.ts.map +1 -1
- package/dist/pack-test-runner.js +91 -35
- package/dist/pack-typecheck.d.ts +8 -0
- package/dist/pack-typecheck.d.ts.map +1 -0
- package/dist/pack-typecheck.js +76 -0
- package/dist/plan-review.d.ts +2 -0
- package/dist/plan-review.d.ts.map +1 -1
- package/dist/plan-review.js +17 -5
- package/dist/plan-simulation.d.ts.map +1 -1
- package/dist/plan-simulation.js +16 -5
- package/dist/playbook-load-issue.d.ts +16 -0
- package/dist/playbook-load-issue.d.ts.map +1 -0
- package/dist/playbook-load-issue.js +1 -0
- package/dist/playbook-registry.d.ts +32 -1
- package/dist/playbook-registry.d.ts.map +1 -1
- package/dist/playbook-registry.js +144 -55
- package/dist/policy-declaration.d.ts +18 -0
- package/dist/policy-declaration.d.ts.map +1 -0
- package/dist/policy-declaration.js +1 -0
- package/dist/policy-engine.d.ts +8 -0
- package/dist/policy-engine.d.ts.map +1 -1
- package/dist/policy-engine.js +26 -9
- package/dist/policy-overrides.d.ts.map +1 -1
- package/dist/policy-overrides.js +4 -4
- package/dist/policy-registry.d.ts +27 -0
- package/dist/policy-registry.d.ts.map +1 -1
- package/dist/policy-registry.js +87 -20
- package/dist/probed-id-fields.d.ts +21 -0
- package/dist/probed-id-fields.d.ts.map +1 -0
- package/dist/probed-id-fields.js +25 -0
- package/dist/probed-id-source.d.ts +11 -0
- package/dist/probed-id-source.d.ts.map +1 -0
- package/dist/probed-id-source.js +11 -0
- package/dist/profile-registry.d.ts +25 -2
- package/dist/profile-registry.d.ts.map +1 -1
- package/dist/profile-registry.js +59 -6
- package/dist/propose-knowledge.js +3 -2
- package/dist/quality-gate-examination.d.ts +15 -0
- package/dist/quality-gate-examination.d.ts.map +1 -0
- package/dist/quality-gate-examination.js +15 -0
- package/dist/quality-gate-row-status.d.ts +19 -0
- package/dist/quality-gate-row-status.d.ts.map +1 -0
- package/dist/quality-gate-row-status.js +28 -0
- package/dist/quality-gate-status.d.ts +16 -0
- package/dist/quality-gate-status.d.ts.map +1 -0
- package/dist/quality-gate-status.js +16 -0
- package/dist/quality-html.d.ts.map +1 -1
- package/dist/quality-html.js +14 -3
- package/dist/quality-report-coverage.d.ts +26 -0
- package/dist/quality-report-coverage.d.ts.map +1 -0
- package/dist/quality-report-coverage.js +48 -0
- package/dist/quality-report.d.ts +28 -1
- package/dist/quality-report.d.ts.map +1 -1
- package/dist/quality-report.js +263 -35
- package/dist/query-intent-kind.d.ts +18 -0
- package/dist/query-intent-kind.d.ts.map +1 -0
- package/dist/query-intent-kind.js +18 -0
- package/dist/query-intent-result.d.ts +23 -0
- package/dist/query-intent-result.d.ts.map +1 -0
- package/dist/query-intent-result.js +1 -0
- package/dist/query-intent.d.ts +18 -0
- package/dist/query-intent.d.ts.map +1 -0
- package/dist/query-intent.js +336 -0
- package/dist/query-resolver.d.ts +18 -0
- package/dist/query-resolver.d.ts.map +1 -1
- package/dist/query-resolver.js +7 -4
- package/dist/ranked-recommendations.d.ts +36 -0
- package/dist/ranked-recommendations.d.ts.map +1 -0
- package/dist/ranked-recommendations.js +1 -0
- package/dist/ranker-explainability.d.ts.map +1 -1
- package/dist/ranker-explainability.js +38 -10
- package/dist/recommend-recipe.d.ts +17 -0
- package/dist/recommend-recipe.d.ts.map +1 -0
- package/dist/recommend-recipe.js +1 -0
- package/dist/recommend-recipes.d.ts +9 -0
- package/dist/recommend-recipes.d.ts.map +1 -0
- package/dist/recommend-recipes.js +106 -0
- package/dist/recommendation-candidate.d.ts +30 -0
- package/dist/recommendation-candidate.d.ts.map +1 -0
- package/dist/recommendation-candidate.js +1 -0
- package/dist/recommendation-confidence.d.ts +27 -0
- package/dist/recommendation-confidence.d.ts.map +1 -0
- package/dist/recommendation-confidence.js +1 -0
- package/dist/recommendation-ranking-options.d.ts +24 -0
- package/dist/recommendation-ranking-options.d.ts.map +1 -0
- package/dist/recommendation-ranking-options.js +1 -0
- package/dist/recommendation-ranking.d.ts +50 -0
- package/dist/recommendation-ranking.d.ts.map +1 -0
- package/dist/recommendation-ranking.js +527 -0
- package/dist/recommendation-source.d.ts +23 -0
- package/dist/recommendation-source.d.ts.map +1 -0
- package/dist/recommendation-source.js +23 -0
- package/dist/recommendation-suppression.d.ts +14 -0
- package/dist/recommendation-suppression.d.ts.map +1 -0
- package/dist/recommendation-suppression.js +14 -0
- package/dist/reference-asset-kind.d.ts +14 -0
- package/dist/reference-asset-kind.d.ts.map +1 -0
- package/dist/reference-asset-kind.js +14 -0
- package/dist/reference-content-check.d.ts +32 -0
- package/dist/reference-content-check.d.ts.map +1 -0
- package/dist/reference-content-check.js +143 -0
- package/dist/reference-failure.d.ts +31 -0
- package/dist/reference-failure.d.ts.map +1 -0
- package/dist/reference-failure.js +31 -0
- package/dist/reference-id-status.d.ts +15 -0
- package/dist/reference-id-status.d.ts.map +1 -0
- package/dist/reference-id-status.js +15 -0
- package/dist/reference-kind-declarations.d.ts +42 -0
- package/dist/reference-kind-declarations.d.ts.map +1 -0
- package/dist/reference-kind-declarations.js +142 -0
- package/dist/reference-lookup.d.ts +6 -0
- package/dist/reference-lookup.d.ts.map +1 -1
- package/dist/reference-lookup.js +13 -5
- package/dist/reference-pack-origin.d.ts +18 -0
- package/dist/reference-pack-origin.d.ts.map +1 -0
- package/dist/reference-pack-origin.js +38 -0
- package/dist/reference-registry.d.ts +109 -11
- package/dist/reference-registry.d.ts.map +1 -1
- package/dist/reference-registry.js +186 -30
- package/dist/reference-subject.d.ts +20 -0
- package/dist/reference-subject.d.ts.map +1 -0
- package/dist/reference-subject.js +1 -0
- package/dist/registration-hint-discovery-status.d.ts +25 -0
- package/dist/registration-hint-discovery-status.d.ts.map +1 -0
- package/dist/registration-hint-discovery-status.js +25 -0
- package/dist/registration-hint-registry.d.ts +80 -0
- package/dist/registration-hint-registry.d.ts.map +1 -1
- package/dist/registration-hint-registry.js +356 -138
- package/dist/registry-lifecycle.d.ts +200 -19
- package/dist/registry-lifecycle.d.ts.map +1 -1
- package/dist/registry-lifecycle.js +526 -136
- package/dist/release-readiness.d.ts.map +1 -1
- package/dist/release-readiness.js +10 -7
- package/dist/release-smoke.d.ts.map +1 -1
- package/dist/release-smoke.js +11 -7
- package/dist/report-site.d.ts.map +1 -1
- package/dist/report-site.js +25 -7
- package/dist/repository-intelligence.d.ts.map +1 -1
- package/dist/repository-intelligence.js +3 -2
- package/dist/repository-knowledge-model.d.ts.map +1 -1
- package/dist/repository-knowledge-model.js +18 -5
- package/dist/repository-stats.d.ts.map +1 -1
- package/dist/repository-stats.js +3 -77
- package/dist/resolve-project-config.d.ts +64 -0
- package/dist/resolve-project-config.d.ts.map +1 -1
- package/dist/resolve-project-config.js +250 -33
- package/dist/reuse/compute-reuse-coverage.d.ts +29 -0
- package/dist/reuse/compute-reuse-coverage.d.ts.map +1 -0
- package/dist/reuse/compute-reuse-coverage.js +198 -0
- package/dist/reuse/rank-reuse-candidates.d.ts +38 -0
- package/dist/reuse/rank-reuse-candidates.d.ts.map +1 -0
- package/dist/reuse/rank-reuse-candidates.js +212 -0
- package/dist/reuse/rank-reuse-options.d.ts +20 -0
- package/dist/reuse/rank-reuse-options.d.ts.map +1 -0
- package/dist/reuse/rank-reuse-options.js +1 -0
- package/dist/reuse/rank-reuse-suggestions.d.ts +15 -0
- package/dist/reuse/rank-reuse-suggestions.d.ts.map +1 -0
- package/dist/reuse/rank-reuse-suggestions.js +31 -0
- package/dist/reuse/resolve-curated-reuse.d.ts +43 -0
- package/dist/reuse/resolve-curated-reuse.d.ts.map +1 -0
- package/dist/reuse/resolve-curated-reuse.js +115 -0
- package/dist/reuse/reuse-candidate.d.ts +29 -0
- package/dist/reuse/reuse-candidate.d.ts.map +1 -0
- package/dist/reuse/reuse-candidate.js +1 -0
- package/dist/reuse/reuse-coverage-report.d.ts +74 -0
- package/dist/reuse/reuse-coverage-report.d.ts.map +1 -0
- package/dist/reuse/reuse-coverage-report.js +1 -0
- package/dist/reuse/reuse-curated-coverage.d.ts +36 -0
- package/dist/reuse/reuse-curated-coverage.d.ts.map +1 -0
- package/dist/reuse/reuse-curated-coverage.js +1 -0
- package/dist/reuse/reuse-curated-resolution.d.ts +36 -0
- package/dist/reuse/reuse-curated-resolution.d.ts.map +1 -0
- package/dist/reuse/reuse-curated-resolution.js +1 -0
- package/dist/reuse/reuse-curated-status.d.ts +21 -0
- package/dist/reuse/reuse-curated-status.d.ts.map +1 -0
- package/dist/reuse/reuse-curated-status.js +21 -0
- package/dist/reuse/reuse-match-detail.d.ts +15 -0
- package/dist/reuse/reuse-match-detail.d.ts.map +1 -0
- package/dist/reuse/reuse-match-detail.js +1 -0
- package/dist/reuse/reuse-ranking.d.ts +37 -0
- package/dist/reuse/reuse-ranking.d.ts.map +1 -0
- package/dist/reuse/reuse-ranking.js +1 -0
- package/dist/reuse/reuse-suggestion.d.ts +19 -0
- package/dist/reuse/reuse-suggestion.d.ts.map +1 -0
- package/dist/reuse/reuse-suggestion.js +1 -0
- package/dist/reuse/reuse-symbol-lookup.d.ts +28 -0
- package/dist/reuse/reuse-symbol-lookup.d.ts.map +1 -0
- package/dist/reuse/reuse-symbol-lookup.js +1 -0
- package/dist/reuse/reuse-tokenize.d.ts +11 -0
- package/dist/reuse/reuse-tokenize.d.ts.map +1 -0
- package/dist/reuse/reuse-tokenize.js +26 -0
- package/dist/reuse/score-reuse-name.d.ts +16 -0
- package/dist/reuse/score-reuse-name.d.ts.map +1 -0
- package/dist/reuse/score-reuse-name.js +35 -0
- package/dist/reuse/score-reuse-primitive.d.ts +33 -0
- package/dist/reuse/score-reuse-primitive.d.ts.map +1 -0
- package/dist/reuse/score-reuse-primitive.js +92 -0
- package/dist/review-packet.d.ts +2 -0
- package/dist/review-packet.d.ts.map +1 -1
- package/dist/review-packet.js +13 -6
- package/dist/role-views.d.ts.map +1 -1
- package/dist/role-views.js +16 -16
- package/dist/routing-recommends-channels.d.ts +24 -0
- package/dist/routing-recommends-channels.d.ts.map +1 -0
- package/dist/routing-recommends-channels.js +19 -0
- package/dist/run-boundary-check.d.ts +118 -0
- package/dist/run-boundary-check.d.ts.map +1 -0
- package/dist/run-boundary-check.js +592 -0
- package/dist/safety-audit.js +1 -1
- package/dist/scaffold-coverage.js +1 -1
- package/dist/scaffold-pattern-doctor-report.d.ts +19 -0
- package/dist/scaffold-pattern-doctor-report.d.ts.map +1 -0
- package/dist/scaffold-pattern-doctor-report.js +54 -0
- package/dist/scaffold-patterns.d.ts +75 -1
- package/dist/scaffold-patterns.d.ts.map +1 -1
- package/dist/scaffold-patterns.js +375 -84
- package/dist/schema-inventory.d.ts.map +1 -1
- package/dist/schema-inventory.js +4 -3
- package/dist/search-document-id.d.ts +52 -0
- package/dist/search-document-id.d.ts.map +1 -0
- package/dist/search-document-id.js +72 -0
- package/dist/search-document-prefix.d.ts +7 -0
- package/dist/search-document-prefix.d.ts.map +1 -0
- package/dist/search-document-prefix.js +1 -0
- package/dist/search-index.d.ts.map +1 -1
- package/dist/search-index.js +20 -23
- package/dist/search-tuning-explain.d.ts +6 -0
- package/dist/search-tuning-explain.d.ts.map +1 -1
- package/dist/search-tuning-explain.js +19 -17
- package/dist/search-tuning-key-probes.d.ts +16 -0
- package/dist/search-tuning-key-probes.d.ts.map +1 -0
- package/dist/search-tuning-key-probes.js +65 -0
- package/dist/search-tuning-key-resolution.d.ts +25 -0
- package/dist/search-tuning-key-resolution.d.ts.map +1 -0
- package/dist/search-tuning-key-resolution.js +1 -0
- package/dist/search-tuning-key-resolver.d.ts +4 -0
- package/dist/search-tuning-key-resolver.d.ts.map +1 -0
- package/dist/search-tuning-key-resolver.js +107 -0
- package/dist/search-tuning-key-status.d.ts +24 -0
- package/dist/search-tuning-key-status.d.ts.map +1 -0
- package/dist/search-tuning-key-status.js +24 -0
- package/dist/search-tuning-lint.d.ts +9 -0
- package/dist/search-tuning-lint.d.ts.map +1 -0
- package/dist/search-tuning-lint.js +468 -0
- package/dist/search-tuning-registry.d.ts +43 -0
- package/dist/search-tuning-registry.d.ts.map +1 -1
- package/dist/search-tuning-registry.js +214 -49
- package/dist/self-audit.d.ts +12 -0
- package/dist/self-audit.d.ts.map +1 -1
- package/dist/self-audit.js +36 -10
- package/dist/self-config-doctor-v2.d.ts +145 -3
- package/dist/self-config-doctor-v2.d.ts.map +1 -1
- package/dist/self-config-doctor-v2.js +1369 -182
- package/dist/self-config-doctor.d.ts +20 -1
- package/dist/self-config-doctor.d.ts.map +1 -1
- package/dist/self-config-doctor.js +55 -281
- package/dist/settled-unit-states.d.ts +9 -0
- package/dist/settled-unit-states.d.ts.map +1 -0
- package/dist/settled-unit-states.js +14 -0
- package/dist/sharkcraft-inspector.d.ts +34 -0
- package/dist/sharkcraft-inspector.d.ts.map +1 -1
- package/dist/sharkcraft-inspector.js +314 -27
- package/dist/spec/spec-evidence.d.ts.map +1 -1
- package/dist/spec/spec-evidence.js +14 -20
- package/dist/split-identifier.d.ts +21 -0
- package/dist/split-identifier.d.ts.map +1 -0
- package/dist/split-identifier.js +27 -0
- package/dist/stale-path-hint.d.ts +3 -0
- package/dist/stale-path-hint.d.ts.map +1 -0
- package/dist/stale-path-hint.js +47 -0
- package/dist/start-here.d.ts.map +1 -1
- package/dist/start-here.js +1 -2
- package/dist/substitute-placeholders.d.ts +8 -0
- package/dist/substitute-placeholders.d.ts.map +1 -0
- package/dist/substitute-placeholders.js +9 -0
- package/dist/symbol-index.d.ts +33 -0
- package/dist/symbol-index.d.ts.map +1 -1
- package/dist/symbol-index.js +241 -3
- package/dist/symbol-member-entry.d.ts +26 -0
- package/dist/symbol-member-entry.d.ts.map +1 -0
- package/dist/symbol-member-entry.js +1 -0
- package/dist/symbol-member-kind.d.ts +14 -0
- package/dist/symbol-member-kind.d.ts.map +1 -0
- package/dist/symbol-member-kind.js +14 -0
- package/dist/task-packet.d.ts.map +1 -1
- package/dist/task-packet.js +52 -9
- package/dist/task-ranker.d.ts +8 -0
- package/dist/task-ranker.d.ts.map +1 -1
- package/dist/task-ranker.js +25 -13
- package/dist/task-risk.js +1 -1
- package/dist/task-routing-hint-registry.d.ts +20 -1
- package/dist/task-routing-hint-registry.d.ts.map +1 -1
- package/dist/task-routing-hint-registry.js +186 -42
- package/dist/template-authoring.d.ts +1 -1
- package/dist/template-authoring.d.ts.map +1 -1
- package/dist/template-authoring.js +2 -1
- package/dist/template-drift.d.ts.map +1 -1
- package/dist/template-drift.js +30 -9
- package/dist/template-lint.d.ts.map +1 -1
- package/dist/template-lint.js +160 -2
- package/dist/term-query.d.ts +10 -0
- package/dist/term-query.d.ts.map +1 -0
- package/dist/term-query.js +1 -0
- package/dist/test-definitions.d.ts +6 -3
- package/dist/test-definitions.d.ts.map +1 -1
- package/dist/test-runner.d.ts +95 -10
- package/dist/test-runner.d.ts.map +1 -1
- package/dist/test-runner.js +309 -308
- package/dist/tuning-query-tokens.d.ts +29 -0
- package/dist/tuning-query-tokens.d.ts.map +1 -0
- package/dist/tuning-query-tokens.js +51 -0
- package/dist/typecheck-files.d.ts +36 -0
- package/dist/typecheck-files.d.ts.map +1 -0
- package/dist/typecheck-files.js +158 -0
- package/dist/uncertainty.js +1 -1
- package/dist/universal-search.d.ts.map +1 -1
- package/dist/universal-search.js +5 -3
- package/dist/unregistered-exports.d.ts +19 -0
- package/dist/unregistered-exports.d.ts.map +1 -0
- package/dist/unregistered-exports.js +141 -0
- package/dist/unresolvable-reason.d.ts +11 -0
- package/dist/unresolvable-reason.d.ts.map +1 -0
- package/dist/unresolvable-reason.js +11 -0
- package/dist/upgrade-advisor.d.ts.map +1 -1
- package/dist/upgrade-advisor.js +16 -9
- package/dist/validate-contribution-file.d.ts +4 -0
- package/dist/validate-contribution-file.d.ts.map +1 -0
- package/dist/validate-contribution-file.js +233 -0
- package/dist/why-file.d.ts +3 -0
- package/dist/why-file.d.ts.map +1 -1
- package/dist/why-file.js +12 -7
- package/package.json +17 -17
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type IVerdictCoverage } from '@shrkcrft/core';
|
|
2
|
+
import type { IPackDoctorVerdict } from './i-pack-doctor-verdict.js';
|
|
3
|
+
import type { IPackDoctorReport } from './pack-doctor.js';
|
|
4
|
+
import type { ISharkcraftInspection } from './sharkcraft-inspector.js';
|
|
5
|
+
/**
|
|
6
|
+
* What a pack-doctor run examined, as coverage records:
|
|
7
|
+
*
|
|
8
|
+
* - `packs` — the discovered packs. ZERO is an empty selection: "nothing to
|
|
9
|
+
* examine", never a pass. `emptyAcceptance` is the CLI verb's
|
|
10
|
+
* `--allow-empty` valve (`allowEmptyValve(args, discovered)`); every other
|
|
11
|
+
* reader passes nothing.
|
|
12
|
+
* - `compiled artifacts` — a pack's compiled build with no build record was
|
|
13
|
+
* never compared to its source (the doctor derives this from the one
|
|
14
|
+
* freshness authority).
|
|
15
|
+
*/
|
|
16
|
+
export declare function packDoctorCoverage(report: Pick<IPackDoctorReport, 'compiledArtifactCoverage'>, inspection: ISharkcraftInspection, emptyAcceptance?: Pick<IVerdictCoverage, 'acceptedBy'>): IVerdictCoverage[];
|
|
17
|
+
/**
|
|
18
|
+
* THE settlement of one pack-doctor run, next to `doctorVerdict`:
|
|
19
|
+
* `IPackDoctorReport.passed` stays errors-only (its long-standing meaning);
|
|
20
|
+
* the verdict is core's `settleVerdict` over {@link packDoctorCoverage}.
|
|
21
|
+
*
|
|
22
|
+
* `shrk packs doctor`, MCP `doctor_packs`, the quality packs gate (`shrk
|
|
23
|
+
* quality`, MCP `get_quality_report`, the dashboard, the report site) and bare
|
|
24
|
+
* `shrk check` read this — round 11 review: the 0-packs / compiled-artifact
|
|
25
|
+
* settlement lived inline in the verb, and the other four read `passed: true`
|
|
26
|
+
* over ZERO packs.
|
|
27
|
+
*/
|
|
28
|
+
export declare function packDoctorVerdict(report: Pick<IPackDoctorReport, 'passed' | 'compiledArtifactCoverage'>, inspection: ISharkcraftInspection, emptyAcceptance?: Pick<IVerdictCoverage, 'acceptedBy'>): IPackDoctorVerdict;
|
|
29
|
+
//# sourceMappingURL=pack-doctor-verdict.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack-doctor-verdict.d.ts","sourceRoot":"","sources":["../src/pack-doctor-verdict.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,0BAA0B,CAAC,EAC3D,UAAU,EAAE,qBAAqB,EACjC,eAAe,GAAE,IAAI,CAAC,gBAAgB,EAAE,YAAY,CAAM,GACzD,gBAAgB,EAAE,CAcpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,QAAQ,GAAG,0BAA0B,CAAC,EACtE,UAAU,EAAE,qBAAqB,EACjC,eAAe,GAAE,IAAI,CAAC,gBAAgB,EAAE,YAAY,CAAM,GACzD,kBAAkB,CAKpB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { settleVerdict } from '@shrkcrft/core';
|
|
2
|
+
/**
|
|
3
|
+
* What a pack-doctor run examined, as coverage records:
|
|
4
|
+
*
|
|
5
|
+
* - `packs` — the discovered packs. ZERO is an empty selection: "nothing to
|
|
6
|
+
* examine", never a pass. `emptyAcceptance` is the CLI verb's
|
|
7
|
+
* `--allow-empty` valve (`allowEmptyValve(args, discovered)`); every other
|
|
8
|
+
* reader passes nothing.
|
|
9
|
+
* - `compiled artifacts` — a pack's compiled build with no build record was
|
|
10
|
+
* never compared to its source (the doctor derives this from the one
|
|
11
|
+
* freshness authority).
|
|
12
|
+
*/
|
|
13
|
+
export function packDoctorCoverage(report, inspection, emptyAcceptance = {}) {
|
|
14
|
+
const discovered = inspection.packs.discoveredPacks.length;
|
|
15
|
+
const coverage = [
|
|
16
|
+
{
|
|
17
|
+
unit: 'packs',
|
|
18
|
+
expected: discovered,
|
|
19
|
+
examined: discovered,
|
|
20
|
+
root: inspection.projectRoot,
|
|
21
|
+
reason: 'no installed package declares a `sharkcraft` field in its package.json',
|
|
22
|
+
...emptyAcceptance,
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
if (report.compiledArtifactCoverage)
|
|
26
|
+
coverage.push(report.compiledArtifactCoverage);
|
|
27
|
+
return coverage;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* THE settlement of one pack-doctor run, next to `doctorVerdict`:
|
|
31
|
+
* `IPackDoctorReport.passed` stays errors-only (its long-standing meaning);
|
|
32
|
+
* the verdict is core's `settleVerdict` over {@link packDoctorCoverage}.
|
|
33
|
+
*
|
|
34
|
+
* `shrk packs doctor`, MCP `doctor_packs`, the quality packs gate (`shrk
|
|
35
|
+
* quality`, MCP `get_quality_report`, the dashboard, the report site) and bare
|
|
36
|
+
* `shrk check` read this — round 11 review: the 0-packs / compiled-artifact
|
|
37
|
+
* settlement lived inline in the verb, and the other four read `passed: true`
|
|
38
|
+
* over ZERO packs.
|
|
39
|
+
*/
|
|
40
|
+
export function packDoctorVerdict(report, inspection, emptyAcceptance = {}) {
|
|
41
|
+
const coverage = packDoctorCoverage(report, inspection, emptyAcceptance);
|
|
42
|
+
const settled = settleVerdict(report.passed ? 0 : 1, coverage);
|
|
43
|
+
const packsDiscovered = inspection.packs.discoveredPacks.length;
|
|
44
|
+
return { ...settled, coverage, packsDiscovered, examinedNothing: packsDiscovered === 0 };
|
|
45
|
+
}
|
package/dist/pack-doctor.d.ts
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
import type { ISharkcraftInspection } from './sharkcraft-inspector.js';
|
|
2
|
+
import type { IVerdictCoverage } from '@shrkcrft/core';
|
|
3
|
+
import type { IDeclaredXrefReport } from './i-declared-xref-report.js';
|
|
2
4
|
import { type IPackReleaseCheck } from './pack-release-check.js';
|
|
5
|
+
import { type IContributionLoadFailure } from './contribution-load-failures.js';
|
|
6
|
+
import { ContributionKind } from './contribution-kind.js';
|
|
7
|
+
import type { IRegistryOutcomes } from './i-registry-outcomes.js';
|
|
8
|
+
import { type IUnregisteredExport } from './unregistered-exports.js';
|
|
9
|
+
import type { ITypecheckFilesResult } from './typecheck-files.js';
|
|
3
10
|
export interface IPackDoctorIssue {
|
|
4
11
|
severity: 'error' | 'warning' | 'info';
|
|
5
12
|
packageName: string;
|
|
6
|
-
code: 'invalid-manifest' | 'missing-contribution-file' | 'empty-resolved-contributions' | 'duplicate-id-local' | 'duplicate-id-pack-internal' | 'template-no-description' | 'pipeline-no-steps' | 'critical-rule-no-hints' | 'docs-file-missing' | 'unsigned-pack' | 'tampered-pack' | 'signature-unverifiable' | 'dev-signature-not-trusted' | 'preset-composition-cycle' | 'preset-composed-not-found' | 'preset-missing-ref' | 'preset-no-includes' | 'pack-verification-pm-mismatch' | 'release-manifest-issue' | 'release-contribution-issue' | 'release-signature-issue' | 'release-files-issue' | 'release-readiness-issue'
|
|
13
|
+
code: 'invalid-manifest' | 'missing-contribution-file' | 'empty-resolved-contributions' | 'duplicate-id-local' | 'duplicate-id-pack-internal' | 'template-no-description' | 'pipeline-no-steps' | 'critical-rule-no-hints' | 'docs-file-missing' | 'unsigned-pack' | 'tampered-pack' | 'signature-unverifiable' | 'dev-signature-not-trusted' | 'preset-composition-cycle' | 'preset-composed-not-found' | 'preset-missing-ref' | 'preset-no-includes' | 'pack-verification-pm-mismatch' | 'release-manifest-issue' | 'release-contribution-issue' | 'release-signature-issue' | 'release-files-issue' | 'release-readiness-issue' | 'contribution-load-failed'
|
|
14
|
+
/** Round 12 (12.1): entries a contribution file declares that its loader refused. */
|
|
15
|
+
| 'contribution-entries-rejected' | 'partially-resolved-contributions' | 'compiled-artifacts-stale' | 'compiled-artifacts-unrecorded' | 'unregistered-export' | 'typecheck-error' | 'typecheck-not-run'
|
|
16
|
+
/** A pack-contributed asset names a cross-reference id no registry has. */
|
|
17
|
+
| 'pack-xref-dangling'
|
|
18
|
+
/** …names an id that resolves only in a kind the field does not accept. */
|
|
19
|
+
| 'pack-xref-wrong-kind'
|
|
20
|
+
/** …names ids that could not be looked up (registry not warmed / empty). */
|
|
21
|
+
| 'pack-xref-unverified'
|
|
22
|
+
/** A declaration problem: unknown facet kind, supersession cycle / chain, malformed field. */
|
|
23
|
+
| 'pack-xref-invalid';
|
|
7
24
|
message: string;
|
|
8
25
|
/** Free-form suggestion. */
|
|
9
26
|
suggestion?: string;
|
|
@@ -21,6 +38,20 @@ export interface IPackDoctorReport {
|
|
|
21
38
|
};
|
|
22
39
|
/** Optional release-check payload per pack (populated when --release was passed). */
|
|
23
40
|
releaseChecks?: readonly IPackReleaseCheck[];
|
|
41
|
+
/** Per-pack typecheck results when the opt-in `--typecheck` ran (callers derive coverage from them). */
|
|
42
|
+
typecheckResults?: readonly {
|
|
43
|
+
readonly packageName: string;
|
|
44
|
+
readonly result: ITypecheckFilesResult;
|
|
45
|
+
}[];
|
|
46
|
+
/**
|
|
47
|
+
* Compiled contribution artifacts that HAVE a source, and how many of them a
|
|
48
|
+
* build record (source-map `sourcesContent` or signed digests) let the
|
|
49
|
+
* freshness authority compare. An `unrecorded` artifact was never examined,
|
|
50
|
+
* so a verdict over it is NOT VERIFIED. Absent when no pack ships a compiled
|
|
51
|
+
* artifact with a source. Derived from the same `detectPackAssetFreshness`
|
|
52
|
+
* call that emits the compiled-artifacts-* issues.
|
|
53
|
+
*/
|
|
54
|
+
compiledArtifactCoverage?: IVerdictCoverage;
|
|
24
55
|
}
|
|
25
56
|
export interface IPackDoctorOptions {
|
|
26
57
|
/** When true, unsigned packs surface as `unsigned-pack` warnings. */
|
|
@@ -36,7 +67,40 @@ export interface IPackDoctorOptions {
|
|
|
36
67
|
release?: boolean;
|
|
37
68
|
/** When true, release-check warnings escalate to errors. */
|
|
38
69
|
strict?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Load failures the async registry loaders reported (helpers, conventions,
|
|
72
|
+
* routing hints, …) — {@link buildPackDoctorReportAsync} gathers them. The
|
|
73
|
+
* inspection-time loader failures are always read from the inspection.
|
|
74
|
+
*/
|
|
75
|
+
registryLoadFailures?: readonly IContributionLoadFailure[];
|
|
76
|
+
/**
|
|
77
|
+
* What EVERY registry loader reported in one run (`collectRegistryOutcomes`)
|
|
78
|
+
* — {@link buildPackDoctorReportAsync} gathers it. Its rejections feed
|
|
79
|
+
* `contribution-entries-rejected` (round 12, 12.1); without it only the
|
|
80
|
+
* inspection-time loaders' rejections are seen.
|
|
81
|
+
*/
|
|
82
|
+
registryOutcomes?: IRegistryOutcomes;
|
|
83
|
+
/** Pack entries exported by a group module but never registered (see `detectUnregisteredExports`). */
|
|
84
|
+
unregisteredExports?: readonly IUnregisteredExport[];
|
|
85
|
+
/** Per-pack `typecheckPackAssets` results (the opt-in `--typecheck`). */
|
|
86
|
+
typecheckResults?: readonly {
|
|
87
|
+
readonly packageName: string;
|
|
88
|
+
readonly result: ITypecheckFilesResult;
|
|
89
|
+
}[];
|
|
90
|
+
/**
|
|
91
|
+
* THE declared cross-reference report (`buildDeclaredXrefReport`, warmed) —
|
|
92
|
+
* {@link buildPackDoctorReportAsync} gathers it. Without it the sync doctor
|
|
93
|
+
* collects on the caller's warm state: a cold cache yields `unverified`
|
|
94
|
+
* rows, never a false dangling id.
|
|
95
|
+
*/
|
|
96
|
+
declaredXrefs?: IDeclaredXrefReport;
|
|
39
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* THE build-time pointer printed next to a rejected entry (round 12, 12.1f):
|
|
100
|
+
* the runtime validator caught it; an annotated asset makes `--typecheck`
|
|
101
|
+
* catch it before the pack ships.
|
|
102
|
+
*/
|
|
103
|
+
export declare function rejectedEntryTypecheckHint(kind: ContributionKind, pack: string): string;
|
|
40
104
|
/**
|
|
41
105
|
* Full structural + quality audit of every discovered pack. Returns a list of
|
|
42
106
|
* issues (error / warning / info) plus an aggregated pass flag.
|
|
@@ -46,6 +110,15 @@ export interface IPackDoctorOptions {
|
|
|
46
110
|
* else is a warning — useful for pack authors, not fatal.
|
|
47
111
|
*/
|
|
48
112
|
export declare function buildPackDoctorReport(inspection: ISharkcraftInspection, options?: IPackDoctorOptions): IPackDoctorReport;
|
|
113
|
+
/**
|
|
114
|
+
* The pack doctor with every ASYNC input gathered first: the registry loaders'
|
|
115
|
+
* load failures, unregistered group-module exports, and (opt-in) a typecheck
|
|
116
|
+
* of each pack's TS assets. `packs doctor` and the MCP doctor tools share it,
|
|
117
|
+
* so both report the same issues.
|
|
118
|
+
*/
|
|
119
|
+
export declare function buildPackDoctorReportAsync(inspection: ISharkcraftInspection, options?: IPackDoctorOptions & {
|
|
120
|
+
readonly typecheck?: boolean;
|
|
121
|
+
}): Promise<IPackDoctorReport>;
|
|
49
122
|
/** Run pack-release-check for every valid discovered pack and return the
|
|
50
123
|
* results. Async because contribution loading uses dynamic imports. */
|
|
51
124
|
export declare function runPackReleaseChecksForReport(inspection: ISharkcraftInspection): Promise<IPackReleaseCheck[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pack-doctor.d.ts","sourceRoot":"","sources":["../src/pack-doctor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"pack-doctor.d.ts","sourceRoot":"","sources":["../src/pack-doctor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAkBvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,EAKL,KAAK,wBAAwB,EAC9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAElE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EACA,kBAAkB,GAClB,2BAA2B,GAC3B,8BAA8B,GAC9B,oBAAoB,GACpB,4BAA4B,GAC5B,yBAAyB,GACzB,mBAAmB,GACnB,wBAAwB,GACxB,mBAAmB,GACnB,eAAe,GACf,eAAe,GACf,wBAAwB,GACxB,2BAA2B,GAC3B,0BAA0B,GAC1B,2BAA2B,GAC3B,oBAAoB,GACpB,oBAAoB,GACpB,+BAA+B,GAC/B,wBAAwB,GACxB,4BAA4B,GAC5B,yBAAyB,GACzB,qBAAqB,GACrB,yBAAyB,GACzB,0BAA0B;IAC5B,qFAAqF;OACnF,+BAA+B,GAC/B,kCAAkC,GAClC,0BAA0B,GAC1B,+BAA+B,GAC/B,qBAAqB,GACrB,iBAAiB,GACjB,mBAAmB;IACrB,2EAA2E;OACzE,oBAAoB;IACtB,2EAA2E;OACzE,sBAAsB;IACxB,4EAA4E;OAC1E,sBAAsB;IACxB,8FAA8F;OAC5F,mBAAmB,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,qFAAqF;IACrF,aAAa,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC7C,wGAAwG;IACxG,gBAAgB,CAAC,EAAE,SAAS;QAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAA;KAAE,EAAE,CAAC;IACvG;;;;;;;OAOG;IACH,wBAAwB,CAAC,EAAE,gBAAgB,CAAC;CAC7C;AAED,MAAM,WAAW,kBAAkB;IACjC,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,qFAAqF;IACrF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,SAAS,wBAAwB,EAAE,CAAC;IAC3D;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC,sGAAsG;IACtG,mBAAmB,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACrD,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,SAAS;QAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAA;KAAE,EAAE,CAAC;IACvG;;;;;OAKG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACrC;AAuCD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAOvF;AAsDD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,qBAAqB,EACjC,OAAO,GAAE,kBAAuB,GAC/B,iBAAiB,CAqfnB;AAED;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAC9C,UAAU,EAAE,qBAAqB,EACjC,OAAO,GAAE,kBAAkB,GAAG;IAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAO,GAClE,OAAO,CAAC,iBAAiB,CAAC,CAqB5B;AAgBD;wEACwE;AACxE,wBAAsB,6BAA6B,CACjD,UAAU,EAAE,qBAAqB,GAChC,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAa9B;AAED;8CAC8C;AAC9C,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,qBAAqB,EACjC,MAAM,EAAE,iBAAiB,EACzB,aAAa,EAAE,SAAS,iBAAiB,EAAE,EAC3C,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACjC,iBAAiB,CAoCnB"}
|
package/dist/pack-doctor.js
CHANGED
|
@@ -3,8 +3,16 @@ import { PackageManager, WorkspaceProfile, } from '@shrkcrft/workspace';
|
|
|
3
3
|
import { PipelineStepType } from '@shrkcrft/pipelines';
|
|
4
4
|
import { resolvePreset, resolvePresetReferences } from '@shrkcrft/presets';
|
|
5
5
|
import { PACK_SECRET_ENV, verifyPackManifest } from '@shrkcrft/plugin-api';
|
|
6
|
+
import * as nodePath from 'node:path';
|
|
6
7
|
import { inspectionReferenceLookup } from "./reference-lookup.js";
|
|
8
|
+
import { buildDeclaredXrefReport, collectDeclaredXrefs, isBrokenXref, } from "./declared-cross-references.js";
|
|
9
|
+
import { DeclaredXrefStatus } from "./declared-xref-status.js";
|
|
7
10
|
import { runPackReleaseCheck } from "./pack-release-check.js";
|
|
11
|
+
import { collectContributionLoadFailures, collectContributionRejections, collectRegistryOutcomes, formatEntryRejection, } from "./contribution-load-failures.js";
|
|
12
|
+
import { ContributionKind } from "./contribution-kind.js";
|
|
13
|
+
import { describePackAssetFreshness, detectPackAssetFreshness } from "./pack-asset-freshness.js";
|
|
14
|
+
import { detectUnregisteredExports } from "./unregistered-exports.js";
|
|
15
|
+
import { typecheckPackAssets } from "./pack-typecheck.js";
|
|
8
16
|
const GEN_KEYWORDS = ['generate', 'create', 'add', 'refactor', 'test', 'review'];
|
|
9
17
|
function appliesToGeneration(e) {
|
|
10
18
|
for (const a of e.appliesWhen ?? []) {
|
|
@@ -18,6 +26,42 @@ function isCriticalOrHigh(e) {
|
|
|
18
26
|
const p = String(e.priority);
|
|
19
27
|
return p === 'critical' || p === 'high';
|
|
20
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* The `@shrkcrft/plugin-api` authoring type an asset of each kind can be
|
|
31
|
+
* annotated with (`satisfies I<Kind>[]`), so `--typecheck` fails a missing
|
|
32
|
+
* required field at build time. A kind with no published type is absent.
|
|
33
|
+
*/
|
|
34
|
+
const ASSET_TYPE_BY_KIND = {
|
|
35
|
+
[ContributionKind.Knowledge]: 'IKnowledgeEntry',
|
|
36
|
+
[ContributionKind.Rule]: 'IKnowledgeEntry',
|
|
37
|
+
[ContributionKind.Path]: 'IKnowledgeEntry',
|
|
38
|
+
[ContributionKind.PathConvention]: 'IKnowledgeEntry',
|
|
39
|
+
[ContributionKind.Template]: 'ITemplateDefinition',
|
|
40
|
+
[ContributionKind.Convention]: 'IConvention',
|
|
41
|
+
[ContributionKind.Helper]: 'IPackHelper',
|
|
42
|
+
[ContributionKind.TaskRoutingHint]: 'ITaskRoutingHint',
|
|
43
|
+
[ContributionKind.RegistrationHint]: 'IRegistrationHint',
|
|
44
|
+
[ContributionKind.Playbook]: 'IPlaybookInput',
|
|
45
|
+
[ContributionKind.Construct]: 'IConstructInput',
|
|
46
|
+
[ContributionKind.ConstructFacet]: 'IConstructFacetInput',
|
|
47
|
+
[ContributionKind.SearchTuning]: 'ISearchTuning',
|
|
48
|
+
[ContributionKind.ScaffoldPattern]: 'IScaffoldPattern',
|
|
49
|
+
[ContributionKind.Policy]: 'IPackPolicyCheck',
|
|
50
|
+
[ContributionKind.DelegateRecipe]: 'IDelegateRecipe',
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* THE build-time pointer printed next to a rejected entry (round 12, 12.1f):
|
|
54
|
+
* the runtime validator caught it; an annotated asset makes `--typecheck`
|
|
55
|
+
* catch it before the pack ships.
|
|
56
|
+
*/
|
|
57
|
+
export function rejectedEntryTypecheckHint(kind, pack) {
|
|
58
|
+
const type = ASSET_TYPE_BY_KIND[kind];
|
|
59
|
+
if (!type) {
|
|
60
|
+
// No published authoring type for this kind: the runtime loader is the check.
|
|
61
|
+
return `\`shrk packs test ${pack} --load\` runs this loader at build time and fails on the entry — run it before publishing.`;
|
|
62
|
+
}
|
|
63
|
+
return `Annotate the asset with a type-only import and \`satisfies ${type}[]\` (from @shrkcrft/plugin-api) — see docs/pack-authoring.md — then \`shrk packs test ${pack} --typecheck\` catches this at build time.`;
|
|
64
|
+
}
|
|
21
65
|
/** A leading package-manager / runner literal a pack verification command may
|
|
22
66
|
* bake in. Order longest-first is not required — these tokens are disjoint. */
|
|
23
67
|
const PM_LITERAL_MANAGERS = [
|
|
@@ -78,6 +122,28 @@ export function buildPackDoctorReport(inspection, options = {}) {
|
|
|
78
122
|
.filter((e) => inspection.entrySources.get(e.id)?.type === 'local')
|
|
79
123
|
.map((e) => e.id));
|
|
80
124
|
const detectedPm = detectedProjectManager(inspection.workspace);
|
|
125
|
+
const loadFailures = collectContributionLoadFailures(inspection, options.registryLoadFailures ?? options.registryOutcomes?.loadFailures ?? []);
|
|
126
|
+
// THE rejection channel, and each file's accepted count (the loader's own):
|
|
127
|
+
// `N of M entries rejected` is accepted + rejected = declared.
|
|
128
|
+
const rejections = collectContributionRejections(inspection, options.registryOutcomes?.rejections ?? []);
|
|
129
|
+
const acceptedByFile = new Map();
|
|
130
|
+
for (const a of options.registryOutcomes?.accepted ?? []) {
|
|
131
|
+
acceptedByFile.set(a.file, (acceptedByFile.get(a.file) ?? 0) + 1);
|
|
132
|
+
}
|
|
133
|
+
for (const d of inspection.loaderDiagnostics ?? []) {
|
|
134
|
+
if (d.status !== 'ok')
|
|
135
|
+
continue;
|
|
136
|
+
const abs = nodePath.resolve(d.filePath);
|
|
137
|
+
acceptedByFile.set(abs, (acceptedByFile.get(abs) ?? 0) + d.count);
|
|
138
|
+
}
|
|
139
|
+
const rejectedFiles = new Set(rejections.map((r) => r.file));
|
|
140
|
+
// Files the inspection-time loaders imported AND that produced ≥ 1 entry.
|
|
141
|
+
// Compiled artifacts with a source, and those no build record covers.
|
|
142
|
+
let compiledWithSource = 0;
|
|
143
|
+
const unrecordedArtifacts = [];
|
|
144
|
+
const producingFiles = new Set((inspection.loaderDiagnostics ?? [])
|
|
145
|
+
.filter((d) => d.status === 'ok' && d.count > 0)
|
|
146
|
+
.map((d) => nodePath.resolve(d.filePath)));
|
|
81
147
|
for (const pack of inspection.packs.invalidPacks) {
|
|
82
148
|
issues.push({
|
|
83
149
|
severity: 'error',
|
|
@@ -112,10 +178,137 @@ export function buildPackDoctorReport(inspection, options = {}) {
|
|
|
112
178
|
severity: 'error',
|
|
113
179
|
packageName: pack.packageName,
|
|
114
180
|
code: 'empty-resolved-contributions',
|
|
115
|
-
message: 'Pack declared contribution files but nothing loaded — every file is missing, empty, or duplicates local entries.',
|
|
181
|
+
message: 'Pack declared contribution files but nothing loaded — every file is missing, empty, failed to load, or duplicates local entries.',
|
|
116
182
|
suggestion: 'Run `shrk packs get <pack>` and check the listed contribution files.',
|
|
117
183
|
});
|
|
118
184
|
}
|
|
185
|
+
// A contribution file the module loader could not import: nothing in it
|
|
186
|
+
// takes effect, whatever a regex scrape of it might list. One error per file.
|
|
187
|
+
const packRootPrefix = nodePath.resolve(pack.packageRoot) + nodePath.sep;
|
|
188
|
+
const packFailures = [...loadFailures.values()].filter((f) => f.packageName === pack.packageName || f.file.startsWith(packRootPrefix));
|
|
189
|
+
for (const f of packFailures) {
|
|
190
|
+
issues.push({
|
|
191
|
+
severity: 'error',
|
|
192
|
+
packageName: pack.packageName,
|
|
193
|
+
code: 'contribution-load-failed',
|
|
194
|
+
message: `${nodePath.relative(pack.packageRoot, f.file) || f.file} (${f.kind}) failed to load — ${f.message}. Nothing in it takes effect.`,
|
|
195
|
+
suggestion: 'Fix the syntax / import error in that file; release-check reproduces the load.',
|
|
196
|
+
suggestedCommand: `shrk packs release-check ${pack.packageRoot}`,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
// Entries a contribution file DECLARES that its loader REFUSED (round 12,
|
|
200
|
+
// 12.1): one error per file. A file with 8 of 10 entries used to read as
|
|
201
|
+
// healthy here — only a file producing ZERO entries was ever flagged.
|
|
202
|
+
const packRejections = rejections.filter((r) => r.packageName === pack.packageName || r.file.startsWith(packRootPrefix));
|
|
203
|
+
const byFile = new Map();
|
|
204
|
+
for (const r of packRejections)
|
|
205
|
+
byFile.set(r.file, [...(byFile.get(r.file) ?? []), r]);
|
|
206
|
+
for (const [file, list] of byFile) {
|
|
207
|
+
const declared = (acceptedByFile.get(file) ?? 0) + list.length;
|
|
208
|
+
const kind = list[0].kind;
|
|
209
|
+
issues.push({
|
|
210
|
+
severity: 'error',
|
|
211
|
+
packageName: pack.packageName,
|
|
212
|
+
code: 'contribution-entries-rejected',
|
|
213
|
+
message: `${nodePath.relative(pack.packageRoot, file) || file} (${kind}): ${list.length} of ${declared} ${declared === 1 ? 'entry' : 'entries'} rejected — ${list.map((r) => formatEntryRejection(r)).join('; ')}. A rejected entry does not take effect.`,
|
|
214
|
+
suggestion: `Fix the field(s) the loader names. ${options.typecheckResults ? '' : rejectedEntryTypecheckHint(kind, nodePath.relative(inspection.projectRoot, pack.packageRoot) || pack.packageRoot)}`.trim(),
|
|
215
|
+
suggestedCommand: `shrk packs contributions --pack ${pack.packageName}`,
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
// Declared knowledge-family files that LOADED but produced no entry: the
|
|
219
|
+
// pack prints `k=2` next to `entries=1` and that pair used to go unread.
|
|
220
|
+
if (declaredAny && resolvedAny) {
|
|
221
|
+
const familyRels = [
|
|
222
|
+
...(manifest.contributions.knowledgeFiles ?? []),
|
|
223
|
+
...(manifest.contributions.ruleFiles ?? []),
|
|
224
|
+
...(manifest.contributions.pathFiles ?? []),
|
|
225
|
+
...(manifest.contributions.pathConventionFiles ?? []),
|
|
226
|
+
...(manifest.contributions.templateFiles ?? []),
|
|
227
|
+
...(manifest.contributions.pipelineFiles ?? []),
|
|
228
|
+
...(manifest.contributions.docsFiles ?? []),
|
|
229
|
+
];
|
|
230
|
+
const familyAbs = [...new Set(familyRels.map((rel) => nodePath.resolve(pack.packageRoot, rel)))];
|
|
231
|
+
const silent = familyAbs.filter((abs) => !producingFiles.has(abs) &&
|
|
232
|
+
!loadFailures.has(abs) &&
|
|
233
|
+
// Every entry rejected: `contribution-entries-rejected` says why.
|
|
234
|
+
!rejectedFiles.has(abs) &&
|
|
235
|
+
!inspection.warnings.includes(`pack ${pack.packageName}: missing contribution file ${nodePath.relative(pack.packageRoot, abs)}`));
|
|
236
|
+
if (silent.length > 0) {
|
|
237
|
+
issues.push({
|
|
238
|
+
severity: 'warning',
|
|
239
|
+
packageName: pack.packageName,
|
|
240
|
+
code: 'partially-resolved-contributions',
|
|
241
|
+
message: `${silent.length} of ${familyAbs.length} declared contribution file(s) loaded but produced no entries: ${silent
|
|
242
|
+
.map((abs) => nodePath.relative(pack.packageRoot, abs))
|
|
243
|
+
.join(', ')}.`,
|
|
244
|
+
suggestion: 'Each file must export entry-shaped values (an array default export, or named entries); check the export shape and the required fields.',
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
// Compiled contributions vs their source — THE freshness authority
|
|
249
|
+
// (content, never mtime). A stale build means shrk serves the previous one.
|
|
250
|
+
const freshness = detectPackAssetFreshness(pack);
|
|
251
|
+
const saidBuild = describePackAssetFreshness(freshness).build;
|
|
252
|
+
if (freshness.build.state === 'stale' && saidBuild) {
|
|
253
|
+
issues.push({
|
|
254
|
+
severity: options.strict || options.release ? 'error' : 'warning',
|
|
255
|
+
packageName: pack.packageName,
|
|
256
|
+
code: 'compiled-artifacts-stale',
|
|
257
|
+
message: saidBuild,
|
|
258
|
+
...(freshness.build.rebuildCommand
|
|
259
|
+
? { suggestedCommand: `(cd ${pack.packageRoot} && ${freshness.build.rebuildCommand})` }
|
|
260
|
+
: {}),
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
else if (freshness.build.state === 'unrecorded' && saidBuild) {
|
|
264
|
+
// Never compared (no build record): NOT VERIFIED by default — the
|
|
265
|
+
// verdict settles it through `compiledArtifactCoverage` — and, like a
|
|
266
|
+
// stale build, an error under --strict / --release.
|
|
267
|
+
issues.push({
|
|
268
|
+
severity: options.strict || options.release ? 'error' : 'warning',
|
|
269
|
+
packageName: pack.packageName,
|
|
270
|
+
code: 'compiled-artifacts-unrecorded',
|
|
271
|
+
message: saidBuild,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
for (const a of freshness.build.artifacts) {
|
|
275
|
+
if (a.source === null)
|
|
276
|
+
continue; // no source → nothing to compare it to
|
|
277
|
+
compiledWithSource += 1;
|
|
278
|
+
if (a.state === 'unrecorded')
|
|
279
|
+
unrecordedArtifacts.push(`${pack.packageName}:${a.artifact}`);
|
|
280
|
+
}
|
|
281
|
+
for (const u of options.unregisteredExports ?? []) {
|
|
282
|
+
if (u.packageName !== pack.packageName)
|
|
283
|
+
continue;
|
|
284
|
+
issues.push({
|
|
285
|
+
severity: 'error',
|
|
286
|
+
packageName: pack.packageName,
|
|
287
|
+
code: 'unregistered-export',
|
|
288
|
+
message: `${u.group}${u.line > 0 ? `:${u.line}` : ''} ${u.message}`,
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
for (const t of options.typecheckResults ?? []) {
|
|
292
|
+
if (t.packageName !== pack.packageName)
|
|
293
|
+
continue;
|
|
294
|
+
if (!t.result.ran) {
|
|
295
|
+
issues.push({
|
|
296
|
+
severity: 'warning',
|
|
297
|
+
packageName: pack.packageName,
|
|
298
|
+
code: 'typecheck-not-run',
|
|
299
|
+
message: `--typecheck examined 0 TS files (${t.result.note ?? 'nothing to check'}) — NOT verified.`,
|
|
300
|
+
});
|
|
301
|
+
continue;
|
|
302
|
+
}
|
|
303
|
+
for (const e of t.result.errors) {
|
|
304
|
+
issues.push({
|
|
305
|
+
severity: 'error',
|
|
306
|
+
packageName: pack.packageName,
|
|
307
|
+
code: 'typecheck-error',
|
|
308
|
+
message: `${nodePath.relative(pack.packageRoot, e.file) || e.file}:${e.line}:${e.column} TS${e.code} ${e.message}`,
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
}
|
|
119
312
|
// Templates contributed by this pack — require a non-trivial description.
|
|
120
313
|
for (const t of inspection.templates) {
|
|
121
314
|
const src = inspection.templateSources.get(t.id);
|
|
@@ -323,6 +516,51 @@ export function buildPackDoctorReport(inspection, options = {}) {
|
|
|
323
516
|
});
|
|
324
517
|
}
|
|
325
518
|
}
|
|
519
|
+
// Declared cross-references on pack-contributed assets (round 11, 4.2): the
|
|
520
|
+
// SAME rows the self-config doctor reports, scoped to the pack that owns the
|
|
521
|
+
// source asset — never a second walker over the fields.
|
|
522
|
+
const xrefs = options.declaredXrefs ?? collectDeclaredXrefs(inspection);
|
|
523
|
+
const packNames = new Set(inspection.packs.discoveredPacks.map((p) => p.packageName));
|
|
524
|
+
const unverifiedByPack = new Map();
|
|
525
|
+
for (const row of xrefs.rows) {
|
|
526
|
+
if (!row.packageName || !packNames.has(row.packageName))
|
|
527
|
+
continue;
|
|
528
|
+
if (row.status === DeclaredXrefStatus.Unverified) {
|
|
529
|
+
unverifiedByPack.set(row.packageName, (unverifiedByPack.get(row.packageName) ?? 0) + 1);
|
|
530
|
+
continue;
|
|
531
|
+
}
|
|
532
|
+
if (!isBrokenXref(row))
|
|
533
|
+
continue;
|
|
534
|
+
issues.push({
|
|
535
|
+
severity: row.severity === 'error' ? 'error' : 'warning',
|
|
536
|
+
packageName: row.packageName,
|
|
537
|
+
code: row.status === DeclaredXrefStatus.Dangling ? 'pack-xref-dangling' : 'pack-xref-wrong-kind',
|
|
538
|
+
message: `${row.message}${row.file ? ` (${row.file})` : ''}`,
|
|
539
|
+
suggestion: row.didYouMean.length > 0
|
|
540
|
+
? `Did you mean "${row.didYouMean[0]}"? Fix the id in the pack source, then re-sign the pack.`
|
|
541
|
+
: 'Fix or remove the id in the pack source, then re-sign the pack.',
|
|
542
|
+
suggestedCommand: `shrk self-config resolve ${row.targetId}`,
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
for (const issue of xrefs.issues) {
|
|
546
|
+
if (!issue.packageName || !packNames.has(issue.packageName))
|
|
547
|
+
continue;
|
|
548
|
+
issues.push({
|
|
549
|
+
severity: issue.severity,
|
|
550
|
+
packageName: issue.packageName,
|
|
551
|
+
code: 'pack-xref-invalid',
|
|
552
|
+
message: `[${issue.code}] ${issue.message}${issue.file ? ` (${issue.file})` : ''}`,
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
for (const [packageName, n] of unverifiedByPack) {
|
|
556
|
+
issues.push({
|
|
557
|
+
severity: 'info',
|
|
558
|
+
packageName,
|
|
559
|
+
code: 'pack-xref-unverified',
|
|
560
|
+
message: `${n} declared cross-reference id(s) NOT VERIFIED — the registry they resolve against was not warmed, or is empty.`,
|
|
561
|
+
suggestedCommand: 'shrk self-config xrefs --json',
|
|
562
|
+
});
|
|
563
|
+
}
|
|
326
564
|
const summary = {
|
|
327
565
|
errors: issues.filter((i) => i.severity === 'error').length,
|
|
328
566
|
warnings: issues.filter((i) => i.severity === 'warning').length,
|
|
@@ -333,8 +571,50 @@ export function buildPackDoctorReport(inspection, options = {}) {
|
|
|
333
571
|
packsChecked: inspection.packs.discoveredPacks.length,
|
|
334
572
|
issues,
|
|
335
573
|
summary,
|
|
574
|
+
...(options.typecheckResults ? { typecheckResults: options.typecheckResults } : {}),
|
|
575
|
+
...(compiledWithSource > 0
|
|
576
|
+
? {
|
|
577
|
+
compiledArtifactCoverage: {
|
|
578
|
+
unit: 'compiled artifacts',
|
|
579
|
+
expected: compiledWithSource,
|
|
580
|
+
examined: compiledWithSource - unrecordedArtifacts.length,
|
|
581
|
+
reason: 'have no build record (source-map sourcesContent or signed content digests) to compare their source against',
|
|
582
|
+
...(unrecordedArtifacts.length > 0
|
|
583
|
+
? { unexamined: unrecordedArtifacts.slice(0, 20), unexaminedTotal: unrecordedArtifacts.length }
|
|
584
|
+
: {}),
|
|
585
|
+
},
|
|
586
|
+
}
|
|
587
|
+
: {}),
|
|
336
588
|
};
|
|
337
589
|
}
|
|
590
|
+
/**
|
|
591
|
+
* The pack doctor with every ASYNC input gathered first: the registry loaders'
|
|
592
|
+
* load failures, unregistered group-module exports, and (opt-in) a typecheck
|
|
593
|
+
* of each pack's TS assets. `packs doctor` and the MCP doctor tools share it,
|
|
594
|
+
* so both report the same issues.
|
|
595
|
+
*/
|
|
596
|
+
export async function buildPackDoctorReportAsync(inspection, options = {}) {
|
|
597
|
+
// ONE run of every registry loader: load failures, rejected and accepted entries.
|
|
598
|
+
const [registryOutcomes, unregisteredExports] = await Promise.all([
|
|
599
|
+
collectRegistryOutcomes(inspection),
|
|
600
|
+
detectUnregisteredExports(inspection).then((all) => all.filter((u) => u.packageName !== undefined)),
|
|
601
|
+
]);
|
|
602
|
+
const registryLoadFailures = registryOutcomes.loadFailures;
|
|
603
|
+
const typecheckResults = options.typecheck
|
|
604
|
+
? inspection.packs.validPacks.map((p) => ({
|
|
605
|
+
packageName: p.packageName,
|
|
606
|
+
result: typecheckPackAssets({ packageRoot: p.packageRoot, manifestPath: p.manifestPath, manifest: p.manifest ?? null }),
|
|
607
|
+
}))
|
|
608
|
+
: undefined;
|
|
609
|
+
return buildPackDoctorReport(inspection, {
|
|
610
|
+
...options,
|
|
611
|
+
registryLoadFailures,
|
|
612
|
+
registryOutcomes,
|
|
613
|
+
unregisteredExports,
|
|
614
|
+
declaredXrefs: options.declaredXrefs ?? (await buildDeclaredXrefReport(inspection)),
|
|
615
|
+
...(typecheckResults ? { typecheckResults } : {}),
|
|
616
|
+
});
|
|
617
|
+
}
|
|
338
618
|
/** Map a single release-check finding code to one of the four IPackDoctorIssue
|
|
339
619
|
* release-* bucket codes. */
|
|
340
620
|
function releaseFindingBucket(code) {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Render a pack/local helper's DECLARATIVE operations into a helper plan.
|
|
3
|
+
*
|
|
4
|
+
* `IPackHelperOperationInput` kinds existed only as a type — no code mapped
|
|
5
|
+
* them to plan ops, so a valid pack helper could never be planned. This is the
|
|
6
|
+
* one renderer; it never executes pack code (operations are data) and never
|
|
7
|
+
* writes. Placeholders go through the shared `substitutePlaceholders`.
|
|
8
|
+
*/
|
|
9
|
+
import type { IHelperPlan } from './helper-registry.js';
|
|
10
|
+
import type { IHelperView } from './helper-view.js';
|
|
11
|
+
/**
|
|
12
|
+
* Build the plan for one catalog helper with `vars`. Declared defaults apply
|
|
13
|
+
* first; a required variable with no value is a refusal (`ok: false`) naming
|
|
14
|
+
* every missing one — never a plan with blank snippets.
|
|
15
|
+
*/
|
|
16
|
+
export declare function buildPackHelperPlan(helper: IHelperView, vars: Readonly<Record<string, string>>): {
|
|
17
|
+
readonly ok: true;
|
|
18
|
+
readonly plan: IHelperPlan;
|
|
19
|
+
} | {
|
|
20
|
+
readonly ok: false;
|
|
21
|
+
readonly missing: readonly string[];
|
|
22
|
+
readonly message: string;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=pack-helper-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack-helper-plan.d.ts","sourceRoot":"","sources":["../src/pack-helper-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAKpD;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GACrC;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CA8D3I"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { substitutePlaceholders } from "./substitute-placeholders.js";
|
|
2
|
+
const UNRESOLVED = /\{\{\s*([A-Za-z0-9_]+)\s*\}\}/;
|
|
3
|
+
/**
|
|
4
|
+
* Build the plan for one catalog helper with `vars`. Declared defaults apply
|
|
5
|
+
* first; a required variable with no value is a refusal (`ok: false`) naming
|
|
6
|
+
* every missing one — never a plan with blank snippets.
|
|
7
|
+
*/
|
|
8
|
+
export function buildPackHelperPlan(helper, vars) {
|
|
9
|
+
const values = {};
|
|
10
|
+
for (const v of helper.variables)
|
|
11
|
+
if (v.defaultValue !== undefined)
|
|
12
|
+
values[v.name] = v.defaultValue;
|
|
13
|
+
Object.assign(values, vars);
|
|
14
|
+
const missing = helper.variables.filter((v) => v.required && !values[v.name]).map((v) => v.name);
|
|
15
|
+
if (missing.length > 0) {
|
|
16
|
+
return {
|
|
17
|
+
ok: false,
|
|
18
|
+
missing,
|
|
19
|
+
message: `Helper "${helper.id}" requires ${missing.map((m) => `--var ${m}=<value>`).join(' ')}.`,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
const sub = (s) => (s === undefined ? '' : substitutePlaceholders(s, values));
|
|
23
|
+
const ops = [];
|
|
24
|
+
const manualSteps = [];
|
|
25
|
+
const conflicts = [];
|
|
26
|
+
const asChecklist = helper.outputKind === 'checklist';
|
|
27
|
+
helper.operations.forEach((op, i) => {
|
|
28
|
+
const at = `operations[${i}] (${op.kind})`;
|
|
29
|
+
const targetPath = sub(op.targetPath);
|
|
30
|
+
if (op.kind === 'manual-checklist') {
|
|
31
|
+
for (const item of op.checklist ?? [])
|
|
32
|
+
manualSteps.push({ kind: 'manual-checklist', description: sub(item) });
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (asChecklist) {
|
|
36
|
+
manualSteps.push({ kind: op.kind, description: `${sub(op.description) || op.kind} — ${targetPath}` });
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
let planned;
|
|
40
|
+
if (op.kind === 'append-line') {
|
|
41
|
+
planned = { kind: 'append', targetPath, snippet: sub(op.snippet) };
|
|
42
|
+
}
|
|
43
|
+
else if (op.kind === 'insert-before') {
|
|
44
|
+
planned = { kind: 'insert-before', targetPath, anchor: sub(op.anchor), snippet: sub(op.snippet) };
|
|
45
|
+
}
|
|
46
|
+
else if (op.kind === 'replace-line') {
|
|
47
|
+
planned = { kind: 'replace', targetPath, fromPattern: sub(op.find), snippet: sub(op.replaceWith) };
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
// remove-line: a replace with an empty snippet.
|
|
51
|
+
planned = { kind: 'replace', targetPath, fromPattern: sub(op.find), snippet: '' };
|
|
52
|
+
}
|
|
53
|
+
ops.push(planned);
|
|
54
|
+
for (const [field, value] of Object.entries(planned)) {
|
|
55
|
+
if (typeof value !== 'string')
|
|
56
|
+
continue;
|
|
57
|
+
const m = UNRESOLVED.exec(value);
|
|
58
|
+
if (m)
|
|
59
|
+
conflicts.push(`${at}.${field} still contains {{${m[1]}}} — no value was supplied for "${m[1]}"`);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
for (const item of helper.manualChecklist)
|
|
63
|
+
manualSteps.push({ kind: 'checklist', description: sub(item) });
|
|
64
|
+
return {
|
|
65
|
+
ok: true,
|
|
66
|
+
plan: {
|
|
67
|
+
schema: 'sharkcraft.helper-plan/v1',
|
|
68
|
+
helperId: helper.id,
|
|
69
|
+
generatedAt: new Date().toISOString(),
|
|
70
|
+
ops,
|
|
71
|
+
conflicts,
|
|
72
|
+
manualSteps,
|
|
73
|
+
destructive: helper.destructive,
|
|
74
|
+
requiresHumanReview: helper.requiresHumanReview,
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
}
|