@shrkcrft/inspector 0.1.0-alpha.1
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/LICENSE +21 -0
- package/README.md +15 -0
- package/dist/acceptance-replay.d.ts +63 -0
- package/dist/acceptance-replay.d.ts.map +1 -0
- package/dist/acceptance-replay.js +240 -0
- package/dist/action-hint-diagnostics.d.ts +32 -0
- package/dist/action-hint-diagnostics.d.ts.map +1 -0
- package/dist/action-hint-diagnostics.js +133 -0
- package/dist/adoption-check.d.ts +28 -0
- package/dist/adoption-check.d.ts.map +1 -0
- package/dist/adoption-check.js +181 -0
- package/dist/adoption-checkpoint.d.ts +97 -0
- package/dist/adoption-checkpoint.d.ts.map +1 -0
- package/dist/adoption-checkpoint.js +209 -0
- package/dist/adoption-merge-preview.d.ts +28 -0
- package/dist/adoption-merge-preview.d.ts.map +1 -0
- package/dist/adoption-merge-preview.js +254 -0
- package/dist/adoption-report-renderer.d.ts +33 -0
- package/dist/adoption-report-renderer.d.ts.map +1 -0
- package/dist/adoption-report-renderer.js +257 -0
- package/dist/adoption-state.d.ts +100 -0
- package/dist/adoption-state.d.ts.map +1 -0
- package/dist/adoption-state.js +296 -0
- package/dist/adoption-three-way.d.ts +46 -0
- package/dist/adoption-three-way.d.ts.map +1 -0
- package/dist/adoption-three-way.js +181 -0
- package/dist/agent-brief.d.ts +77 -0
- package/dist/agent-brief.d.ts.map +1 -0
- package/dist/agent-brief.js +490 -0
- package/dist/agent-contract-gate.d.ts +108 -0
- package/dist/agent-contract-gate.d.ts.map +1 -0
- package/dist/agent-contract-gate.js +412 -0
- package/dist/agent-contract-templates.d.ts +63 -0
- package/dist/agent-contract-templates.d.ts.map +1 -0
- package/dist/agent-contract-templates.js +346 -0
- package/dist/agent-contract.d.ts +65 -0
- package/dist/agent-contract.d.ts.map +1 -0
- package/dist/agent-contract.js +555 -0
- package/dist/agent-handoff.d.ts +123 -0
- package/dist/agent-handoff.d.ts.map +1 -0
- package/dist/agent-handoff.js +470 -0
- package/dist/agent-instructions.d.ts +2 -0
- package/dist/agent-instructions.d.ts.map +1 -0
- package/dist/agent-instructions.js +21 -0
- package/dist/agent-orchestration.d.ts +61 -0
- package/dist/agent-orchestration.d.ts.map +1 -0
- package/dist/agent-orchestration.js +285 -0
- package/dist/agent-task-prep.d.ts +31 -0
- package/dist/agent-task-prep.d.ts.map +1 -0
- package/dist/agent-task-prep.js +73 -0
- package/dist/ai-readiness.d.ts +30 -0
- package/dist/ai-readiness.d.ts.map +1 -0
- package/dist/ai-readiness.js +279 -0
- package/dist/api-report.d.ts +51 -0
- package/dist/api-report.d.ts.map +1 -0
- package/dist/api-report.js +254 -0
- package/dist/apply-dispatch-trace.d.ts +93 -0
- package/dist/apply-dispatch-trace.d.ts.map +1 -0
- package/dist/apply-dispatch-trace.js +283 -0
- package/dist/apply-gate-result.d.ts +52 -0
- package/dist/apply-gate-result.d.ts.map +1 -0
- package/dist/apply-gate-result.js +44 -0
- package/dist/architecture-map.d.ts +118 -0
- package/dist/architecture-map.d.ts.map +1 -0
- package/dist/architecture-map.js +543 -0
- package/dist/area-explore.d.ts +75 -0
- package/dist/area-explore.d.ts.map +1 -0
- package/dist/area-explore.js +438 -0
- package/dist/area-map.d.ts +57 -0
- package/dist/area-map.d.ts.map +1 -0
- package/dist/area-map.js +214 -0
- package/dist/asset-provenance.d.ts +123 -0
- package/dist/asset-provenance.d.ts.map +1 -0
- package/dist/asset-provenance.js +209 -0
- package/dist/barrel-operations.d.ts +45 -0
- package/dist/barrel-operations.d.ts.map +1 -0
- package/dist/barrel-operations.js +159 -0
- package/dist/boundaries-changed-only.d.ts +62 -0
- package/dist/boundaries-changed-only.d.ts.map +1 -0
- package/dist/boundaries-changed-only.js +97 -0
- package/dist/boundary-suggestions.d.ts +20 -0
- package/dist/boundary-suggestions.d.ts.map +1 -0
- package/dist/boundary-suggestions.js +51 -0
- package/dist/bundle-diff.d.ts +98 -0
- package/dist/bundle-diff.d.ts.map +1 -0
- package/dist/bundle-diff.js +531 -0
- package/dist/bundle-replay.d.ts +68 -0
- package/dist/bundle-replay.d.ts.map +1 -0
- package/dist/bundle-replay.js +273 -0
- package/dist/bundle-validate-html.d.ts +11 -0
- package/dist/bundle-validate-html.d.ts.map +1 -0
- package/dist/bundle-validate-html.js +60 -0
- package/dist/change-intent.d.ts +36 -0
- package/dist/change-intent.d.ts.map +1 -0
- package/dist/change-intent.js +259 -0
- package/dist/changed-preflight.d.ts +59 -0
- package/dist/changed-preflight.d.ts.map +1 -0
- package/dist/changed-preflight.js +358 -0
- package/dist/changed-scope.d.ts +112 -0
- package/dist/changed-scope.d.ts.map +1 -0
- package/dist/changed-scope.js +172 -0
- package/dist/changes-summary.d.ts +87 -0
- package/dist/changes-summary.d.ts.map +1 -0
- package/dist/changes-summary.js +323 -0
- package/dist/check-result-v1.d.ts +90 -0
- package/dist/check-result-v1.d.ts.map +1 -0
- package/dist/check-result-v1.js +335 -0
- package/dist/ci-integrity-report.d.ts +38 -0
- package/dist/ci-integrity-report.d.ts.map +1 -0
- package/dist/ci-integrity-report.js +324 -0
- package/dist/ci-permissions-fix.d.ts +38 -0
- package/dist/ci-permissions-fix.d.ts.map +1 -0
- package/dist/ci-permissions-fix.js +382 -0
- package/dist/ci-permissions.d.ts +51 -0
- package/dist/ci-permissions.d.ts.map +1 -0
- package/dist/ci-permissions.js +431 -0
- package/dist/ci-predict.d.ts +42 -0
- package/dist/ci-predict.d.ts.map +1 -0
- package/dist/ci-predict.js +300 -0
- package/dist/ci-scaffold.d.ts +47 -0
- package/dist/ci-scaffold.d.ts.map +1 -0
- package/dist/ci-scaffold.js +638 -0
- package/dist/codemod-assist.d.ts +97 -0
- package/dist/codemod-assist.d.ts.map +1 -0
- package/dist/codemod-assist.js +261 -0
- package/dist/command-recommender.d.ts +25 -0
- package/dist/command-recommender.d.ts.map +1 -0
- package/dist/command-recommender.js +145 -0
- package/dist/command-suggester.d.ts +61 -0
- package/dist/command-suggester.d.ts.map +1 -0
- package/dist/command-suggester.js +159 -0
- package/dist/command-taxonomy.d.ts +38 -0
- package/dist/command-taxonomy.d.ts.map +1 -0
- package/dist/command-taxonomy.js +164 -0
- package/dist/compliance-evidence.d.ts +58 -0
- package/dist/compliance-evidence.d.ts.map +1 -0
- package/dist/compliance-evidence.js +260 -0
- package/dist/compliance-profiles.d.ts +42 -0
- package/dist/compliance-profiles.d.ts.map +1 -0
- package/dist/compliance-profiles.js +171 -0
- package/dist/construct-adoption-diff.d.ts +55 -0
- package/dist/construct-adoption-diff.d.ts.map +1 -0
- package/dist/construct-adoption-diff.js +331 -0
- package/dist/construct-adoption.d.ts +71 -0
- package/dist/construct-adoption.d.ts.map +1 -0
- package/dist/construct-adoption.js +331 -0
- package/dist/construct-inference.d.ts +44 -0
- package/dist/construct-inference.d.ts.map +1 -0
- package/dist/construct-inference.js +391 -0
- package/dist/construct-registry.d.ts +32 -0
- package/dist/construct-registry.d.ts.map +1 -0
- package/dist/construct-registry.js +198 -0
- package/dist/contract-file-rule.d.ts +37 -0
- package/dist/contract-file-rule.d.ts.map +1 -0
- package/dist/contract-file-rule.js +99 -0
- package/dist/contract-template-registry.d.ts +28 -0
- package/dist/contract-template-registry.d.ts.map +1 -0
- package/dist/contract-template-registry.js +161 -0
- package/dist/contradictions.d.ts +52 -0
- package/dist/contradictions.d.ts.map +1 -0
- package/dist/contradictions.js +391 -0
- package/dist/convention-registry.d.ts +44 -0
- package/dist/convention-registry.d.ts.map +1 -0
- package/dist/convention-registry.js +195 -0
- package/dist/coverage-report.d.ts +25 -0
- package/dist/coverage-report.d.ts.map +1 -0
- package/dist/coverage-report.js +190 -0
- package/dist/custom-checks.d.ts +146 -0
- package/dist/custom-checks.d.ts.map +1 -0
- package/dist/custom-checks.js +260 -0
- package/dist/dashboard/dashboard-data.d.ts +59 -0
- package/dist/dashboard/dashboard-data.d.ts.map +1 -0
- package/dist/dashboard/dashboard-data.js +653 -0
- package/dist/dashboard-export.d.ts +67 -0
- package/dist/dashboard-export.d.ts.map +1 -0
- package/dist/dashboard-export.js +203 -0
- package/dist/decision-records.d.ts +47 -0
- package/dist/decision-records.d.ts.map +1 -0
- package/dist/decision-records.js +255 -0
- package/dist/demo-package.d.ts +49 -0
- package/dist/demo-package.d.ts.map +1 -0
- package/dist/demo-package.js +305 -0
- package/dist/demo-script.d.ts +25 -0
- package/dist/demo-script.d.ts.map +1 -0
- package/dist/demo-script.js +198 -0
- package/dist/demo-workflow.d.ts +28 -0
- package/dist/demo-workflow.d.ts.map +1 -0
- package/dist/demo-workflow.js +178 -0
- package/dist/dev-cycle.d.ts +41 -0
- package/dist/dev-cycle.d.ts.map +1 -0
- package/dist/dev-cycle.js +94 -0
- package/dist/dev-session-html.d.ts +13 -0
- package/dist/dev-session-html.d.ts.map +1 -0
- package/dist/dev-session-html.js +223 -0
- package/dist/dev-session-report.d.ts +11 -0
- package/dist/dev-session-report.d.ts.map +1 -0
- package/dist/dev-session-report.js +206 -0
- package/dist/dev-session.d.ts +257 -0
- package/dist/dev-session.d.ts.map +1 -0
- package/dist/dev-session.js +568 -0
- package/dist/diagnostics-suggest.d.ts +17 -0
- package/dist/diagnostics-suggest.d.ts.map +1 -0
- package/dist/diagnostics-suggest.js +69 -0
- package/dist/docs-check.d.ts +40 -0
- package/dist/docs-check.d.ts.map +1 -0
- package/dist/docs-check.js +221 -0
- package/dist/doctor-acknowledgements.d.ts +69 -0
- package/dist/doctor-acknowledgements.d.ts.map +1 -0
- package/dist/doctor-acknowledgements.js +150 -0
- package/dist/doctor-result.d.ts +51 -0
- package/dist/doctor-result.d.ts.map +1 -0
- package/dist/doctor-result.js +7 -0
- package/dist/doctor-suppressions.d.ts +91 -0
- package/dist/doctor-suppressions.d.ts.map +1 -0
- package/dist/doctor-suppressions.js +238 -0
- package/dist/drift-baseline.d.ts +29 -0
- package/dist/drift-baseline.d.ts.map +1 -0
- package/dist/drift-baseline.js +80 -0
- package/dist/drift.d.ts +38 -0
- package/dist/drift.d.ts.map +1 -0
- package/dist/drift.js +107 -0
- package/dist/entrypoint-matrix.d.ts +61 -0
- package/dist/entrypoint-matrix.d.ts.map +1 -0
- package/dist/entrypoint-matrix.js +221 -0
- package/dist/examples-check.d.ts +36 -0
- package/dist/examples-check.d.ts.map +1 -0
- package/dist/examples-check.js +168 -0
- package/dist/execution-graph.d.ts +98 -0
- package/dist/execution-graph.d.ts.map +1 -0
- package/dist/execution-graph.js +484 -0
- package/dist/export-bundle.d.ts +10 -0
- package/dist/export-bundle.d.ts.map +1 -0
- package/dist/export-bundle.js +90 -0
- package/dist/failure-diagnostics.d.ts +63 -0
- package/dist/failure-diagnostics.d.ts.map +1 -0
- package/dist/failure-diagnostics.js +243 -0
- package/dist/feature-bundle.d.ts +111 -0
- package/dist/feature-bundle.d.ts.map +1 -0
- package/dist/feature-bundle.js +211 -0
- package/dist/feedback-actions-v2.d.ts +65 -0
- package/dist/feedback-actions-v2.d.ts.map +1 -0
- package/dist/feedback-actions-v2.js +183 -0
- package/dist/feedback-ingestion.d.ts +96 -0
- package/dist/feedback-ingestion.d.ts.map +1 -0
- package/dist/feedback-ingestion.js +400 -0
- package/dist/fix-preview.d.ts +82 -0
- package/dist/fix-preview.d.ts.map +1 -0
- package/dist/fix-preview.js +365 -0
- package/dist/fuzzy-impact.d.ts +50 -0
- package/dist/fuzzy-impact.d.ts.map +1 -0
- package/dist/fuzzy-impact.js +446 -0
- package/dist/generated-code.d.ts +97 -0
- package/dist/generated-code.d.ts.map +1 -0
- package/dist/generated-code.js +395 -0
- package/dist/git-helpers.d.ts +38 -0
- package/dist/git-helpers.d.ts.map +1 -0
- package/dist/git-helpers.js +173 -0
- package/dist/golden-output.d.ts +33 -0
- package/dist/golden-output.d.ts.map +1 -0
- package/dist/golden-output.js +92 -0
- package/dist/grounding/build-grounding.d.ts +53 -0
- package/dist/grounding/build-grounding.d.ts.map +1 -0
- package/dist/grounding/build-grounding.js +51 -0
- package/dist/grounding/nx-projects.d.ts +29 -0
- package/dist/grounding/nx-projects.d.ts.map +1 -0
- package/dist/grounding/nx-projects.js +109 -0
- package/dist/grounding/validate-extracted-plan.d.ts +20 -0
- package/dist/grounding/validate-extracted-plan.d.ts.map +1 -0
- package/dist/grounding/validate-extracted-plan.js +127 -0
- package/dist/healing-plan.d.ts +33 -0
- package/dist/healing-plan.d.ts.map +1 -0
- package/dist/healing-plan.js +346 -0
- package/dist/helper-registry.d.ts +90 -0
- package/dist/helper-registry.d.ts.map +1 -0
- package/dist/helper-registry.js +529 -0
- package/dist/impact-analysis.d.ts +150 -0
- package/dist/impact-analysis.d.ts.map +1 -0
- package/dist/impact-analysis.js +697 -0
- package/dist/impact-graph-render.d.ts +51 -0
- package/dist/impact-graph-render.d.ts.map +1 -0
- package/dist/impact-graph-render.js +139 -0
- package/dist/impact-graph.d.ts +17 -0
- package/dist/impact-graph.d.ts.map +1 -0
- package/dist/impact-graph.js +119 -0
- package/dist/impact-render.d.ts +22 -0
- package/dist/impact-render.d.ts.map +1 -0
- package/dist/impact-render.js +422 -0
- package/dist/import-graph-analysis.d.ts +28 -0
- package/dist/import-graph-analysis.d.ts.map +1 -0
- package/dist/import-graph-analysis.js +193 -0
- package/dist/import-hygiene.d.ts +93 -0
- package/dist/import-hygiene.d.ts.map +1 -0
- package/dist/import-hygiene.js +366 -0
- package/dist/index.d.ts +224 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +234 -0
- package/dist/ingest-adoption.d.ts +50 -0
- package/dist/ingest-adoption.d.ts.map +1 -0
- package/dist/ingest-adoption.js +183 -0
- package/dist/ingest-apply.d.ts +80 -0
- package/dist/ingest-apply.d.ts.map +1 -0
- package/dist/ingest-apply.js +227 -0
- package/dist/ingest-body-extractor.d.ts +28 -0
- package/dist/ingest-body-extractor.d.ts.map +1 -0
- package/dist/ingest-body-extractor.js +129 -0
- package/dist/ingest-drafts.d.ts +16 -0
- package/dist/ingest-drafts.d.ts.map +1 -0
- package/dist/ingest-drafts.js +482 -0
- package/dist/inspector-cache.d.ts +41 -0
- package/dist/inspector-cache.d.ts.map +1 -0
- package/dist/inspector-cache.js +104 -0
- package/dist/install-smoke.d.ts +44 -0
- package/dist/install-smoke.d.ts.map +1 -0
- package/dist/install-smoke.js +31 -0
- package/dist/knowledge-authoring.d.ts +151 -0
- package/dist/knowledge-authoring.d.ts.map +1 -0
- package/dist/knowledge-authoring.js +586 -0
- package/dist/knowledge-graph.d.ts +76 -0
- package/dist/knowledge-graph.d.ts.map +1 -0
- package/dist/knowledge-graph.js +336 -0
- package/dist/knowledge-lint.d.ts +97 -0
- package/dist/knowledge-lint.d.ts.map +1 -0
- package/dist/knowledge-lint.js +302 -0
- package/dist/knowledge-rename.d.ts +38 -0
- package/dist/knowledge-rename.d.ts.map +1 -0
- package/dist/knowledge-rename.js +88 -0
- package/dist/knowledge-stale.d.ts +124 -0
- package/dist/knowledge-stale.d.ts.map +1 -0
- package/dist/knowledge-stale.js +892 -0
- package/dist/languages/command-inference.d.ts +27 -0
- package/dist/languages/command-inference.d.ts.map +1 -0
- package/dist/languages/command-inference.js +214 -0
- package/dist/languages/dependency-scan.d.ts +33 -0
- package/dist/languages/dependency-scan.d.ts.map +1 -0
- package/dist/languages/dependency-scan.js +343 -0
- package/dist/languages/index.d.ts +14 -0
- package/dist/languages/index.d.ts.map +1 -0
- package/dist/languages/index.js +13 -0
- package/dist/languages/language-boundaries.d.ts +30 -0
- package/dist/languages/language-boundaries.d.ts.map +1 -0
- package/dist/languages/language-boundaries.js +176 -0
- package/dist/languages/language-cache.d.ts +54 -0
- package/dist/languages/language-cache.d.ts.map +1 -0
- package/dist/languages/language-cache.js +236 -0
- package/dist/languages/language-detection.d.ts +30 -0
- package/dist/languages/language-detection.d.ts.map +1 -0
- package/dist/languages/language-detection.js +584 -0
- package/dist/languages/language-id.d.ts +15 -0
- package/dist/languages/language-id.d.ts.map +1 -0
- package/dist/languages/language-id.js +15 -0
- package/dist/languages/language-runner.d.ts +90 -0
- package/dist/languages/language-runner.d.ts.map +1 -0
- package/dist/languages/language-runner.js +346 -0
- package/dist/languages/polyglot-boundary.d.ts +80 -0
- package/dist/languages/polyglot-boundary.d.ts.map +1 -0
- package/dist/languages/polyglot-boundary.js +373 -0
- package/dist/languages/polyglot-ci.d.ts +25 -0
- package/dist/languages/polyglot-ci.d.ts.map +1 -0
- package/dist/languages/polyglot-ci.js +278 -0
- package/dist/languages/test-impact.d.ts +19 -0
- package/dist/languages/test-impact.d.ts.map +1 -0
- package/dist/languages/test-impact.js +157 -0
- package/dist/loader-diagnostics.d.ts +40 -0
- package/dist/loader-diagnostics.d.ts.map +1 -0
- package/dist/loader-diagnostics.js +49 -0
- package/dist/memory-diff.d.ts +60 -0
- package/dist/memory-diff.d.ts.map +1 -0
- package/dist/memory-diff.js +302 -0
- package/dist/migration-profile-registry.d.ts +26 -0
- package/dist/migration-profile-registry.d.ts.map +1 -0
- package/dist/migration-profile-registry.js +135 -0
- package/dist/migration-readiness.d.ts +101 -0
- package/dist/migration-readiness.d.ts.map +1 -0
- package/dist/migration-readiness.js +253 -0
- package/dist/monorepo-onboarding.d.ts +51 -0
- package/dist/monorepo-onboarding.d.ts.map +1 -0
- package/dist/monorepo-onboarding.js +235 -0
- package/dist/onboarding-adoption-diff.d.ts +53 -0
- package/dist/onboarding-adoption-diff.d.ts.map +1 -0
- package/dist/onboarding-adoption-diff.js +285 -0
- package/dist/onboarding-adoption.d.ts +136 -0
- package/dist/onboarding-adoption.d.ts.map +1 -0
- package/dist/onboarding-adoption.js +702 -0
- package/dist/onboarding-agent-import.d.ts +40 -0
- package/dist/onboarding-agent-import.d.ts.map +1 -0
- package/dist/onboarding-agent-import.js +114 -0
- package/dist/onboarding-diff.d.ts +39 -0
- package/dist/onboarding-diff.d.ts.map +1 -0
- package/dist/onboarding-diff.js +240 -0
- package/dist/onboarding-drafts-merge.d.ts +71 -0
- package/dist/onboarding-drafts-merge.d.ts.map +1 -0
- package/dist/onboarding-drafts-merge.js +174 -0
- package/dist/onboarding-drafts.d.ts +42 -0
- package/dist/onboarding-drafts.d.ts.map +1 -0
- package/dist/onboarding-drafts.js +268 -0
- package/dist/onboarding-report.d.ts +8 -0
- package/dist/onboarding-report.d.ts.map +1 -0
- package/dist/onboarding-report.js +239 -0
- package/dist/onboarding.d.ts +134 -0
- package/dist/onboarding.d.ts.map +1 -0
- package/dist/onboarding.js +729 -0
- package/dist/ownership.d.ts +38 -0
- package/dist/ownership.d.ts.map +1 -0
- package/dist/ownership.js +102 -0
- package/dist/pack-author-ux.d.ts +58 -0
- package/dist/pack-author-ux.d.ts.map +1 -0
- package/dist/pack-author-ux.js +219 -0
- package/dist/pack-author.d.ts +94 -0
- package/dist/pack-author.d.ts.map +1 -0
- package/dist/pack-author.js +208 -0
- package/dist/pack-compatibility.d.ts +21 -0
- package/dist/pack-compatibility.d.ts.map +1 -0
- package/dist/pack-compatibility.js +114 -0
- package/dist/pack-contributions-inventory.d.ts +121 -0
- package/dist/pack-contributions-inventory.d.ts.map +1 -0
- package/dist/pack-contributions-inventory.js +732 -0
- package/dist/pack-docs.d.ts +11 -0
- package/dist/pack-docs.d.ts.map +1 -0
- package/dist/pack-docs.js +101 -0
- package/dist/pack-doctor.d.ts +50 -0
- package/dist/pack-doctor.d.ts.map +1 -0
- package/dist/pack-doctor.js +302 -0
- package/dist/pack-helper-registry.d.ts +29 -0
- package/dist/pack-helper-registry.d.ts.map +1 -0
- package/dist/pack-helper-registry.js +144 -0
- package/dist/pack-pending.d.ts +68 -0
- package/dist/pack-pending.d.ts.map +1 -0
- package/dist/pack-pending.js +189 -0
- package/dist/pack-quality-score.d.ts +44 -0
- package/dist/pack-quality-score.d.ts.map +1 -0
- package/dist/pack-quality-score.js +155 -0
- package/dist/pack-release-check.d.ts +24 -0
- package/dist/pack-release-check.d.ts.map +1 -0
- package/dist/pack-release-check.js +258 -0
- package/dist/pack-signature-status.d.ts +72 -0
- package/dist/pack-signature-status.d.ts.map +1 -0
- package/dist/pack-signature-status.js +222 -0
- package/dist/pack-symbol-compat.d.ts +73 -0
- package/dist/pack-symbol-compat.d.ts.map +1 -0
- package/dist/pack-symbol-compat.js +519 -0
- package/dist/pack-test-runner.d.ts +59 -0
- package/dist/pack-test-runner.d.ts.map +1 -0
- package/dist/pack-test-runner.js +211 -0
- package/dist/pipeline-command-dictionary.d.ts +2 -0
- package/dist/pipeline-command-dictionary.d.ts.map +1 -0
- package/dist/pipeline-command-dictionary.js +20 -0
- package/dist/pipeline-lint.d.ts +30 -0
- package/dist/pipeline-lint.d.ts.map +1 -0
- package/dist/pipeline-lint.js +134 -0
- package/dist/plan-dependency-graph.d.ts +25 -0
- package/dist/plan-dependency-graph.d.ts.map +1 -0
- package/dist/plan-dependency-graph.js +195 -0
- package/dist/plan-review.d.ts +64 -0
- package/dist/plan-review.d.ts.map +1 -0
- package/dist/plan-review.js +242 -0
- package/dist/plan-simulation.d.ts +108 -0
- package/dist/plan-simulation.d.ts.map +1 -0
- package/dist/plan-simulation.js +767 -0
- package/dist/playbook-registry.d.ts +25 -0
- package/dist/playbook-registry.d.ts.map +1 -0
- package/dist/playbook-registry.js +148 -0
- package/dist/playbook-script.d.ts +60 -0
- package/dist/playbook-script.d.ts.map +1 -0
- package/dist/playbook-script.js +161 -0
- package/dist/plugin-lifecycle-profile-registry.d.ts +52 -0
- package/dist/plugin-lifecycle-profile-registry.d.ts.map +1 -0
- package/dist/plugin-lifecycle-profile-registry.js +202 -0
- package/dist/plugin-lifecycle.d.ts +132 -0
- package/dist/plugin-lifecycle.d.ts.map +1 -0
- package/dist/plugin-lifecycle.js +477 -0
- package/dist/policy-engine.d.ts +101 -0
- package/dist/policy-engine.d.ts.map +1 -0
- package/dist/policy-engine.js +321 -0
- package/dist/policy-override-audit.d.ts +18 -0
- package/dist/policy-override-audit.d.ts.map +1 -0
- package/dist/policy-override-audit.js +54 -0
- package/dist/policy-overrides.d.ts +35 -0
- package/dist/policy-overrides.d.ts.map +1 -0
- package/dist/policy-overrides.js +84 -0
- package/dist/policy-test.d.ts +83 -0
- package/dist/policy-test.d.ts.map +1 -0
- package/dist/policy-test.js +342 -0
- package/dist/pr-summary.d.ts +34 -0
- package/dist/pr-summary.d.ts.map +1 -0
- package/dist/pr-summary.js +220 -0
- package/dist/product-coherence.d.ts +21 -0
- package/dist/product-coherence.d.ts.map +1 -0
- package/dist/product-coherence.js +158 -0
- package/dist/profile-registry.d.ts +42 -0
- package/dist/profile-registry.d.ts.map +1 -0
- package/dist/profile-registry.js +104 -0
- package/dist/project-coupling-audit.d.ts +64 -0
- package/dist/project-coupling-audit.d.ts.map +1 -0
- package/dist/project-coupling-audit.js +282 -0
- package/dist/project-overview.d.ts +14 -0
- package/dist/project-overview.d.ts.map +1 -0
- package/dist/project-overview.js +27 -0
- package/dist/propose-knowledge.d.ts +64 -0
- package/dist/propose-knowledge.d.ts.map +1 -0
- package/dist/propose-knowledge.js +367 -0
- package/dist/quality-baseline.d.ts +123 -0
- package/dist/quality-baseline.d.ts.map +1 -0
- package/dist/quality-baseline.js +433 -0
- package/dist/quality-html.d.ts +7 -0
- package/dist/quality-html.d.ts.map +1 -0
- package/dist/quality-html.js +64 -0
- package/dist/quality-report.d.ts +49 -0
- package/dist/quality-report.d.ts.map +1 -0
- package/dist/quality-report.js +296 -0
- package/dist/query-resolver.d.ts +38 -0
- package/dist/query-resolver.d.ts.map +1 -0
- package/dist/query-resolver.js +163 -0
- package/dist/ranker-explainability.d.ts +91 -0
- package/dist/ranker-explainability.d.ts.map +1 -0
- package/dist/ranker-explainability.js +550 -0
- package/dist/reference-lookup.d.ts +8 -0
- package/dist/reference-lookup.d.ts.map +1 -0
- package/dist/reference-lookup.js +18 -0
- package/dist/registration-hint-registry.d.ts +55 -0
- package/dist/registration-hint-registry.d.ts.map +1 -0
- package/dist/registration-hint-registry.js +327 -0
- package/dist/registry-lifecycle.d.ts +47 -0
- package/dist/registry-lifecycle.d.ts.map +1 -0
- package/dist/registry-lifecycle.js +214 -0
- package/dist/release-readiness.d.ts +64 -0
- package/dist/release-readiness.d.ts.map +1 -0
- package/dist/release-readiness.js +456 -0
- package/dist/release-smoke.d.ts +138 -0
- package/dist/release-smoke.d.ts.map +1 -0
- package/dist/release-smoke.js +459 -0
- package/dist/release-train.d.ts +33 -0
- package/dist/release-train.d.ts.map +1 -0
- package/dist/release-train.js +104 -0
- package/dist/repo-memory.d.ts +95 -0
- package/dist/repo-memory.d.ts.map +1 -0
- package/dist/repo-memory.js +614 -0
- package/dist/report-site.d.ts +92 -0
- package/dist/report-site.d.ts.map +1 -0
- package/dist/report-site.js +658 -0
- package/dist/reposet.d.ts +56 -0
- package/dist/reposet.d.ts.map +1 -0
- package/dist/reposet.js +160 -0
- package/dist/repository-intelligence.d.ts +145 -0
- package/dist/repository-intelligence.d.ts.map +1 -0
- package/dist/repository-intelligence.js +729 -0
- package/dist/repository-knowledge-model.d.ts +218 -0
- package/dist/repository-knowledge-model.d.ts.map +1 -0
- package/dist/repository-knowledge-model.js +939 -0
- package/dist/repository-map.d.ts +72 -0
- package/dist/repository-map.d.ts.map +1 -0
- package/dist/repository-map.js +332 -0
- package/dist/repository-stats.d.ts +66 -0
- package/dist/repository-stats.d.ts.map +1 -0
- package/dist/repository-stats.js +329 -0
- package/dist/review-comment-renderer.d.ts +59 -0
- package/dist/review-comment-renderer.d.ts.map +1 -0
- package/dist/review-comment-renderer.js +181 -0
- package/dist/review-comment-v2.d.ts +9 -0
- package/dist/review-comment-v2.d.ts.map +1 -0
- package/dist/review-comment-v2.js +178 -0
- package/dist/review-html.d.ts +13 -0
- package/dist/review-html.d.ts.map +1 -0
- package/dist/review-html.js +79 -0
- package/dist/review-packet-v2.d.ts +29 -0
- package/dist/review-packet-v2.d.ts.map +1 -0
- package/dist/review-packet-v2.js +81 -0
- package/dist/review-packet-v3.d.ts +22 -0
- package/dist/review-packet-v3.d.ts.map +1 -0
- package/dist/review-packet-v3.js +181 -0
- package/dist/review-packet.d.ts +49 -0
- package/dist/review-packet.d.ts.map +1 -0
- package/dist/review-packet.js +129 -0
- package/dist/risk-signals.d.ts +28 -0
- package/dist/risk-signals.d.ts.map +1 -0
- package/dist/risk-signals.js +68 -0
- package/dist/role-views.d.ts +50 -0
- package/dist/role-views.d.ts.map +1 -0
- package/dist/role-views.js +334 -0
- package/dist/rounds.d.ts +52 -0
- package/dist/rounds.d.ts.map +1 -0
- package/dist/rounds.js +172 -0
- package/dist/rule-drift.d.ts +42 -0
- package/dist/rule-drift.d.ts.map +1 -0
- package/dist/rule-drift.js +148 -0
- package/dist/rule-quality.d.ts +73 -0
- package/dist/rule-quality.d.ts.map +1 -0
- package/dist/rule-quality.js +356 -0
- package/dist/rule-scaffold.d.ts +71 -0
- package/dist/rule-scaffold.d.ts.map +1 -0
- package/dist/rule-scaffold.js +258 -0
- package/dist/safety-audit-deep.d.ts +38 -0
- package/dist/safety-audit-deep.d.ts.map +1 -0
- package/dist/safety-audit-deep.js +162 -0
- package/dist/safety-audit.d.ts +91 -0
- package/dist/safety-audit.d.ts.map +1 -0
- package/dist/safety-audit.js +138 -0
- package/dist/safety-html.d.ts +7 -0
- package/dist/safety-html.d.ts.map +1 -0
- package/dist/safety-html.js +70 -0
- package/dist/scaffold-coverage.d.ts +46 -0
- package/dist/scaffold-coverage.d.ts.map +1 -0
- package/dist/scaffold-coverage.js +273 -0
- package/dist/scaffold-patterns.d.ts +38 -0
- package/dist/scaffold-patterns.d.ts.map +1 -0
- package/dist/scaffold-patterns.js +282 -0
- package/dist/schema-inventory.d.ts +55 -0
- package/dist/schema-inventory.d.ts.map +1 -0
- package/dist/schema-inventory.js +301 -0
- package/dist/search-index.d.ts +75 -0
- package/dist/search-index.d.ts.map +1 -0
- package/dist/search-index.js +531 -0
- package/dist/search-tuning-explain.d.ts +68 -0
- package/dist/search-tuning-explain.d.ts.map +1 -0
- package/dist/search-tuning-explain.js +207 -0
- package/dist/search-tuning-registry.d.ts +54 -0
- package/dist/search-tuning-registry.d.ts.map +1 -0
- package/dist/search-tuning-registry.js +303 -0
- package/dist/self-audit.d.ts +59 -0
- package/dist/self-audit.d.ts.map +1 -0
- package/dist/self-audit.js +192 -0
- package/dist/self-config-doctor-v2.d.ts +57 -0
- package/dist/self-config-doctor-v2.d.ts.map +1 -0
- package/dist/self-config-doctor-v2.js +653 -0
- package/dist/self-config-doctor.d.ts +47 -0
- package/dist/self-config-doctor.d.ts.map +1 -0
- package/dist/self-config-doctor.js +432 -0
- package/dist/sharkcraft-inspector.d.ts +73 -0
- package/dist/sharkcraft-inspector.d.ts.map +1 -0
- package/dist/sharkcraft-inspector.js +745 -0
- package/dist/spec/spec-cross-validate.d.ts +17 -0
- package/dist/spec/spec-cross-validate.d.ts.map +1 -0
- package/dist/spec/spec-cross-validate.js +53 -0
- package/dist/spec/spec-discovery.d.ts +27 -0
- package/dist/spec/spec-discovery.d.ts.map +1 -0
- package/dist/spec/spec-discovery.js +78 -0
- package/dist/spec/spec-review.d.ts +36 -0
- package/dist/spec/spec-review.d.ts.map +1 -0
- package/dist/spec/spec-review.js +37 -0
- package/dist/stability-map.d.ts +62 -0
- package/dist/stability-map.d.ts.map +1 -0
- package/dist/stability-map.js +404 -0
- package/dist/start-here.d.ts +49 -0
- package/dist/start-here.d.ts.map +1 -0
- package/dist/start-here.js +259 -0
- package/dist/surface-profile-detect.d.ts +42 -0
- package/dist/surface-profile-detect.d.ts.map +1 -0
- package/dist/surface-profile-detect.js +76 -0
- package/dist/symbol-index.d.ts +108 -0
- package/dist/symbol-index.d.ts.map +1 -0
- package/dist/symbol-index.js +483 -0
- package/dist/task-decompose.d.ts +38 -0
- package/dist/task-decompose.d.ts.map +1 -0
- package/dist/task-decompose.js +154 -0
- package/dist/task-packet.d.ts +104 -0
- package/dist/task-packet.d.ts.map +1 -0
- package/dist/task-packet.js +156 -0
- package/dist/task-ranker.d.ts +51 -0
- package/dist/task-ranker.d.ts.map +1 -0
- package/dist/task-ranker.js +410 -0
- package/dist/task-risk.d.ts +84 -0
- package/dist/task-risk.d.ts.map +1 -0
- package/dist/task-risk.js +731 -0
- package/dist/task-routing-hint-registry.d.ts +36 -0
- package/dist/task-routing-hint-registry.d.ts.map +1 -0
- package/dist/task-routing-hint-registry.js +186 -0
- package/dist/template-authoring.d.ts +113 -0
- package/dist/template-authoring.d.ts.map +1 -0
- package/dist/template-authoring.js +521 -0
- package/dist/template-body-inference-v2.d.ts +19 -0
- package/dist/template-body-inference-v2.d.ts.map +1 -0
- package/dist/template-body-inference-v2.js +468 -0
- package/dist/template-body-inference.d.ts +59 -0
- package/dist/template-body-inference.d.ts.map +1 -0
- package/dist/template-body-inference.js +277 -0
- package/dist/template-drift.d.ts +39 -0
- package/dist/template-drift.d.ts.map +1 -0
- package/dist/template-drift.js +353 -0
- package/dist/template-lint.d.ts +31 -0
- package/dist/template-lint.d.ts.map +1 -0
- package/dist/template-lint.js +113 -0
- package/dist/test-definitions.d.ts +41 -0
- package/dist/test-definitions.d.ts.map +1 -0
- package/dist/test-definitions.js +6 -0
- package/dist/test-impact.d.ts +30 -0
- package/dist/test-impact.d.ts.map +1 -0
- package/dist/test-impact.js +173 -0
- package/dist/test-runner.d.ts +87 -0
- package/dist/test-runner.d.ts.map +1 -0
- package/dist/test-runner.js +560 -0
- package/dist/uncertainty-report.d.ts +46 -0
- package/dist/uncertainty-report.d.ts.map +1 -0
- package/dist/uncertainty-report.js +108 -0
- package/dist/uncertainty.d.ts +38 -0
- package/dist/uncertainty.d.ts.map +1 -0
- package/dist/uncertainty.js +115 -0
- package/dist/universal-search.d.ts +64 -0
- package/dist/universal-search.d.ts.map +1 -0
- package/dist/universal-search.js +347 -0
- package/dist/upgrade-advisor.d.ts +22 -0
- package/dist/upgrade-advisor.d.ts.map +1 -0
- package/dist/upgrade-advisor.js +109 -0
- package/dist/why-file.d.ts +75 -0
- package/dist/why-file.d.ts.map +1 -0
- package/dist/why-file.js +202 -0
- package/dist/workflow-simulation.d.ts +46 -0
- package/dist/workflow-simulation.d.ts.map +1 -0
- package/dist/workflow-simulation.js +154 -0
- package/package.json +65 -0
|
@@ -0,0 +1,531 @@
|
|
|
1
|
+
import { readFeatureBundle } from "./feature-bundle.js";
|
|
2
|
+
export const BUNDLE_DIFF_SCHEMA = 'sharkcraft.bundle-diff/v1';
|
|
3
|
+
function esc(s) {
|
|
4
|
+
return s
|
|
5
|
+
.replace(/&/g, '&')
|
|
6
|
+
.replace(/</g, '<')
|
|
7
|
+
.replace(/>/g, '>')
|
|
8
|
+
.replace(/"/g, '"');
|
|
9
|
+
}
|
|
10
|
+
function plansByName(b) {
|
|
11
|
+
return new Map(b.plans.map((p) => [p.name, p]));
|
|
12
|
+
}
|
|
13
|
+
function dependencyKey(d) {
|
|
14
|
+
return `${d.from}→${d.to}`;
|
|
15
|
+
}
|
|
16
|
+
function arrayDiff(a, b) {
|
|
17
|
+
const ax = new Set(a);
|
|
18
|
+
const bx = new Set(b);
|
|
19
|
+
const added = [];
|
|
20
|
+
const removed = [];
|
|
21
|
+
for (const item of b)
|
|
22
|
+
if (!ax.has(item))
|
|
23
|
+
added.push(item);
|
|
24
|
+
for (const item of a)
|
|
25
|
+
if (!bx.has(item))
|
|
26
|
+
removed.push(item);
|
|
27
|
+
return { added, removed };
|
|
28
|
+
}
|
|
29
|
+
function comparePlan(a, b) {
|
|
30
|
+
const out = [];
|
|
31
|
+
if (a.status !== b.status) {
|
|
32
|
+
out.push({ name: a.name, change: 'status', from: a.status, to: b.status });
|
|
33
|
+
}
|
|
34
|
+
if (a.templateId !== b.templateId) {
|
|
35
|
+
out.push({ name: a.name, change: 'template', from: a.templateId, to: b.templateId });
|
|
36
|
+
}
|
|
37
|
+
const aT = a.expectedTargets ?? [];
|
|
38
|
+
const bT = b.expectedTargets ?? [];
|
|
39
|
+
const targetDiff = arrayDiff(aT, bT);
|
|
40
|
+
if (targetDiff.added.length > 0 || targetDiff.removed.length > 0) {
|
|
41
|
+
out.push({
|
|
42
|
+
name: a.name,
|
|
43
|
+
change: 'targets',
|
|
44
|
+
from: { added: [], removed: targetDiff.removed },
|
|
45
|
+
to: { added: targetDiff.added, removed: [] },
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
const aVars = JSON.stringify(a.variables ?? {});
|
|
49
|
+
const bVars = JSON.stringify(b.variables ?? {});
|
|
50
|
+
if (aVars !== bVars) {
|
|
51
|
+
out.push({ name: a.name, change: 'variables', from: a.variables, to: b.variables });
|
|
52
|
+
}
|
|
53
|
+
const aMissing = (a.missingVariables ?? []).slice().sort().join(',');
|
|
54
|
+
const bMissing = (b.missingVariables ?? []).slice().sort().join(',');
|
|
55
|
+
if (aMissing !== bMissing) {
|
|
56
|
+
out.push({
|
|
57
|
+
name: a.name,
|
|
58
|
+
change: 'missing-variables',
|
|
59
|
+
from: a.missingVariables,
|
|
60
|
+
to: b.missingVariables,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
if ((a.reviewReportFile ?? '') !== (b.reviewReportFile ?? '')) {
|
|
64
|
+
out.push({
|
|
65
|
+
name: a.name,
|
|
66
|
+
change: 'review',
|
|
67
|
+
from: a.reviewReportFile ?? null,
|
|
68
|
+
to: b.reviewReportFile ?? null,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
return out;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Similarity scorer for plan rename detection. Each signal is worth a
|
|
75
|
+
* fixed weight; the total is normalised to [0, 1]. The thresholds are tuned
|
|
76
|
+
* to favour precision over recall — a near-perfect template-id+target match
|
|
77
|
+
* is required for the automatic rename path.
|
|
78
|
+
*/
|
|
79
|
+
function scorePlanSimilarity(a, b) {
|
|
80
|
+
const reasons = [];
|
|
81
|
+
let score = 0;
|
|
82
|
+
if (a.templateId === b.templateId) {
|
|
83
|
+
score += 0.4;
|
|
84
|
+
reasons.push(`templateId matches (${a.templateId})`);
|
|
85
|
+
}
|
|
86
|
+
const aT = new Set(a.expectedTargets ?? []);
|
|
87
|
+
const bT = new Set(b.expectedTargets ?? []);
|
|
88
|
+
const intersection = [...aT].filter((t) => bT.has(t));
|
|
89
|
+
const union = new Set([...aT, ...bT]);
|
|
90
|
+
if (union.size > 0) {
|
|
91
|
+
const jaccard = intersection.length / union.size;
|
|
92
|
+
score += 0.3 * jaccard;
|
|
93
|
+
if (jaccard >= 0.5)
|
|
94
|
+
reasons.push(`expected-targets overlap (${intersection.length}/${union.size})`);
|
|
95
|
+
}
|
|
96
|
+
const aVars = JSON.stringify(a.variables ?? {});
|
|
97
|
+
const bVars = JSON.stringify(b.variables ?? {});
|
|
98
|
+
if (aVars === bVars && aVars !== '{}') {
|
|
99
|
+
score += 0.2;
|
|
100
|
+
reasons.push('variables identical');
|
|
101
|
+
}
|
|
102
|
+
if ((a.reviewReportFile ?? '') !== '' && a.reviewReportFile === b.reviewReportFile) {
|
|
103
|
+
score += 0.1;
|
|
104
|
+
reasons.push('review report file matches');
|
|
105
|
+
}
|
|
106
|
+
return { score: Math.min(1, score), reasons };
|
|
107
|
+
}
|
|
108
|
+
const RENAME_AUTO_THRESHOLD = 0.7;
|
|
109
|
+
const RENAME_POSSIBLE_THRESHOLD = 0.45;
|
|
110
|
+
function detectRenames(added, removed, aPlans, bPlans) {
|
|
111
|
+
const renames = [];
|
|
112
|
+
const possible = [];
|
|
113
|
+
const consumedAdded = new Set();
|
|
114
|
+
const consumedRemoved = new Set();
|
|
115
|
+
const pairs = [];
|
|
116
|
+
for (const fromName of removed) {
|
|
117
|
+
const fromPlan = aPlans.get(fromName);
|
|
118
|
+
if (!fromPlan)
|
|
119
|
+
continue;
|
|
120
|
+
for (const toName of added) {
|
|
121
|
+
const toPlan = bPlans.get(toName);
|
|
122
|
+
if (!toPlan)
|
|
123
|
+
continue;
|
|
124
|
+
const { score, reasons } = scorePlanSimilarity(fromPlan, toPlan);
|
|
125
|
+
if (score >= RENAME_POSSIBLE_THRESHOLD) {
|
|
126
|
+
pairs.push({ from: fromName, to: toName, score, reasons });
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
pairs.sort((p, q) => q.score - p.score);
|
|
131
|
+
for (const p of pairs) {
|
|
132
|
+
if (consumedAdded.has(p.to) || consumedRemoved.has(p.from))
|
|
133
|
+
continue;
|
|
134
|
+
const entry = {
|
|
135
|
+
from: p.from,
|
|
136
|
+
to: p.to,
|
|
137
|
+
confidence: Math.round(p.score * 100) / 100,
|
|
138
|
+
reasons: p.reasons,
|
|
139
|
+
};
|
|
140
|
+
if (p.score >= RENAME_AUTO_THRESHOLD) {
|
|
141
|
+
renames.push(entry);
|
|
142
|
+
consumedAdded.add(p.to);
|
|
143
|
+
consumedRemoved.add(p.from);
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
possible.push(entry);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return { renames, possible, consumedAdded, consumedRemoved };
|
|
150
|
+
}
|
|
151
|
+
export function buildBundleDiff(a, b) {
|
|
152
|
+
const warnings = [];
|
|
153
|
+
if (a.id === b.id) {
|
|
154
|
+
warnings.push('Comparing a bundle against itself — no metadata changes expected.');
|
|
155
|
+
}
|
|
156
|
+
const aPlans = plansByName(a);
|
|
157
|
+
const bPlans = plansByName(b);
|
|
158
|
+
const addedPlansRaw = [];
|
|
159
|
+
const removedPlansRaw = [];
|
|
160
|
+
const changedPlans = [];
|
|
161
|
+
for (const name of bPlans.keys())
|
|
162
|
+
if (!aPlans.has(name))
|
|
163
|
+
addedPlansRaw.push(name);
|
|
164
|
+
for (const name of aPlans.keys())
|
|
165
|
+
if (!bPlans.has(name))
|
|
166
|
+
removedPlansRaw.push(name);
|
|
167
|
+
for (const [name, plan] of aPlans) {
|
|
168
|
+
const bp = bPlans.get(name);
|
|
169
|
+
if (!bp)
|
|
170
|
+
continue;
|
|
171
|
+
for (const change of comparePlan(plan, bp))
|
|
172
|
+
changedPlans.push(change);
|
|
173
|
+
}
|
|
174
|
+
// Rename detection — pair plans by template/target/variable similarity
|
|
175
|
+
// before reporting add/remove.
|
|
176
|
+
const rename = detectRenames(addedPlansRaw, removedPlansRaw, aPlans, bPlans);
|
|
177
|
+
const addedPlans = addedPlansRaw.filter((n) => !rename.consumedAdded.has(n));
|
|
178
|
+
const removedPlans = removedPlansRaw.filter((n) => !rename.consumedRemoved.has(n));
|
|
179
|
+
// For renamed plans, run a normal field comparison so the changed-plan list
|
|
180
|
+
// captures any drift inside the rename.
|
|
181
|
+
for (const r of rename.renames) {
|
|
182
|
+
const aPlan = aPlans.get(r.from);
|
|
183
|
+
const bPlan = bPlans.get(r.to);
|
|
184
|
+
if (!aPlan || !bPlan)
|
|
185
|
+
continue;
|
|
186
|
+
for (const change of comparePlan(aPlan, bPlan)) {
|
|
187
|
+
// Report under the new name so downstream renderers can group correctly.
|
|
188
|
+
changedPlans.push({ ...change, name: r.to });
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
const aDepKeys = new Set(a.dependencies.map(dependencyKey));
|
|
192
|
+
const bDepKeys = new Set(b.dependencies.map(dependencyKey));
|
|
193
|
+
const dependencies = {
|
|
194
|
+
added: b.dependencies.filter((d) => !aDepKeys.has(dependencyKey(d))),
|
|
195
|
+
removed: a.dependencies.filter((d) => !bDepKeys.has(dependencyKey(d))),
|
|
196
|
+
};
|
|
197
|
+
// Plan groups
|
|
198
|
+
const aGroups = new Map(a.planGroups.map((g) => [g.id, g.planNames]));
|
|
199
|
+
const bGroups = new Map(b.planGroups.map((g) => [g.id, g.planNames]));
|
|
200
|
+
const groupsAdded = [];
|
|
201
|
+
const groupsRemoved = [];
|
|
202
|
+
const groupsChanged = [];
|
|
203
|
+
for (const id of bGroups.keys())
|
|
204
|
+
if (!aGroups.has(id))
|
|
205
|
+
groupsAdded.push(id);
|
|
206
|
+
for (const id of aGroups.keys())
|
|
207
|
+
if (!bGroups.has(id))
|
|
208
|
+
groupsRemoved.push(id);
|
|
209
|
+
for (const [id, plans] of aGroups) {
|
|
210
|
+
const next = bGroups.get(id);
|
|
211
|
+
if (!next)
|
|
212
|
+
continue;
|
|
213
|
+
const diff = arrayDiff(plans, next);
|
|
214
|
+
if (diff.added.length > 0 || diff.removed.length > 0) {
|
|
215
|
+
groupsChanged.push({ id, addedPlans: diff.added, removedPlans: diff.removed });
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
// Validations: compare by startedAt.
|
|
219
|
+
const aValKeys = new Set(a.validations.map((v) => v.startedAt));
|
|
220
|
+
const bValKeys = new Set(b.validations.map((v) => v.startedAt));
|
|
221
|
+
const validations = {
|
|
222
|
+
added: b.validations
|
|
223
|
+
.filter((v) => !aValKeys.has(v.startedAt))
|
|
224
|
+
.map((v) => ({ startedAt: v.startedAt, passed: v.passed })),
|
|
225
|
+
removed: a.validations
|
|
226
|
+
.filter((v) => !bValKeys.has(v.startedAt))
|
|
227
|
+
.map((v) => ({ startedAt: v.startedAt, passed: v.passed })),
|
|
228
|
+
};
|
|
229
|
+
const filesDiff = arrayDiff(a.affectedFiles, b.affectedFiles);
|
|
230
|
+
const meta = {
|
|
231
|
+
task: a.task !== b.task ? { from: a.task, to: b.task } : null,
|
|
232
|
+
status: a.status !== b.status ? { from: a.status, to: b.status } : null,
|
|
233
|
+
riskLevel: a.riskLevel !== b.riskLevel ? { from: a.riskLevel, to: b.riskLevel } : null,
|
|
234
|
+
nextAction: (a.nextAction ?? null) !== (b.nextAction ?? null)
|
|
235
|
+
? { from: a.nextAction ?? null, to: b.nextAction ?? null }
|
|
236
|
+
: null,
|
|
237
|
+
};
|
|
238
|
+
const summary = {
|
|
239
|
+
totalChanges: (meta.task ? 1 : 0) +
|
|
240
|
+
(meta.status ? 1 : 0) +
|
|
241
|
+
(meta.riskLevel ? 1 : 0) +
|
|
242
|
+
(meta.nextAction ? 1 : 0) +
|
|
243
|
+
addedPlans.length +
|
|
244
|
+
removedPlans.length +
|
|
245
|
+
changedPlans.length +
|
|
246
|
+
rename.renames.length +
|
|
247
|
+
dependencies.added.length +
|
|
248
|
+
dependencies.removed.length +
|
|
249
|
+
groupsAdded.length +
|
|
250
|
+
groupsRemoved.length +
|
|
251
|
+
groupsChanged.length +
|
|
252
|
+
validations.added.length +
|
|
253
|
+
validations.removed.length +
|
|
254
|
+
filesDiff.added.length +
|
|
255
|
+
filesDiff.removed.length,
|
|
256
|
+
addedPlans: addedPlans.length,
|
|
257
|
+
removedPlans: removedPlans.length,
|
|
258
|
+
changedPlans: changedPlans.length,
|
|
259
|
+
renamedPlans: rename.renames.length,
|
|
260
|
+
};
|
|
261
|
+
return {
|
|
262
|
+
schema: BUNDLE_DIFF_SCHEMA,
|
|
263
|
+
generatedAt: new Date().toISOString(),
|
|
264
|
+
aId: a.id,
|
|
265
|
+
bId: b.id,
|
|
266
|
+
metadataChanges: meta,
|
|
267
|
+
addedPlans,
|
|
268
|
+
removedPlans,
|
|
269
|
+
changedPlans,
|
|
270
|
+
renamedPlans: rename.renames,
|
|
271
|
+
possibleRenames: rename.possible,
|
|
272
|
+
dependencies,
|
|
273
|
+
planGroups: { added: groupsAdded, removed: groupsRemoved, changed: groupsChanged },
|
|
274
|
+
validations,
|
|
275
|
+
affectedFiles: { added: filesDiff.added, removed: filesDiff.removed },
|
|
276
|
+
warnings,
|
|
277
|
+
summary,
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
export function buildBundleDiffFromIds(cwd, aId, bId) {
|
|
281
|
+
const a = readFeatureBundle(cwd, aId);
|
|
282
|
+
if (!a)
|
|
283
|
+
return { error: `No bundle "${aId}"` };
|
|
284
|
+
const b = readFeatureBundle(cwd, bId);
|
|
285
|
+
if (!b)
|
|
286
|
+
return { error: `No bundle "${bId}"` };
|
|
287
|
+
return buildBundleDiff(a, b);
|
|
288
|
+
}
|
|
289
|
+
export function renderBundleDiffText(diff) {
|
|
290
|
+
const lines = [];
|
|
291
|
+
lines.push(`Bundle diff ${diff.aId} → ${diff.bId} (generated ${diff.generatedAt})`);
|
|
292
|
+
lines.push(`Total changes: ${diff.summary.totalChanges}`);
|
|
293
|
+
if (diff.metadataChanges.task)
|
|
294
|
+
lines.push(` task: "${diff.metadataChanges.task.from}" → "${diff.metadataChanges.task.to}"`);
|
|
295
|
+
if (diff.metadataChanges.status)
|
|
296
|
+
lines.push(` status: ${diff.metadataChanges.status.from} → ${diff.metadataChanges.status.to}`);
|
|
297
|
+
if (diff.metadataChanges.riskLevel)
|
|
298
|
+
lines.push(` risk: ${diff.metadataChanges.riskLevel.from} → ${diff.metadataChanges.riskLevel.to}`);
|
|
299
|
+
if (diff.addedPlans.length > 0) {
|
|
300
|
+
lines.push('\nAdded plans:');
|
|
301
|
+
for (const p of diff.addedPlans)
|
|
302
|
+
lines.push(` + ${p}`);
|
|
303
|
+
}
|
|
304
|
+
if (diff.removedPlans.length > 0) {
|
|
305
|
+
lines.push('\nRemoved plans:');
|
|
306
|
+
for (const p of diff.removedPlans)
|
|
307
|
+
lines.push(` - ${p}`);
|
|
308
|
+
}
|
|
309
|
+
if (diff.changedPlans.length > 0) {
|
|
310
|
+
lines.push('\nChanged plans:');
|
|
311
|
+
for (const c of diff.changedPlans) {
|
|
312
|
+
lines.push(` ~ ${c.name} [${c.change}]`);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
if (diff.renamedPlans.length > 0) {
|
|
316
|
+
lines.push('\nRenamed plans:');
|
|
317
|
+
for (const r of diff.renamedPlans) {
|
|
318
|
+
lines.push(` → ${r.from} → ${r.to} (conf=${r.confidence}; ${r.reasons.join('; ')})`);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
if (diff.possibleRenames.length > 0) {
|
|
322
|
+
lines.push('\nPossible renames (lower confidence — review):');
|
|
323
|
+
for (const r of diff.possibleRenames) {
|
|
324
|
+
lines.push(` ? ${r.from} ⇢ ${r.to} (conf=${r.confidence})`);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
if (diff.dependencies.added.length > 0 || diff.dependencies.removed.length > 0) {
|
|
328
|
+
lines.push('\nDependencies:');
|
|
329
|
+
for (const d of diff.dependencies.added)
|
|
330
|
+
lines.push(` + ${d.from} → ${d.to} (${d.reason})`);
|
|
331
|
+
for (const d of diff.dependencies.removed)
|
|
332
|
+
lines.push(` - ${d.from} → ${d.to} (${d.reason})`);
|
|
333
|
+
}
|
|
334
|
+
if (diff.planGroups.added.length || diff.planGroups.removed.length || diff.planGroups.changed.length) {
|
|
335
|
+
lines.push('\nPlan groups:');
|
|
336
|
+
for (const id of diff.planGroups.added)
|
|
337
|
+
lines.push(` + ${id}`);
|
|
338
|
+
for (const id of diff.planGroups.removed)
|
|
339
|
+
lines.push(` - ${id}`);
|
|
340
|
+
for (const g of diff.planGroups.changed) {
|
|
341
|
+
lines.push(` ~ ${g.id}: +[${g.addedPlans.join(',')}] -[${g.removedPlans.join(',')}]`);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
if (diff.validations.added.length > 0 || diff.validations.removed.length > 0) {
|
|
345
|
+
lines.push('\nValidations:');
|
|
346
|
+
for (const v of diff.validations.added)
|
|
347
|
+
lines.push(` + ${v.startedAt} ${v.passed ? 'passed' : 'failed'}`);
|
|
348
|
+
for (const v of diff.validations.removed)
|
|
349
|
+
lines.push(` - ${v.startedAt} ${v.passed ? 'passed' : 'failed'}`);
|
|
350
|
+
}
|
|
351
|
+
if (diff.affectedFiles.added.length > 0 || diff.affectedFiles.removed.length > 0) {
|
|
352
|
+
lines.push('\nAffected files:');
|
|
353
|
+
for (const f of diff.affectedFiles.added)
|
|
354
|
+
lines.push(` + ${f}`);
|
|
355
|
+
for (const f of diff.affectedFiles.removed)
|
|
356
|
+
lines.push(` - ${f}`);
|
|
357
|
+
}
|
|
358
|
+
if (diff.warnings.length > 0) {
|
|
359
|
+
lines.push('\nWarnings:');
|
|
360
|
+
for (const w of diff.warnings)
|
|
361
|
+
lines.push(` ! ${w}`);
|
|
362
|
+
}
|
|
363
|
+
return lines.join('\n') + '\n';
|
|
364
|
+
}
|
|
365
|
+
export function renderBundleDiffMarkdown(diff) {
|
|
366
|
+
const lines = [];
|
|
367
|
+
lines.push(`# Bundle diff \`${diff.aId}\` → \`${diff.bId}\``);
|
|
368
|
+
lines.push('');
|
|
369
|
+
lines.push(`Generated: ${diff.generatedAt}`);
|
|
370
|
+
lines.push('');
|
|
371
|
+
lines.push('## Summary');
|
|
372
|
+
lines.push('');
|
|
373
|
+
lines.push(`- Total changes: ${diff.summary.totalChanges}`);
|
|
374
|
+
lines.push(`- Added plans: ${diff.summary.addedPlans}`);
|
|
375
|
+
lines.push(`- Removed plans: ${diff.summary.removedPlans}`);
|
|
376
|
+
lines.push(`- Changed plans: ${diff.summary.changedPlans}`);
|
|
377
|
+
lines.push('');
|
|
378
|
+
if (diff.metadataChanges.task) {
|
|
379
|
+
lines.push(`### Task\n\n\`${diff.metadataChanges.task.from}\` → \`${diff.metadataChanges.task.to}\`\n`);
|
|
380
|
+
}
|
|
381
|
+
if (diff.metadataChanges.status) {
|
|
382
|
+
lines.push(`### Status\n\n${diff.metadataChanges.status.from} → ${diff.metadataChanges.status.to}\n`);
|
|
383
|
+
}
|
|
384
|
+
if (diff.addedPlans.length > 0) {
|
|
385
|
+
lines.push('## Added plans');
|
|
386
|
+
lines.push('');
|
|
387
|
+
for (const p of diff.addedPlans)
|
|
388
|
+
lines.push(`- \`${p}\``);
|
|
389
|
+
lines.push('');
|
|
390
|
+
}
|
|
391
|
+
if (diff.removedPlans.length > 0) {
|
|
392
|
+
lines.push('## Removed plans');
|
|
393
|
+
lines.push('');
|
|
394
|
+
for (const p of diff.removedPlans)
|
|
395
|
+
lines.push(`- \`${p}\``);
|
|
396
|
+
lines.push('');
|
|
397
|
+
}
|
|
398
|
+
if (diff.changedPlans.length > 0) {
|
|
399
|
+
lines.push('## Changed plans');
|
|
400
|
+
lines.push('');
|
|
401
|
+
for (const c of diff.changedPlans) {
|
|
402
|
+
lines.push(`- \`${c.name}\` _[${c.change}]_`);
|
|
403
|
+
}
|
|
404
|
+
lines.push('');
|
|
405
|
+
}
|
|
406
|
+
if (diff.renamedPlans.length > 0) {
|
|
407
|
+
lines.push('## Renamed plans');
|
|
408
|
+
lines.push('');
|
|
409
|
+
for (const r of diff.renamedPlans) {
|
|
410
|
+
lines.push(`- \`${r.from}\` → \`${r.to}\` _(confidence=${r.confidence}; ${r.reasons.join('; ')})_`);
|
|
411
|
+
}
|
|
412
|
+
lines.push('');
|
|
413
|
+
}
|
|
414
|
+
if (diff.possibleRenames.length > 0) {
|
|
415
|
+
lines.push('## Possible renames');
|
|
416
|
+
lines.push('');
|
|
417
|
+
for (const r of diff.possibleRenames) {
|
|
418
|
+
lines.push(`- ? \`${r.from}\` ⇢ \`${r.to}\` _(confidence=${r.confidence})_`);
|
|
419
|
+
}
|
|
420
|
+
lines.push('');
|
|
421
|
+
}
|
|
422
|
+
if (diff.dependencies.added.length > 0 || diff.dependencies.removed.length > 0) {
|
|
423
|
+
lines.push('## Dependencies');
|
|
424
|
+
lines.push('');
|
|
425
|
+
for (const d of diff.dependencies.added)
|
|
426
|
+
lines.push(`- + \`${d.from}\` → \`${d.to}\` (${d.reason})`);
|
|
427
|
+
for (const d of diff.dependencies.removed)
|
|
428
|
+
lines.push(`- − \`${d.from}\` → \`${d.to}\` (${d.reason})`);
|
|
429
|
+
lines.push('');
|
|
430
|
+
}
|
|
431
|
+
if (diff.warnings.length > 0) {
|
|
432
|
+
lines.push('## Warnings');
|
|
433
|
+
lines.push('');
|
|
434
|
+
for (const w of diff.warnings)
|
|
435
|
+
lines.push(`- ${w}`);
|
|
436
|
+
}
|
|
437
|
+
return lines.join('\n') + '\n';
|
|
438
|
+
}
|
|
439
|
+
export function renderBundleDiffHtml(diff) {
|
|
440
|
+
const out = [];
|
|
441
|
+
out.push('<!doctype html><html><head><meta charset="utf-8"><title>Bundle diff</title>');
|
|
442
|
+
out.push('<style>');
|
|
443
|
+
out.push('body{font:14px/1.5 -apple-system,system-ui,sans-serif;max-width:920px;margin:24px auto;padding:0 16px;color:#1a1a1a;background:#fff}');
|
|
444
|
+
out.push('h1{font-size:24px}h2{font-size:18px;margin-top:24px;border-bottom:1px solid #e1e4e8;padding-bottom:4px}');
|
|
445
|
+
out.push('.muted{color:#586069}.tag{display:inline-block;padding:2px 6px;border-radius:4px;font-size:11px;background:#eef2f6}');
|
|
446
|
+
out.push('.add{color:#22863a}.del{color:#b31d28}');
|
|
447
|
+
out.push('table{border-collapse:collapse;width:100%}th,td{border:1px solid #d0d7de;padding:6px 10px;text-align:left}th{background:#f6f8fa}');
|
|
448
|
+
out.push('@media (prefers-color-scheme: dark){body{background:#0d1117;color:#c9d1d9}th{background:#161b22}.muted{color:#8b949e}.tag{background:#21262d}}');
|
|
449
|
+
out.push('</style></head><body>');
|
|
450
|
+
out.push(`<h1>Bundle diff <code>${esc(diff.aId)}</code> → <code>${esc(diff.bId)}</code></h1>`);
|
|
451
|
+
out.push(`<p class="muted">Generated ${esc(diff.generatedAt)}</p>`);
|
|
452
|
+
out.push(`<p>Summary: total=${diff.summary.totalChanges} · +plans=${diff.summary.addedPlans} · −plans=${diff.summary.removedPlans} · ~plans=${diff.summary.changedPlans}</p>`);
|
|
453
|
+
if (diff.metadataChanges.task || diff.metadataChanges.status || diff.metadataChanges.riskLevel) {
|
|
454
|
+
out.push('<h2>Metadata</h2><ul>');
|
|
455
|
+
if (diff.metadataChanges.task)
|
|
456
|
+
out.push(`<li>task: <code>${esc(diff.metadataChanges.task.from)}</code> → <code>${esc(diff.metadataChanges.task.to)}</code></li>`);
|
|
457
|
+
if (diff.metadataChanges.status)
|
|
458
|
+
out.push(`<li>status: ${esc(diff.metadataChanges.status.from)} → ${esc(diff.metadataChanges.status.to)}</li>`);
|
|
459
|
+
if (diff.metadataChanges.riskLevel)
|
|
460
|
+
out.push(`<li>risk: ${esc(diff.metadataChanges.riskLevel.from)} → ${esc(diff.metadataChanges.riskLevel.to)}</li>`);
|
|
461
|
+
out.push('</ul>');
|
|
462
|
+
}
|
|
463
|
+
if (diff.addedPlans.length > 0) {
|
|
464
|
+
out.push('<h2>Added plans</h2><ul>');
|
|
465
|
+
for (const p of diff.addedPlans)
|
|
466
|
+
out.push(`<li class="add">+ <code>${esc(p)}</code></li>`);
|
|
467
|
+
out.push('</ul>');
|
|
468
|
+
}
|
|
469
|
+
if (diff.removedPlans.length > 0) {
|
|
470
|
+
out.push('<h2>Removed plans</h2><ul>');
|
|
471
|
+
for (const p of diff.removedPlans)
|
|
472
|
+
out.push(`<li class="del">− <code>${esc(p)}</code></li>`);
|
|
473
|
+
out.push('</ul>');
|
|
474
|
+
}
|
|
475
|
+
if (diff.changedPlans.length > 0) {
|
|
476
|
+
out.push('<h2>Changed plans</h2>');
|
|
477
|
+
out.push('<table><thead><tr><th>Plan</th><th>Change</th></tr></thead><tbody>');
|
|
478
|
+
for (const c of diff.changedPlans) {
|
|
479
|
+
out.push(`<tr><td><code>${esc(c.name)}</code></td><td><span class="tag">${esc(c.change)}</span></td></tr>`);
|
|
480
|
+
}
|
|
481
|
+
out.push('</tbody></table>');
|
|
482
|
+
}
|
|
483
|
+
if (diff.renamedPlans.length > 0) {
|
|
484
|
+
out.push('<h2>Renamed plans</h2>');
|
|
485
|
+
out.push('<table><thead><tr><th>From</th><th>To</th><th>Confidence</th><th>Reasons</th></tr></thead><tbody>');
|
|
486
|
+
for (const r of diff.renamedPlans) {
|
|
487
|
+
out.push(`<tr><td><code>${esc(r.from)}</code></td><td><code>${esc(r.to)}</code></td><td>${r.confidence}</td><td>${esc(r.reasons.join('; '))}</td></tr>`);
|
|
488
|
+
}
|
|
489
|
+
out.push('</tbody></table>');
|
|
490
|
+
}
|
|
491
|
+
if (diff.possibleRenames.length > 0) {
|
|
492
|
+
out.push('<h2>Possible renames</h2><ul>');
|
|
493
|
+
for (const r of diff.possibleRenames) {
|
|
494
|
+
out.push(`<li>? <code>${esc(r.from)}</code> ⇢ <code>${esc(r.to)}</code> <span class="muted">(confidence ${r.confidence})</span></li>`);
|
|
495
|
+
}
|
|
496
|
+
out.push('</ul>');
|
|
497
|
+
}
|
|
498
|
+
if (diff.dependencies.added.length > 0 || diff.dependencies.removed.length > 0) {
|
|
499
|
+
out.push('<h2>Dependencies</h2><ul>');
|
|
500
|
+
for (const d of diff.dependencies.added)
|
|
501
|
+
out.push(`<li class="add">+ <code>${esc(d.from)}</code> → <code>${esc(d.to)}</code> <span class="muted">(${esc(d.reason)})</span></li>`);
|
|
502
|
+
for (const d of diff.dependencies.removed)
|
|
503
|
+
out.push(`<li class="del">− <code>${esc(d.from)}</code> → <code>${esc(d.to)}</code> <span class="muted">(${esc(d.reason)})</span></li>`);
|
|
504
|
+
out.push('</ul>');
|
|
505
|
+
}
|
|
506
|
+
if (diff.affectedFiles.added.length > 0 || diff.affectedFiles.removed.length > 0) {
|
|
507
|
+
out.push('<h2>Affected files</h2><ul>');
|
|
508
|
+
for (const f of diff.affectedFiles.added)
|
|
509
|
+
out.push(`<li class="add">+ <code>${esc(f)}</code></li>`);
|
|
510
|
+
for (const f of diff.affectedFiles.removed)
|
|
511
|
+
out.push(`<li class="del">− <code>${esc(f)}</code></li>`);
|
|
512
|
+
out.push('</ul>');
|
|
513
|
+
}
|
|
514
|
+
if (diff.warnings.length > 0) {
|
|
515
|
+
out.push('<h2>Warnings</h2><ul>');
|
|
516
|
+
for (const w of diff.warnings)
|
|
517
|
+
out.push(`<li>${esc(w)}</li>`);
|
|
518
|
+
out.push('</ul>');
|
|
519
|
+
}
|
|
520
|
+
out.push('</body></html>');
|
|
521
|
+
return out.join('\n') + '\n';
|
|
522
|
+
}
|
|
523
|
+
export function renderBundleDiff(diff, format) {
|
|
524
|
+
if (format === 'markdown')
|
|
525
|
+
return renderBundleDiffMarkdown(diff);
|
|
526
|
+
if (format === 'html')
|
|
527
|
+
return renderBundleDiffHtml(diff);
|
|
528
|
+
if (format === 'json')
|
|
529
|
+
return JSON.stringify(diff, null, 2) + '\n';
|
|
530
|
+
return renderBundleDiffText(diff);
|
|
531
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export declare const BUNDLE_REPLAY_SCHEMA = "sharkcraft.bundle-replay/v1";
|
|
2
|
+
export declare enum BundleReplayStatus {
|
|
3
|
+
Clean = "clean",
|
|
4
|
+
Warnings = "warnings",
|
|
5
|
+
Tampered = "tampered",
|
|
6
|
+
Missing = "missing"
|
|
7
|
+
}
|
|
8
|
+
export interface IBundleReplayPlanEntry {
|
|
9
|
+
planName: string;
|
|
10
|
+
applied: boolean;
|
|
11
|
+
/** Hash of the plan file at the time of replay. */
|
|
12
|
+
currentHash: string | null;
|
|
13
|
+
/** Hash recorded in the audit log, when available. */
|
|
14
|
+
recordedHash?: string;
|
|
15
|
+
/** Expected targets at replay time. */
|
|
16
|
+
expectedTargets: readonly string[];
|
|
17
|
+
/** Recorded targets if the audit captured them. */
|
|
18
|
+
recordedTargets?: readonly string[];
|
|
19
|
+
/** Issues detected for this plan. */
|
|
20
|
+
issues: readonly string[];
|
|
21
|
+
}
|
|
22
|
+
export interface IBundleReplayWarning {
|
|
23
|
+
code: string;
|
|
24
|
+
message: string;
|
|
25
|
+
planName?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface IBundleReplay {
|
|
28
|
+
schema: typeof BUNDLE_REPLAY_SCHEMA;
|
|
29
|
+
bundleId: string;
|
|
30
|
+
status: BundleReplayStatus;
|
|
31
|
+
generatedAt: string;
|
|
32
|
+
auditEntries: number;
|
|
33
|
+
planEntries: readonly IBundleReplayPlanEntry[];
|
|
34
|
+
warnings: readonly IBundleReplayWarning[];
|
|
35
|
+
recommendedFix: string | null;
|
|
36
|
+
}
|
|
37
|
+
export declare function replayBundle(cwd: string, bundleId: string, options?: {
|
|
38
|
+
strict?: boolean;
|
|
39
|
+
}): IBundleReplay;
|
|
40
|
+
export declare const BUNDLE_REPLAY_BATCH_SCHEMA = "sharkcraft.bundle-replay-batch/v1";
|
|
41
|
+
export interface IBundleReplayBatch {
|
|
42
|
+
schema: typeof BUNDLE_REPLAY_BATCH_SCHEMA;
|
|
43
|
+
generatedAt: string;
|
|
44
|
+
total: number;
|
|
45
|
+
cleanCount: number;
|
|
46
|
+
warningsCount: number;
|
|
47
|
+
tamperedCount: number;
|
|
48
|
+
missingCount: number;
|
|
49
|
+
reports: readonly IBundleReplay[];
|
|
50
|
+
/** Up to 10 most serious issues across all bundles. */
|
|
51
|
+
topIssues: readonly {
|
|
52
|
+
bundleId: string;
|
|
53
|
+
planName?: string;
|
|
54
|
+
code: string;
|
|
55
|
+
message: string;
|
|
56
|
+
}[];
|
|
57
|
+
}
|
|
58
|
+
export interface IBundleReplayAllOptions {
|
|
59
|
+
strict?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* When set, only bundles whose id contains this substring (case-insensitive)
|
|
62
|
+
* are included. Useful as a poor-man's --since filter.
|
|
63
|
+
*/
|
|
64
|
+
match?: string;
|
|
65
|
+
}
|
|
66
|
+
export declare function replayAllBundles(cwd: string, options?: IBundleReplayAllOptions): IBundleReplayBatch;
|
|
67
|
+
export declare function renderBundleReplayBatchHtml(batch: IBundleReplayBatch): string;
|
|
68
|
+
//# sourceMappingURL=bundle-replay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-replay.d.ts","sourceRoot":"","sources":["../src/bundle-replay.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,oBAAoB,gCAAgC,CAAC;AAElE,oBAAY,kBAAkB;IAC5B,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,mDAAmD;IACnD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,mDAAmD;IACnD,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,qCAAqC;IACrC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,OAAO,oBAAoB,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,SAAS,sBAAsB,EAAE,CAAC;IAC/C,QAAQ,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC1C,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAiDD,wBAAgB,YAAY,CAC1B,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACjC,aAAa,CAoIf;AAED,eAAO,MAAM,0BAA0B,sCAAsC,CAAC;AAE9E,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OAAO,0BAA0B,CAAC;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,SAAS,aAAa,EAAE,CAAC;IAClC,uDAAuD;IACvD,SAAS,EAAE,SAAS;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC9F;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,uBAA4B,GACpC,kBAAkB,CAkDpB;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAiC7E"}
|