@shrkcrft/inspector 0.1.0-alpha.2
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 +43 -0
- package/dist/area-map.d.ts.map +1 -0
- package/dist/area-map.js +197 -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 +201 -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 +26 -0
- package/dist/git-helpers.d.ts.map +1 -0
- package/dist/git-helpers.js +110 -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 +413 -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 +223 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +233 -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.d.ts +28 -0
- package/dist/onboarding-drafts.d.ts.map +1 -0
- package/dist/onboarding-drafts.js +234 -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 +60 -0
- package/dist/pack-symbol-compat.d.ts.map +1 -0
- package/dist/pack-symbol-compat.js +371 -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 +71 -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 +66 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Demo-workflow generator. Renders ready-to-run CI workflow files that exercise
|
|
3
|
+
* SharkCraft's PR-review surface (impact + review packet + report site). The
|
|
4
|
+
* generator never executes anything and never makes external network calls.
|
|
5
|
+
* Workflows it emits never publish or post to PRs unless the human explicitly
|
|
6
|
+
* uncomments the optional steps.
|
|
7
|
+
*/
|
|
8
|
+
export const DEMO_WORKFLOW_SCHEMA = 'sharkcraft.demo-workflow/v1';
|
|
9
|
+
function ghaPrReview(bun) {
|
|
10
|
+
const lines = [];
|
|
11
|
+
lines.push('# SharkCraft demo PR review workflow.');
|
|
12
|
+
lines.push('# Generated by `shrk demo workflow pr-review --provider github-actions`.');
|
|
13
|
+
lines.push('# - runs the read-only review surface on every PR.');
|
|
14
|
+
lines.push('# - no publishing, no posting comments by default.');
|
|
15
|
+
lines.push('# - uncomment the optional `gh pr comment` step to opt into PR comment posting.');
|
|
16
|
+
lines.push('name: SharkCraft PR review (demo)');
|
|
17
|
+
lines.push('on:');
|
|
18
|
+
lines.push(' pull_request:');
|
|
19
|
+
lines.push(' branches: [main]');
|
|
20
|
+
lines.push('jobs:');
|
|
21
|
+
lines.push(' sharkcraft-review:');
|
|
22
|
+
lines.push(' runs-on: ubuntu-latest');
|
|
23
|
+
lines.push(' timeout-minutes: 15');
|
|
24
|
+
lines.push(' permissions:');
|
|
25
|
+
lines.push(' contents: read');
|
|
26
|
+
lines.push(' # pull-requests: write # only needed if you uncomment the gh pr comment step');
|
|
27
|
+
lines.push(' steps:');
|
|
28
|
+
lines.push(' - uses: actions/checkout@v4');
|
|
29
|
+
lines.push(' with:');
|
|
30
|
+
lines.push(' fetch-depth: 0');
|
|
31
|
+
lines.push(' - uses: oven-sh/setup-bun@v1');
|
|
32
|
+
lines.push(` with: { bun-version: '${bun}' }`);
|
|
33
|
+
lines.push(' - run: bun install --frozen-lockfile');
|
|
34
|
+
lines.push(' - name: SharkCraft doctor');
|
|
35
|
+
lines.push(' run: bun run shrk doctor');
|
|
36
|
+
lines.push(' - name: Build review packet (v3)');
|
|
37
|
+
lines.push(' run: |');
|
|
38
|
+
lines.push(' mkdir -p .sharkcraft/reports');
|
|
39
|
+
lines.push(' bun run shrk review packet --v3 --since origin/main --json > .sharkcraft/reports/review.json');
|
|
40
|
+
lines.push(' - name: Compute impact since origin/main');
|
|
41
|
+
lines.push(' run: |');
|
|
42
|
+
lines.push(' bun run shrk impact --since origin/main --format json > .sharkcraft/reports/impact.json');
|
|
43
|
+
lines.push(' bun run shrk impact --since origin/main --format html --output .sharkcraft/reports/impact.html');
|
|
44
|
+
lines.push(' - name: Build static report site');
|
|
45
|
+
lines.push(' run: |');
|
|
46
|
+
lines.push(' bun run shrk report site \\');
|
|
47
|
+
lines.push(' --review .sharkcraft/reports/review.json \\');
|
|
48
|
+
lines.push(' --impact .sharkcraft/reports/impact.json \\');
|
|
49
|
+
lines.push(' --with-impact-graphs \\');
|
|
50
|
+
lines.push(' --output .sharkcraft/reports/site');
|
|
51
|
+
lines.push(' - name: Render PR comment (markdown)');
|
|
52
|
+
lines.push(' run: |');
|
|
53
|
+
lines.push(' bun run shrk review render-comment .sharkcraft/reports/review.json \\');
|
|
54
|
+
lines.push(' --output .sharkcraft/reports/review-comment.md');
|
|
55
|
+
lines.push(' # OPTIONAL: post the comment to the PR (requires permissions.pull-requests: write).');
|
|
56
|
+
lines.push(' # - name: Post review comment to PR');
|
|
57
|
+
lines.push(' # env:');
|
|
58
|
+
lines.push(' # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}');
|
|
59
|
+
lines.push(' # run: gh pr comment "${{ github.event.pull_request.number }}" --body-file .sharkcraft/reports/review-comment.md');
|
|
60
|
+
lines.push(' - name: Upload SharkCraft reports');
|
|
61
|
+
lines.push(' if: always()');
|
|
62
|
+
lines.push(' uses: actions/upload-artifact@v4');
|
|
63
|
+
lines.push(' with:');
|
|
64
|
+
lines.push(' name: sharkcraft-reports');
|
|
65
|
+
lines.push(' path: |');
|
|
66
|
+
lines.push(' .sharkcraft/reports/**');
|
|
67
|
+
lines.push(' if-no-files-found: ignore');
|
|
68
|
+
return lines.join('\n') + '\n';
|
|
69
|
+
}
|
|
70
|
+
function gitlabPrReview(bun) {
|
|
71
|
+
const lines = [];
|
|
72
|
+
lines.push('# SharkCraft demo PR review pipeline.');
|
|
73
|
+
lines.push('# Generated by `shrk demo workflow pr-review --provider gitlab`.');
|
|
74
|
+
lines.push('# - runs the read-only review surface on every MR.');
|
|
75
|
+
lines.push('# - no publishing, no posting comments by default.');
|
|
76
|
+
lines.push('');
|
|
77
|
+
lines.push('stages:');
|
|
78
|
+
lines.push(' - sharkcraft_review');
|
|
79
|
+
lines.push('');
|
|
80
|
+
lines.push('sharkcraft:pr-review:');
|
|
81
|
+
lines.push(' stage: sharkcraft_review');
|
|
82
|
+
lines.push(` image: oven/bun:${bun}`);
|
|
83
|
+
lines.push(' rules:');
|
|
84
|
+
lines.push(' - if: $CI_PIPELINE_SOURCE == "merge_request_event"');
|
|
85
|
+
lines.push(' variables:');
|
|
86
|
+
lines.push(' GIT_DEPTH: "0"');
|
|
87
|
+
lines.push(' script:');
|
|
88
|
+
lines.push(' - bun install --frozen-lockfile');
|
|
89
|
+
lines.push(' - mkdir -p .sharkcraft/reports');
|
|
90
|
+
lines.push(' - bun run shrk doctor');
|
|
91
|
+
lines.push(' - bun run shrk review packet --v3 --since $CI_MERGE_REQUEST_TARGET_BRANCH_NAME --json > .sharkcraft/reports/review.json');
|
|
92
|
+
lines.push(' - bun run shrk impact --since $CI_MERGE_REQUEST_TARGET_BRANCH_NAME --format json > .sharkcraft/reports/impact.json');
|
|
93
|
+
lines.push(' - bun run shrk impact --since $CI_MERGE_REQUEST_TARGET_BRANCH_NAME --format html --output .sharkcraft/reports/impact.html');
|
|
94
|
+
lines.push(' - bun run shrk report site --review .sharkcraft/reports/review.json --impact .sharkcraft/reports/impact.json --with-impact-graphs --output .sharkcraft/reports/site');
|
|
95
|
+
lines.push(' - bun run shrk review render-comment .sharkcraft/reports/review.json --output .sharkcraft/reports/review-comment.md');
|
|
96
|
+
lines.push(' artifacts:');
|
|
97
|
+
lines.push(' when: always');
|
|
98
|
+
lines.push(' paths:');
|
|
99
|
+
lines.push(' - .sharkcraft/reports/');
|
|
100
|
+
lines.push(' expire_in: 1 week');
|
|
101
|
+
lines.push('');
|
|
102
|
+
lines.push('# OPTIONAL: post the comment to the MR.');
|
|
103
|
+
lines.push('# Requires CI_JOB_TOKEN read access + python; commented out by default.');
|
|
104
|
+
lines.push('# sharkcraft:pr-comment:');
|
|
105
|
+
lines.push('# stage: sharkcraft_review');
|
|
106
|
+
lines.push('# needs: ["sharkcraft:pr-review"]');
|
|
107
|
+
lines.push('# image: curlimages/curl');
|
|
108
|
+
lines.push('# rules:');
|
|
109
|
+
lines.push('# - if: $CI_PIPELINE_SOURCE == "merge_request_event"');
|
|
110
|
+
lines.push('# script:');
|
|
111
|
+
lines.push('# - "curl --request POST --header \\"PRIVATE-TOKEN: $REVIEW_TOKEN\\" --form body=@.sharkcraft/reports/review-comment.md $CI_API_V4_URL/projects/$CI_PROJECT_ID/merge_requests/$CI_MERGE_REQUEST_IID/notes"');
|
|
112
|
+
return lines.join('\n') + '\n';
|
|
113
|
+
}
|
|
114
|
+
function bitbucketPrReview(bun) {
|
|
115
|
+
const lines = [];
|
|
116
|
+
lines.push('# SharkCraft demo PR review pipeline.');
|
|
117
|
+
lines.push('# Generated by `shrk demo workflow pr-review --provider bitbucket`.');
|
|
118
|
+
lines.push('# - runs the read-only review surface on every pull request.');
|
|
119
|
+
lines.push('# - no publishing, no posting comments by default.');
|
|
120
|
+
lines.push('');
|
|
121
|
+
lines.push(`image: oven/bun:${bun}`);
|
|
122
|
+
lines.push('');
|
|
123
|
+
lines.push('pipelines:');
|
|
124
|
+
lines.push(' pull-requests:');
|
|
125
|
+
lines.push(' "**":');
|
|
126
|
+
lines.push(' - step:');
|
|
127
|
+
lines.push(' name: SharkCraft PR review (demo)');
|
|
128
|
+
lines.push(' script:');
|
|
129
|
+
lines.push(' - bun install --frozen-lockfile');
|
|
130
|
+
lines.push(' - mkdir -p .sharkcraft/reports');
|
|
131
|
+
lines.push(' - bun run shrk doctor');
|
|
132
|
+
lines.push(' - bun run shrk review packet --v3 --since origin/$BITBUCKET_PR_DESTINATION_BRANCH --json > .sharkcraft/reports/review.json');
|
|
133
|
+
lines.push(' - bun run shrk impact --since origin/$BITBUCKET_PR_DESTINATION_BRANCH --format json > .sharkcraft/reports/impact.json');
|
|
134
|
+
lines.push(' - bun run shrk impact --since origin/$BITBUCKET_PR_DESTINATION_BRANCH --format html --output .sharkcraft/reports/impact.html');
|
|
135
|
+
lines.push(' - bun run shrk report site --review .sharkcraft/reports/review.json --impact .sharkcraft/reports/impact.json --with-impact-graphs --output .sharkcraft/reports/site');
|
|
136
|
+
lines.push(' - bun run shrk review render-comment .sharkcraft/reports/review.json --output .sharkcraft/reports/review-comment.md');
|
|
137
|
+
lines.push(' artifacts:');
|
|
138
|
+
lines.push(' - .sharkcraft/reports/**');
|
|
139
|
+
lines.push('');
|
|
140
|
+
lines.push('# OPTIONAL: post the comment to the PR using the Bitbucket REST API.');
|
|
141
|
+
lines.push('# Commented out by default; configure $BITBUCKET_TOKEN before enabling.');
|
|
142
|
+
return lines.join('\n') + '\n';
|
|
143
|
+
}
|
|
144
|
+
const NOTES = [
|
|
145
|
+
'Runs the read-only SharkCraft review surface — impact, review packet, report site.',
|
|
146
|
+
'Never publishes or posts to a PR by default. Optional comment-posting steps are commented out.',
|
|
147
|
+
'Uploads all generated artifacts so reviewers can download them from the CI run.',
|
|
148
|
+
];
|
|
149
|
+
export function defaultDemoWorkflowOutputPath(provider, kind = 'pr-review') {
|
|
150
|
+
if (provider === 'github-actions')
|
|
151
|
+
return `.github/workflows/sharkcraft-${kind}.yml`;
|
|
152
|
+
if (provider === 'gitlab')
|
|
153
|
+
return `.gitlab/${kind}-pipeline.yml`;
|
|
154
|
+
if (provider === 'bitbucket')
|
|
155
|
+
return `bitbucket-pipelines.${kind}.yml`;
|
|
156
|
+
return `sharkcraft-${kind}.yml`;
|
|
157
|
+
}
|
|
158
|
+
export function renderDemoWorkflow(provider, options = {}) {
|
|
159
|
+
const bun = options.bunVersion ?? '1.1.0';
|
|
160
|
+
const kind = options.kind ?? 'pr-review';
|
|
161
|
+
let body;
|
|
162
|
+
if (provider === 'github-actions')
|
|
163
|
+
body = ghaPrReview(bun);
|
|
164
|
+
else if (provider === 'gitlab')
|
|
165
|
+
body = gitlabPrReview(bun);
|
|
166
|
+
else if (provider === 'bitbucket')
|
|
167
|
+
body = bitbucketPrReview(bun);
|
|
168
|
+
else
|
|
169
|
+
throw new Error(`Unknown provider: ${provider}`);
|
|
170
|
+
return {
|
|
171
|
+
schema: DEMO_WORKFLOW_SCHEMA,
|
|
172
|
+
kind,
|
|
173
|
+
provider,
|
|
174
|
+
defaultOutputPath: defaultDemoWorkflowOutputPath(provider, kind),
|
|
175
|
+
body,
|
|
176
|
+
notes: NOTES,
|
|
177
|
+
};
|
|
178
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dev cycle orchestrator.
|
|
3
|
+
*
|
|
4
|
+
* Plans (and renders) a deterministic sequence of read/check commands for a
|
|
5
|
+
* given dev-cycle profile. The actual *execution* lives in the CLI command;
|
|
6
|
+
* this module is pure data + planning.
|
|
7
|
+
*
|
|
8
|
+
* Profiles ship with the engine, and they all consist of read-only or
|
|
9
|
+
* preview-only commands. Auto-fix and auto-apply are never produced here.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DEV_CYCLE_SCHEMA = "sharkcraft.dev-cycle/v1";
|
|
12
|
+
export declare enum DevCycleProfileId {
|
|
13
|
+
SharkcraftSelf = "sharkcraft-self",
|
|
14
|
+
PackAuthor = "pack-author",
|
|
15
|
+
ProjectConsumer = "project-consumer",
|
|
16
|
+
Release = "release"
|
|
17
|
+
}
|
|
18
|
+
export interface IDevCycleStep {
|
|
19
|
+
readonly id: string;
|
|
20
|
+
readonly title: string;
|
|
21
|
+
readonly command: string;
|
|
22
|
+
readonly canFail: boolean;
|
|
23
|
+
readonly category: 'doctor' | 'check' | 'audit' | 'gate' | 'preview' | 'docs';
|
|
24
|
+
}
|
|
25
|
+
export interface IDevCycleProfile {
|
|
26
|
+
readonly id: DevCycleProfileId;
|
|
27
|
+
readonly title: string;
|
|
28
|
+
readonly description: string;
|
|
29
|
+
readonly steps: readonly IDevCycleStep[];
|
|
30
|
+
}
|
|
31
|
+
export declare const BUILTIN_DEV_CYCLE_PROFILES: readonly IDevCycleProfile[];
|
|
32
|
+
export interface IDevCyclePlanReport {
|
|
33
|
+
readonly schema: typeof DEV_CYCLE_SCHEMA;
|
|
34
|
+
readonly profileId: DevCycleProfileId;
|
|
35
|
+
readonly profileTitle: string;
|
|
36
|
+
readonly steps: readonly IDevCycleStep[];
|
|
37
|
+
readonly notes: readonly string[];
|
|
38
|
+
}
|
|
39
|
+
export declare function planDevCycle(profileId: DevCycleProfileId): IDevCyclePlanReport | null;
|
|
40
|
+
export declare function listDevCycleProfiles(): readonly IDevCycleProfile[];
|
|
41
|
+
//# sourceMappingURL=dev-cycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-cycle.d.ts","sourceRoot":"","sources":["../src/dev-cycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,eAAO,MAAM,gBAAgB,4BAA4B,CAAC;AAE1D,oBAAY,iBAAiB;IAC3B,cAAc,oBAAoB;IAClC,UAAU,gBAAgB;IAC1B,eAAe,qBAAqB;IACpC,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;CAC/E;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,EAAE,iBAAiB,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;CAC1C;AA0DD,eAAO,MAAM,0BAA0B,EAAE,SAAS,gBAAgB,EAKjE,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,MAAM,EAAE,OAAO,gBAAgB,CAAC;IACzC,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC;IACtC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,iBAAiB,GAAG,mBAAmB,GAAG,IAAI,CAcrF;AAED,wBAAgB,oBAAoB,IAAI,SAAS,gBAAgB,EAAE,CAElE"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dev cycle orchestrator.
|
|
3
|
+
*
|
|
4
|
+
* Plans (and renders) a deterministic sequence of read/check commands for a
|
|
5
|
+
* given dev-cycle profile. The actual *execution* lives in the CLI command;
|
|
6
|
+
* this module is pure data + planning.
|
|
7
|
+
*
|
|
8
|
+
* Profiles ship with the engine, and they all consist of read-only or
|
|
9
|
+
* preview-only commands. Auto-fix and auto-apply are never produced here.
|
|
10
|
+
*/
|
|
11
|
+
export const DEV_CYCLE_SCHEMA = 'sharkcraft.dev-cycle/v1';
|
|
12
|
+
export var DevCycleProfileId;
|
|
13
|
+
(function (DevCycleProfileId) {
|
|
14
|
+
DevCycleProfileId["SharkcraftSelf"] = "sharkcraft-self";
|
|
15
|
+
DevCycleProfileId["PackAuthor"] = "pack-author";
|
|
16
|
+
DevCycleProfileId["ProjectConsumer"] = "project-consumer";
|
|
17
|
+
DevCycleProfileId["Release"] = "release";
|
|
18
|
+
})(DevCycleProfileId || (DevCycleProfileId = {}));
|
|
19
|
+
const SHARKCRAFT_SELF = {
|
|
20
|
+
id: DevCycleProfileId.SharkcraftSelf,
|
|
21
|
+
title: 'SharkCraft self — coherence + safety',
|
|
22
|
+
description: 'End-to-end cycle for working on the SharkCraft engine itself. All read-only / preview-only.',
|
|
23
|
+
steps: [
|
|
24
|
+
{ id: 'doctor', title: 'Workspace doctor', command: 'shrk doctor', canFail: false, category: 'doctor' },
|
|
25
|
+
{ id: 'self-config-doctor', title: 'Self-config doctor', command: 'shrk self-config doctor', canFail: true, category: 'doctor' },
|
|
26
|
+
{ id: 'knowledge-stale-check', title: 'Knowledge stale-check (CI)', command: 'shrk knowledge stale-check --ci', canFail: true, category: 'gate' },
|
|
27
|
+
{ id: 'templates-drift', title: 'Templates drift (warning+)', command: 'shrk templates drift --min-severity warning', canFail: true, category: 'gate' },
|
|
28
|
+
{ id: 'test-agent', title: 'Agent contract tests', command: 'shrk test agent', canFail: false, category: 'gate' },
|
|
29
|
+
{ id: 'commands-doctor', title: 'Commands doctor', command: 'shrk commands doctor', canFail: true, category: 'doctor' },
|
|
30
|
+
{ id: 'safety-audit', title: 'Safety audit (deep)', command: 'shrk safety audit --deep', canFail: false, category: 'audit' },
|
|
31
|
+
],
|
|
32
|
+
};
|
|
33
|
+
const PACK_AUTHOR = {
|
|
34
|
+
id: DevCycleProfileId.PackAuthor,
|
|
35
|
+
title: 'Pack author — quality + contributions',
|
|
36
|
+
description: 'Cycle for authoring or maintaining a SharkCraft pack.',
|
|
37
|
+
steps: [
|
|
38
|
+
{ id: 'packs-doctor', title: 'Packs doctor', command: 'shrk packs doctor', canFail: true, category: 'doctor' },
|
|
39
|
+
{ id: 'packs-contributions', title: 'Packs contributions inventory', command: 'shrk packs contributions', canFail: true, category: 'audit' },
|
|
40
|
+
{ id: 'packs-conflicts', title: 'Packs conflicts', command: 'shrk packs conflicts', canFail: true, category: 'audit' },
|
|
41
|
+
{ id: 'helper-doctor', title: 'Helper doctor (engine helpers)', command: 'shrk helper doctor', canFail: true, category: 'doctor' },
|
|
42
|
+
{ id: 'feedback-rules-doctor', title: 'Feedback rules doctor', command: 'shrk feedback rules doctor', canFail: true, category: 'doctor' },
|
|
43
|
+
{ id: 'self-config-doctor', title: 'Self-config doctor', command: 'shrk self-config doctor', canFail: true, category: 'doctor' },
|
|
44
|
+
],
|
|
45
|
+
};
|
|
46
|
+
const PROJECT_CONSUMER = {
|
|
47
|
+
id: DevCycleProfileId.ProjectConsumer,
|
|
48
|
+
title: 'Project consumer — daily dev safety',
|
|
49
|
+
description: 'Daily safety loop for a project that consumes SharkCraft packs.',
|
|
50
|
+
steps: [
|
|
51
|
+
{ id: 'doctor', title: 'Workspace doctor', command: 'shrk doctor', canFail: false, category: 'doctor' },
|
|
52
|
+
{ id: 'boundaries-changed-only', title: 'Boundaries (changed-only)', command: 'shrk check boundaries --changed-only', canFail: true, category: 'gate' },
|
|
53
|
+
{ id: 'conventions-check', title: 'Conventions check (changed)', command: 'shrk conventions check', canFail: true, category: 'gate' },
|
|
54
|
+
{ id: 'knowledge-stale-check', title: 'Knowledge stale-check', command: 'shrk knowledge stale-check', canFail: true, category: 'gate' },
|
|
55
|
+
{ id: 'templates-drift', title: 'Templates drift', command: 'shrk templates drift', canFail: true, category: 'gate' },
|
|
56
|
+
],
|
|
57
|
+
};
|
|
58
|
+
const RELEASE = {
|
|
59
|
+
id: DevCycleProfileId.Release,
|
|
60
|
+
title: 'Release — preflight + readiness',
|
|
61
|
+
description: 'Cycle for shipping a release. Read-only inspection; humans run the actual publish.',
|
|
62
|
+
steps: [
|
|
63
|
+
{ id: 'release-readiness', title: 'Release readiness (strict)', command: 'shrk release readiness --strict', canFail: false, category: 'gate' },
|
|
64
|
+
{ id: 'release-smoke', title: 'Release smoke (default scenarios)', command: 'shrk release smoke', canFail: true, category: 'gate' },
|
|
65
|
+
{ id: 'safety-audit', title: 'Safety audit', command: 'shrk safety audit', canFail: false, category: 'audit' },
|
|
66
|
+
{ id: 'product-check', title: 'Product check', command: 'shrk product check', canFail: true, category: 'gate' },
|
|
67
|
+
{ id: 'commands-doctor', title: 'Commands doctor', command: 'shrk commands doctor', canFail: true, category: 'doctor' },
|
|
68
|
+
],
|
|
69
|
+
};
|
|
70
|
+
export const BUILTIN_DEV_CYCLE_PROFILES = [
|
|
71
|
+
SHARKCRAFT_SELF,
|
|
72
|
+
PACK_AUTHOR,
|
|
73
|
+
PROJECT_CONSUMER,
|
|
74
|
+
RELEASE,
|
|
75
|
+
];
|
|
76
|
+
export function planDevCycle(profileId) {
|
|
77
|
+
const p = BUILTIN_DEV_CYCLE_PROFILES.find((x) => x.id === profileId);
|
|
78
|
+
if (!p)
|
|
79
|
+
return null;
|
|
80
|
+
return {
|
|
81
|
+
schema: DEV_CYCLE_SCHEMA,
|
|
82
|
+
profileId: p.id,
|
|
83
|
+
profileTitle: p.title,
|
|
84
|
+
steps: p.steps,
|
|
85
|
+
notes: [
|
|
86
|
+
'All steps are read-only / preview-only. The cycle never auto-applies.',
|
|
87
|
+
'When a step exits non-zero, the loop stops unless --continue-on-error is set.',
|
|
88
|
+
'Run with --until-green to repeat until every non-`canFail` step passes.',
|
|
89
|
+
],
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export function listDevCycleProfiles() {
|
|
93
|
+
return BUILTIN_DEV_CYCLE_PROFILES;
|
|
94
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type IDevSessionLoad } from './dev-session.js';
|
|
2
|
+
export interface IRenderDevSessionHtmlOptions {
|
|
3
|
+
/** Computed next-action hint. */
|
|
4
|
+
nextActionLine?: string;
|
|
5
|
+
/** Whether to include file:// links to local session files. Default true. */
|
|
6
|
+
includeFileLinks?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Render a fully self-contained HTML report for a dev session. No external
|
|
10
|
+
* assets, no JS, no network — works as a local file via `file://`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function renderDevSessionHtml(load: IDevSessionLoad, options?: IRenderDevSessionHtmlOptions): string;
|
|
13
|
+
//# sourceMappingURL=dev-session-html.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-session-html.d.ts","sourceRoot":"","sources":["../src/dev-session-html.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEzE,MAAM,WAAW,4BAA4B;IAC3C,iCAAiC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,eAAe,EACrB,OAAO,GAAE,4BAAiC,GACzC,MAAM,CAmCR"}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { DevSessionPhase } from "./dev-session.js";
|
|
2
|
+
/**
|
|
3
|
+
* Render a fully self-contained HTML report for a dev session. No external
|
|
4
|
+
* assets, no JS, no network — works as a local file via `file://`.
|
|
5
|
+
*/
|
|
6
|
+
export function renderDevSessionHtml(load, options = {}) {
|
|
7
|
+
const state = load.state;
|
|
8
|
+
const task = load.task || state?.task || '(unknown task)';
|
|
9
|
+
const includeLinks = options.includeFileLinks !== false;
|
|
10
|
+
const sections = [];
|
|
11
|
+
sections.push(`<h1>Dev session: ${esc(load.id)}</h1>`);
|
|
12
|
+
sections.push(`<p class="task"><strong>Task:</strong> ${esc(task)}</p>`);
|
|
13
|
+
if (state) {
|
|
14
|
+
sections.push(`<dl class="meta">
|
|
15
|
+
<dt>Phase</dt><dd><span class="phase phase-${esc(state.phase)}">${esc(state.phase)}</span></dd>
|
|
16
|
+
<dt>Created</dt><dd>${esc(state.createdAt)}</dd>
|
|
17
|
+
<dt>Updated</dt><dd>${esc(state.updatedAt)}</dd>
|
|
18
|
+
<dt>Project root</dt><dd><code>${esc(state.projectRoot)}</code></dd>
|
|
19
|
+
</dl>`);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
sections.push('<p class="warn">Legacy session (no session.json) — details are limited to on-disk artifacts.</p>');
|
|
23
|
+
}
|
|
24
|
+
sections.push(renderTimeline(load));
|
|
25
|
+
sections.push(renderPlans(load, includeLinks));
|
|
26
|
+
sections.push(renderAppliedPlans(load));
|
|
27
|
+
sections.push(renderValidations(load));
|
|
28
|
+
sections.push(renderReports(load, includeLinks));
|
|
29
|
+
sections.push(renderCommands(load));
|
|
30
|
+
sections.push(renderRisks(load));
|
|
31
|
+
if (options.nextActionLine) {
|
|
32
|
+
sections.push(`<h2>Next action</h2><pre class="next">${esc(options.nextActionLine)}</pre>`);
|
|
33
|
+
}
|
|
34
|
+
else if (state?.nextAction) {
|
|
35
|
+
sections.push(`<h2>Next action</h2><pre class="next">${esc(state.nextAction)}</pre>`);
|
|
36
|
+
}
|
|
37
|
+
return wrapHtml(`SharkCraft session ${load.id}`, sections.join('\n'));
|
|
38
|
+
}
|
|
39
|
+
function renderTimeline(load) {
|
|
40
|
+
const state = load.state;
|
|
41
|
+
if (!state) {
|
|
42
|
+
return `<h2>Timeline</h2><p>No session.json — timeline reconstructed from filesystem only.</p>`;
|
|
43
|
+
}
|
|
44
|
+
const rows = [];
|
|
45
|
+
rows.push(`<tr><td>${esc(state.createdAt)}</td><td>session started</td></tr>`);
|
|
46
|
+
for (const p of state.plans) {
|
|
47
|
+
const verb = p.status === 'intent' ? 'intent created' : 'plan saved';
|
|
48
|
+
rows.push(`<tr><td>${esc(p.createdAt)}</td><td>${esc(verb)}: <code>${esc(p.file)}</code> (template <code>${esc(p.templateId)}</code>)</td></tr>`);
|
|
49
|
+
}
|
|
50
|
+
for (const a of state.appliedPlans) {
|
|
51
|
+
rows.push(`<tr><td>${esc(a.appliedAt)}</td><td>applied plan <code>${esc(a.file)}</code></td></tr>`);
|
|
52
|
+
}
|
|
53
|
+
for (const v of state.validations) {
|
|
54
|
+
rows.push(`<tr><td>${esc(v.finishedAt)}</td><td>validation ${v.passed ? '<span class="ok">passed</span>' : '<span class="fail">FAILED</span>'} (${v.commandsRun.length} cmd, ${v.boundaryViolations} boundary)</td></tr>`);
|
|
55
|
+
}
|
|
56
|
+
if (state.phase === DevSessionPhase.Completed) {
|
|
57
|
+
rows.push(`<tr><td>${esc(state.updatedAt)}</td><td>session completed</td></tr>`);
|
|
58
|
+
}
|
|
59
|
+
return `<h2>Timeline</h2><table class="timeline"><tbody>${rows.join('\n')}</tbody></table>`;
|
|
60
|
+
}
|
|
61
|
+
function renderPlans(load, includeLinks) {
|
|
62
|
+
const state = load.state;
|
|
63
|
+
if (!state || state.plans.length === 0) {
|
|
64
|
+
return '<h2>Plans</h2><p><em>No plans saved.</em></p>';
|
|
65
|
+
}
|
|
66
|
+
const rows = state.plans.map((p) => {
|
|
67
|
+
const link = includeLinks ? `<a href="file://${esc(load.dir)}/plans/${esc(p.file)}">plans/${esc(p.file)}</a>` : `<code>plans/${esc(p.file)}</code>`;
|
|
68
|
+
const missing = p.missingVariables.length > 0
|
|
69
|
+
? `<br><small>missing: ${p.missingVariables.map(esc).join(', ')}</small>`
|
|
70
|
+
: '';
|
|
71
|
+
const review = p.reviewReportFile
|
|
72
|
+
? `<br><small>review: <code>reports/${esc(p.reviewReportFile)}</code></small>`
|
|
73
|
+
: '';
|
|
74
|
+
return `<tr>
|
|
75
|
+
<td><strong>${esc(p.name)}</strong></td>
|
|
76
|
+
<td>${esc(p.templateId)}</td>
|
|
77
|
+
<td>${link}${missing}${review}</td>
|
|
78
|
+
<td><span class="status status-${esc(p.status)}">${esc(p.status)}</span>${p.signed ? ' <span class="signed">signed</span>' : ''}</td>
|
|
79
|
+
</tr>`;
|
|
80
|
+
});
|
|
81
|
+
return `<h2>Plans</h2><table class="plans">
|
|
82
|
+
<thead><tr><th>Name</th><th>Template</th><th>File</th><th>Status</th></tr></thead>
|
|
83
|
+
<tbody>${rows.join('\n')}</tbody>
|
|
84
|
+
</table>`;
|
|
85
|
+
}
|
|
86
|
+
function renderAppliedPlans(load) {
|
|
87
|
+
const state = load.state;
|
|
88
|
+
if (!state || state.appliedPlans.length === 0) {
|
|
89
|
+
return '<h2>Applied plans</h2><p><em>None recorded (apply is the explicit human step).</em></p>';
|
|
90
|
+
}
|
|
91
|
+
const rows = state.appliedPlans.map((a) => {
|
|
92
|
+
const sig = a.signatureStatus ? `<small>signature: ${esc(a.signatureStatus)}</small>` : '';
|
|
93
|
+
const div = a.divergenceAccepted ? '<small class="warn"> · diverged</small>' : '';
|
|
94
|
+
const files = a.changedFiles && a.changedFiles.length > 0
|
|
95
|
+
? `<details><summary>${a.changedFiles.length} file(s)</summary><ul>${a.changedFiles.map((f) => `<li><code>${esc(f)}</code></li>`).join('')}</ul></details>`
|
|
96
|
+
: '';
|
|
97
|
+
return `<tr><td><code>plans/${esc(a.file)}</code></td><td>${esc(a.appliedAt)}</td><td>${sig}${div}${files}</td></tr>`;
|
|
98
|
+
});
|
|
99
|
+
return `<h2>Applied plans</h2><table class="applied">
|
|
100
|
+
<thead><tr><th>File</th><th>Applied at</th><th>Details</th></tr></thead>
|
|
101
|
+
<tbody>${rows.join('\n')}</tbody>
|
|
102
|
+
</table>`;
|
|
103
|
+
}
|
|
104
|
+
function renderValidations(load) {
|
|
105
|
+
const state = load.state;
|
|
106
|
+
if (!state || state.validations.length === 0) {
|
|
107
|
+
return '<h2>Validations</h2><p><em>Not run.</em></p>';
|
|
108
|
+
}
|
|
109
|
+
const blocks = state.validations.map((v) => {
|
|
110
|
+
const cmds = v.commandsRun
|
|
111
|
+
.map((c) => `<li>${c.passed ? '<span class="ok">✓</span>' : '<span class="fail">✗</span>'} <code>${esc(c.command)}</code>${c.note ? ' — ' + esc(c.note) : ''}</li>`)
|
|
112
|
+
.join('');
|
|
113
|
+
return `<div class="validation ${v.passed ? 'pass' : 'fail'}">
|
|
114
|
+
<h3>${esc(v.finishedAt)} — ${v.passed ? '<span class="ok">PASSED</span>' : '<span class="fail">FAILED</span>'}</h3>
|
|
115
|
+
<p>Report: <code>reports/${esc(v.reportFile)}</code> · boundary=${v.boundaryViolations} · warnings=${v.warnings}</p>
|
|
116
|
+
<ul>${cmds}</ul>
|
|
117
|
+
</div>`;
|
|
118
|
+
});
|
|
119
|
+
return `<h2>Validations</h2>${blocks.join('\n')}`;
|
|
120
|
+
}
|
|
121
|
+
function renderReports(load, includeLinks) {
|
|
122
|
+
if (load.reportsOnDisk.length === 0) {
|
|
123
|
+
return '<h2>Reports</h2><p><em>No reports captured.</em></p>';
|
|
124
|
+
}
|
|
125
|
+
const items = load.reportsOnDisk
|
|
126
|
+
.map((r) => {
|
|
127
|
+
const link = includeLinks
|
|
128
|
+
? `<a href="file://${esc(load.dir)}/reports/${esc(r)}">${esc(r)}</a>`
|
|
129
|
+
: `<code>${esc(r)}</code>`;
|
|
130
|
+
return `<li>${link}</li>`;
|
|
131
|
+
})
|
|
132
|
+
.join('');
|
|
133
|
+
return `<h2>Reports</h2><ul class="reports">${items}</ul>`;
|
|
134
|
+
}
|
|
135
|
+
function renderCommands(load) {
|
|
136
|
+
const id = load.id;
|
|
137
|
+
const cmds = [
|
|
138
|
+
['plan', `shrk dev plan ${id} --template <id> --name <name> [--var k=v ...]`],
|
|
139
|
+
['apply', `shrk apply .sharkcraft/sessions/${id}/plans/<plan>.json --verify-signature`],
|
|
140
|
+
['apply (session-aware)', `shrk apply .sharkcraft/sessions/${id}/plans/<plan>.json --session ${id} --verify-signature`],
|
|
141
|
+
['validate', `shrk dev validate ${id}`],
|
|
142
|
+
['report', `shrk dev report ${id}`],
|
|
143
|
+
];
|
|
144
|
+
return `<h2>Commands</h2><dl class="cmds">${cmds.map(([k, v]) => `<dt>${esc(k)}</dt><dd><pre>${esc(v)}</pre></dd>`).join('')}</dl>`;
|
|
145
|
+
}
|
|
146
|
+
function renderRisks(load) {
|
|
147
|
+
const state = load.state;
|
|
148
|
+
const risks = [];
|
|
149
|
+
if (state) {
|
|
150
|
+
const last = state.validations[state.validations.length - 1];
|
|
151
|
+
if (last && !last.passed)
|
|
152
|
+
risks.push('Last validation failed — review report before shipping.');
|
|
153
|
+
if (state.plans.some((p) => p.missingVariables.length > 0)) {
|
|
154
|
+
risks.push('One or more plans have unresolved variables (intent only).');
|
|
155
|
+
}
|
|
156
|
+
if (state.plans.length > 0 && state.appliedPlans.length === 0 && state.phase !== DevSessionPhase.Completed) {
|
|
157
|
+
risks.push('Plans saved but not applied — apply is the explicit human step.');
|
|
158
|
+
}
|
|
159
|
+
for (const w of state.warnings)
|
|
160
|
+
risks.push(w);
|
|
161
|
+
}
|
|
162
|
+
if (risks.length === 0) {
|
|
163
|
+
return '<h2>Remaining risks</h2><p><em>No risks flagged by deterministic checks.</em></p>';
|
|
164
|
+
}
|
|
165
|
+
return `<h2>Remaining risks</h2><ul class="risks">${risks.map((r) => `<li>${esc(r)}</li>`).join('')}</ul>`;
|
|
166
|
+
}
|
|
167
|
+
function wrapHtml(title, body) {
|
|
168
|
+
return `<!doctype html>
|
|
169
|
+
<html lang="en">
|
|
170
|
+
<head>
|
|
171
|
+
<meta charset="utf-8">
|
|
172
|
+
<title>${esc(title)}</title>
|
|
173
|
+
<style>
|
|
174
|
+
:root { color-scheme: light dark; --bg:#fff; --fg:#1c1c1f; --muted:#666; --accent:#2b6cb0; --ok:#1c7a3e; --warn:#a16207; --fail:#c0392b; }
|
|
175
|
+
@media (prefers-color-scheme: dark) {
|
|
176
|
+
:root { --bg:#1a1a1d; --fg:#e4e4e7; --muted:#a1a1aa; --accent:#60a5fa; --ok:#22c55e; --warn:#f59e0b; --fail:#ef4444; }
|
|
177
|
+
}
|
|
178
|
+
body { background: var(--bg); color: var(--fg); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; margin: 0; padding: 2rem; max-width: 1024px; margin-left: auto; margin-right: auto; }
|
|
179
|
+
h1, h2, h3 { line-height: 1.2; }
|
|
180
|
+
h1 { font-size: 1.8rem; }
|
|
181
|
+
h2 { margin-top: 2rem; border-bottom: 1px solid var(--muted); padding-bottom: .3rem; }
|
|
182
|
+
code, pre { background: rgba(127,127,127,.12); padding: .1em .35em; border-radius: 3px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .92em; }
|
|
183
|
+
pre { padding: .65rem .8rem; overflow-x: auto; }
|
|
184
|
+
dl.meta { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1rem; }
|
|
185
|
+
dl.meta dt { color: var(--muted); }
|
|
186
|
+
table { border-collapse: collapse; width: 100%; margin-top: .5rem; }
|
|
187
|
+
th, td { text-align: left; padding: .35rem .6rem; border-bottom: 1px solid rgba(127,127,127,.18); vertical-align: top; }
|
|
188
|
+
th { font-weight: 600; color: var(--muted); font-size: .85em; text-transform: uppercase; letter-spacing: .03em; }
|
|
189
|
+
.ok { color: var(--ok); }
|
|
190
|
+
.warn { color: var(--warn); }
|
|
191
|
+
.fail { color: var(--fail); }
|
|
192
|
+
.phase, .status { display: inline-block; padding: .1em .55em; border-radius: 3px; font-size: .85em; background: rgba(127,127,127,.18); }
|
|
193
|
+
.phase-completed, .status-applied { background: rgba(34,197,94,.2); color: var(--ok); }
|
|
194
|
+
.phase-validated { background: rgba(34,197,94,.2); color: var(--ok); }
|
|
195
|
+
.phase-validation_failed { background: rgba(239,68,68,.2); color: var(--fail); }
|
|
196
|
+
.phase-applied { background: rgba(45,127,255,.2); color: var(--accent); }
|
|
197
|
+
.signed { background: rgba(34,197,94,.2); color: var(--ok); padding: .05em .35em; border-radius: 3px; font-size: .8em; }
|
|
198
|
+
.validation { margin: .75rem 0; padding: .75rem 1rem; border-left: 3px solid var(--muted); }
|
|
199
|
+
.validation.pass { border-color: var(--ok); }
|
|
200
|
+
.validation.fail { border-color: var(--fail); }
|
|
201
|
+
.next { background: rgba(45,127,255,.1); border-left: 3px solid var(--accent); }
|
|
202
|
+
ul.risks li { color: var(--warn); }
|
|
203
|
+
a { color: var(--accent); }
|
|
204
|
+
.footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid rgba(127,127,127,.2); color: var(--muted); font-size: .85em; }
|
|
205
|
+
</style>
|
|
206
|
+
</head>
|
|
207
|
+
<body>
|
|
208
|
+
${body}
|
|
209
|
+
<p class="footer">Generated by <code>shrk dev report --html</code> — fully local, no telemetry, no network.</p>
|
|
210
|
+
</body>
|
|
211
|
+
</html>
|
|
212
|
+
`;
|
|
213
|
+
}
|
|
214
|
+
function esc(value) {
|
|
215
|
+
if (value === undefined || value === null)
|
|
216
|
+
return '';
|
|
217
|
+
return String(value)
|
|
218
|
+
.replace(/&/g, '&')
|
|
219
|
+
.replace(/</g, '<')
|
|
220
|
+
.replace(/>/g, '>')
|
|
221
|
+
.replace(/"/g, '"')
|
|
222
|
+
.replace(/'/g, ''');
|
|
223
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type IDevSessionLoad } from './dev-session.js';
|
|
2
|
+
export interface IRenderDevSessionReportOptions {
|
|
3
|
+
/** Computed-next-action hint to append. Optional. */
|
|
4
|
+
nextActionLine?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Render a human-readable audit-trail report for a dev session. Pure: takes
|
|
8
|
+
* the loaded session view + optional next-action hint, returns Markdown.
|
|
9
|
+
*/
|
|
10
|
+
export declare function renderDevSessionFinalReport(load: IDevSessionLoad, options?: IRenderDevSessionReportOptions): string;
|
|
11
|
+
//# sourceMappingURL=dev-session-report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-session-report.d.ts","sourceRoot":"","sources":["../src/dev-session-report.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EAErB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,8BAA8B;IAC7C,qDAAqD;IACrD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,eAAe,EACrB,OAAO,GAAE,8BAAmC,GAC3C,MAAM,CA+LR"}
|