@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,238 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Doctor warning noise control.
|
|
3
|
+
*
|
|
4
|
+
* Reads `sharkcraft/doctor.suppressions.json` (and, optionally, a
|
|
5
|
+
* `doctorSuppressions` field on `sharkcraft.config.ts`) and lets callers
|
|
6
|
+
* mark specific findings as suppressed.
|
|
7
|
+
*
|
|
8
|
+
* Rules:
|
|
9
|
+
* - Suppressed findings are counted, not deleted. Renderers know to hide
|
|
10
|
+
* them from the headline output but include the count in summary.
|
|
11
|
+
* - Expired suppressions surface as a warning so authors notice.
|
|
12
|
+
* - Errors are NOT suppressed unless the suppression explicitly marks
|
|
13
|
+
* `allowError: true`. The aggregate output also tells the user that
|
|
14
|
+
* one or more errors were force-suppressed.
|
|
15
|
+
*
|
|
16
|
+
* Schema: sharkcraft.doctor-suppressions/v1
|
|
17
|
+
*/
|
|
18
|
+
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
19
|
+
import * as nodePath from 'node:path';
|
|
20
|
+
import { DoctorSeverity } from "./doctor-result.js";
|
|
21
|
+
export const DOCTOR_SUPPRESSIONS_SCHEMA = 'sharkcraft.doctor-suppressions/v1';
|
|
22
|
+
/** Default file path for doctor suppressions. */
|
|
23
|
+
export function doctorSuppressionsFile(projectRoot) {
|
|
24
|
+
return nodePath.join(projectRoot, 'sharkcraft/doctor.suppressions.json');
|
|
25
|
+
}
|
|
26
|
+
export function loadDoctorSuppressions(projectRoot) {
|
|
27
|
+
const file = doctorSuppressionsFile(projectRoot);
|
|
28
|
+
if (!existsSync(file)) {
|
|
29
|
+
return { schema: DOCTOR_SUPPRESSIONS_SCHEMA, doctorSuppressions: [] };
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
const raw = JSON.parse(readFileSync(file, 'utf8'));
|
|
33
|
+
const entries = Array.isArray(raw.doctorSuppressions) ? raw.doctorSuppressions : [];
|
|
34
|
+
return {
|
|
35
|
+
schema: DOCTOR_SUPPRESSIONS_SCHEMA,
|
|
36
|
+
doctorSuppressions: entries.filter((e) => e && typeof e.reason === 'string'),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return { schema: DOCTOR_SUPPRESSIONS_SCHEMA, doctorSuppressions: [] };
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export function saveDoctorSuppressions(projectRoot, config) {
|
|
44
|
+
const file = doctorSuppressionsFile(projectRoot);
|
|
45
|
+
const out = {
|
|
46
|
+
schema: DOCTOR_SUPPRESSIONS_SCHEMA,
|
|
47
|
+
doctorSuppressions: config.doctorSuppressions,
|
|
48
|
+
};
|
|
49
|
+
writeFileSync(file, JSON.stringify(out, null, 2) + '\n', 'utf8');
|
|
50
|
+
return file;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Derive a stable id for a finding so the same warning can be suppressed
|
|
54
|
+
* across runs even when the message text shifts slightly.
|
|
55
|
+
*/
|
|
56
|
+
export function deriveStableId(check) {
|
|
57
|
+
// The base id is already deterministic in the doctor; we append a short
|
|
58
|
+
// message hash so duplicate-id rows still get distinct ids.
|
|
59
|
+
const msg = check.message ?? '';
|
|
60
|
+
let hash = 0;
|
|
61
|
+
for (let i = 0; i < msg.length; i++) {
|
|
62
|
+
hash = (hash * 31 + msg.charCodeAt(i)) | 0;
|
|
63
|
+
}
|
|
64
|
+
const slug = Math.abs(hash).toString(36).slice(0, 6);
|
|
65
|
+
return `${check.id}:${slug}`;
|
|
66
|
+
}
|
|
67
|
+
export function deriveCategory(check) {
|
|
68
|
+
const id = check.id || '';
|
|
69
|
+
// Match common prefixes seen in the doctor output.
|
|
70
|
+
if (id.startsWith('actionhints-') || id.startsWith('action-hint'))
|
|
71
|
+
return 'action-hint-quality';
|
|
72
|
+
if (id.startsWith('missing-'))
|
|
73
|
+
return 'missing-commands-or-mcp';
|
|
74
|
+
if (id.startsWith('pack:'))
|
|
75
|
+
return 'pack-doctor';
|
|
76
|
+
if (id.startsWith('boundary'))
|
|
77
|
+
return 'boundary';
|
|
78
|
+
return id.split(/[:.\s]/)[0] ?? 'general';
|
|
79
|
+
}
|
|
80
|
+
function isExpired(entry, now) {
|
|
81
|
+
if (!entry.expiresAt)
|
|
82
|
+
return false;
|
|
83
|
+
try {
|
|
84
|
+
return new Date(entry.expiresAt).getTime() < now.getTime();
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function entryMatches(entry, finding) {
|
|
91
|
+
if (entry.id && entry.id === finding.stableId)
|
|
92
|
+
return true;
|
|
93
|
+
if (entry.id && entry.id === finding.id)
|
|
94
|
+
return true;
|
|
95
|
+
if (entry.code && entry.code === finding.id)
|
|
96
|
+
return true;
|
|
97
|
+
if (entry.category && entry.category === finding.category)
|
|
98
|
+
return true;
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
function shouldHideByCategory(category, hide) {
|
|
102
|
+
if (!hide || hide.length === 0)
|
|
103
|
+
return false;
|
|
104
|
+
return hide.includes(category);
|
|
105
|
+
}
|
|
106
|
+
function passesFocus(finding, focus) {
|
|
107
|
+
if (!focus || focus.length === 0 || focus.includes('all'))
|
|
108
|
+
return true;
|
|
109
|
+
const sev = finding.severity;
|
|
110
|
+
if (focus.includes('errors') && sev === DoctorSeverity.Error)
|
|
111
|
+
return true;
|
|
112
|
+
if (focus.includes('warnings') && sev === DoctorSeverity.Warning)
|
|
113
|
+
return true;
|
|
114
|
+
if (focus.includes('info') && sev === DoctorSeverity.Info)
|
|
115
|
+
return true;
|
|
116
|
+
if (focus.includes('ok') && sev === DoctorSeverity.Ok)
|
|
117
|
+
return true;
|
|
118
|
+
// "warnings-new" means: warnings that don't match a suppression. Filter
|
|
119
|
+
// later — at this point we let the row through and the caller will drop
|
|
120
|
+
// already-suppressed warnings via quietKnown.
|
|
121
|
+
if (focus.includes('warnings-new') && sev === DoctorSeverity.Warning)
|
|
122
|
+
return true;
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
export function filterDoctorResult(doctor, options = {}) {
|
|
126
|
+
const now = new Date();
|
|
127
|
+
const suppressions = options.suppressions ?? [];
|
|
128
|
+
const expired = [];
|
|
129
|
+
const liveSuppressions = [];
|
|
130
|
+
for (const s of suppressions) {
|
|
131
|
+
if (isExpired(s, now))
|
|
132
|
+
expired.push(s);
|
|
133
|
+
else
|
|
134
|
+
liveSuppressions.push(s);
|
|
135
|
+
}
|
|
136
|
+
const annotated = doctor.checks.map((c) => ({
|
|
137
|
+
...c,
|
|
138
|
+
stableId: deriveStableId(c),
|
|
139
|
+
category: deriveCategory(c),
|
|
140
|
+
}));
|
|
141
|
+
const matched = new Map();
|
|
142
|
+
for (const s of liveSuppressions)
|
|
143
|
+
matched.set(s, 0);
|
|
144
|
+
const visible = [];
|
|
145
|
+
const suppressed = [];
|
|
146
|
+
for (const finding of annotated) {
|
|
147
|
+
// 1) hide by category list.
|
|
148
|
+
if (shouldHideByCategory(finding.category, options.hide)) {
|
|
149
|
+
suppressed.push(finding);
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
// 2) suppression entries.
|
|
153
|
+
const match = liveSuppressions.find((s) => entryMatches(s, finding));
|
|
154
|
+
if (match) {
|
|
155
|
+
const isError = finding.severity === DoctorSeverity.Error;
|
|
156
|
+
if (isError && !match.allowError) {
|
|
157
|
+
// Cannot suppress an error implicitly — keep it.
|
|
158
|
+
visible.push(finding);
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
matched.set(match, (matched.get(match) ?? 0) + 1);
|
|
162
|
+
suppressed.push(finding);
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
// 3) focus filter.
|
|
166
|
+
if (!passesFocus(finding, options.focus)) {
|
|
167
|
+
suppressed.push(finding);
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
visible.push(finding);
|
|
171
|
+
}
|
|
172
|
+
// 4) quiet-known: drop visible rows that have a matching suppression
|
|
173
|
+
// (already moved to suppressed) — already handled. Additionally, when
|
|
174
|
+
// quietKnown is set we drop "ok" rows that share a category with a
|
|
175
|
+
// suppression so they don't clutter the headline.
|
|
176
|
+
if (options.quietKnown) {
|
|
177
|
+
const knownCats = new Set(liveSuppressions.map((s) => s.category).filter(Boolean));
|
|
178
|
+
for (let i = visible.length - 1; i >= 0; i--) {
|
|
179
|
+
const v = visible[i];
|
|
180
|
+
if (v && v.severity === DoctorSeverity.Ok && knownCats.has(v.category)) {
|
|
181
|
+
visible.splice(i, 1);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const summary = {
|
|
186
|
+
ok: 0,
|
|
187
|
+
info: 0,
|
|
188
|
+
warnings: 0,
|
|
189
|
+
errors: 0,
|
|
190
|
+
suppressedWarnings: 0,
|
|
191
|
+
suppressedInfo: 0,
|
|
192
|
+
suppressedErrors: 0,
|
|
193
|
+
};
|
|
194
|
+
for (const v of visible) {
|
|
195
|
+
if (v.severity === DoctorSeverity.Ok)
|
|
196
|
+
summary.ok += 1;
|
|
197
|
+
else if (v.severity === DoctorSeverity.Info)
|
|
198
|
+
summary.info += 1;
|
|
199
|
+
else if (v.severity === DoctorSeverity.Warning)
|
|
200
|
+
summary.warnings += 1;
|
|
201
|
+
else if (v.severity === DoctorSeverity.Error)
|
|
202
|
+
summary.errors += 1;
|
|
203
|
+
}
|
|
204
|
+
for (const s of suppressed) {
|
|
205
|
+
if (s.severity === DoctorSeverity.Warning)
|
|
206
|
+
summary.suppressedWarnings += 1;
|
|
207
|
+
else if (s.severity === DoctorSeverity.Info)
|
|
208
|
+
summary.suppressedInfo += 1;
|
|
209
|
+
else if (s.severity === DoctorSeverity.Error)
|
|
210
|
+
summary.suppressedErrors += 1;
|
|
211
|
+
}
|
|
212
|
+
return {
|
|
213
|
+
schema: 'sharkcraft.doctor-filtered/v1',
|
|
214
|
+
passed: summary.errors === 0,
|
|
215
|
+
checks: visible,
|
|
216
|
+
suppressedChecks: suppressed,
|
|
217
|
+
expiredSuppressions: expired,
|
|
218
|
+
appliedSuppressions: liveSuppressions.map((entry) => ({
|
|
219
|
+
entry,
|
|
220
|
+
matched: matched.get(entry) ?? 0,
|
|
221
|
+
})),
|
|
222
|
+
summary,
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
export function buildSuppressionEntry(input) {
|
|
226
|
+
const out = { reason: input.reason };
|
|
227
|
+
if (input.id)
|
|
228
|
+
out.id = input.id;
|
|
229
|
+
if (input.code)
|
|
230
|
+
out.code = input.code;
|
|
231
|
+
if (input.category)
|
|
232
|
+
out.category = input.category;
|
|
233
|
+
if (input.expiresAt)
|
|
234
|
+
out.expiresAt = input.expiresAt;
|
|
235
|
+
if (input.allowError)
|
|
236
|
+
out.allowError = input.allowError;
|
|
237
|
+
return out;
|
|
238
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ISharkcraftInspection } from './sharkcraft-inspector.js';
|
|
2
|
+
export declare const DRIFT_BASELINE_SCHEMA = "sharkcraft.drift-baseline/v1";
|
|
3
|
+
export interface IDriftBaselineFinding {
|
|
4
|
+
fingerprint: string;
|
|
5
|
+
category: string;
|
|
6
|
+
severity: string;
|
|
7
|
+
message: string;
|
|
8
|
+
ruleId?: string;
|
|
9
|
+
file?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IDriftBaseline {
|
|
12
|
+
schema: typeof DRIFT_BASELINE_SCHEMA;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
projectRoot: string;
|
|
15
|
+
findings: readonly IDriftBaselineFinding[];
|
|
16
|
+
}
|
|
17
|
+
export interface IDriftBaselineComparison {
|
|
18
|
+
schema: 'sharkcraft.drift-baseline-comparison/v1';
|
|
19
|
+
baselineFile: string;
|
|
20
|
+
baseline: IDriftBaseline;
|
|
21
|
+
current: IDriftBaseline;
|
|
22
|
+
existing: readonly IDriftBaselineFinding[];
|
|
23
|
+
newFindings: readonly IDriftBaselineFinding[];
|
|
24
|
+
resolved: readonly IDriftBaselineFinding[];
|
|
25
|
+
}
|
|
26
|
+
export declare function createDriftBaseline(inspection: ISharkcraftInspection, outFile: string): IDriftBaseline;
|
|
27
|
+
export declare function readDriftBaseline(file: string): IDriftBaseline | null;
|
|
28
|
+
export declare function compareDriftBaseline(inspection: ISharkcraftInspection, baselineFile: string): IDriftBaselineComparison | null;
|
|
29
|
+
//# sourceMappingURL=drift-baseline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drift-baseline.d.ts","sourceRoot":"","sources":["../src/drift-baseline.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGvE,eAAO,MAAM,qBAAqB,iCAAiC,CAAC;AAEpE,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,OAAO,qBAAqB,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,SAAS,qBAAqB,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,yCAAyC,CAAC;IAClD,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,cAAc,CAAC;IACzB,OAAO,EAAE,cAAc,CAAC;IACxB,QAAQ,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAC3C,WAAW,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAC9C,QAAQ,EAAE,SAAS,qBAAqB,EAAE,CAAC;CAC5C;AA8BD,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,qBAAqB,EACjC,OAAO,EAAE,MAAM,GACd,cAAc,CAYhB;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAOrE;AAED,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,qBAAqB,EACjC,YAAY,EAAE,MAAM,GACnB,wBAAwB,GAAG,IAAI,CAwBjC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import * as nodePath from 'node:path';
|
|
3
|
+
import { buildDriftReport } from "./drift.js";
|
|
4
|
+
export const DRIFT_BASELINE_SCHEMA = 'sharkcraft.drift-baseline/v1';
|
|
5
|
+
function fingerprint(f) {
|
|
6
|
+
const ev = (f.evidence ?? {});
|
|
7
|
+
return [
|
|
8
|
+
f.category,
|
|
9
|
+
f.severity,
|
|
10
|
+
ev.ruleId ?? '',
|
|
11
|
+
ev.file ?? '',
|
|
12
|
+
f.message.slice(0, 80),
|
|
13
|
+
].join('|');
|
|
14
|
+
}
|
|
15
|
+
function toBaselineFinding(f) {
|
|
16
|
+
const ev = (f.evidence ?? {});
|
|
17
|
+
const out = {
|
|
18
|
+
fingerprint: fingerprint(f),
|
|
19
|
+
category: f.category,
|
|
20
|
+
severity: f.severity,
|
|
21
|
+
message: f.message,
|
|
22
|
+
};
|
|
23
|
+
if (ev.ruleId)
|
|
24
|
+
out.ruleId = ev.ruleId;
|
|
25
|
+
if (ev.file)
|
|
26
|
+
out.file = ev.file;
|
|
27
|
+
return out;
|
|
28
|
+
}
|
|
29
|
+
function nowIso() {
|
|
30
|
+
return new Date().toISOString();
|
|
31
|
+
}
|
|
32
|
+
export function createDriftBaseline(inspection, outFile) {
|
|
33
|
+
const drift = buildDriftReport(inspection);
|
|
34
|
+
const findings = drift.findings.map(toBaselineFinding);
|
|
35
|
+
const baseline = {
|
|
36
|
+
schema: DRIFT_BASELINE_SCHEMA,
|
|
37
|
+
createdAt: nowIso(),
|
|
38
|
+
projectRoot: inspection.projectRoot,
|
|
39
|
+
findings,
|
|
40
|
+
};
|
|
41
|
+
mkdirSync(nodePath.dirname(outFile), { recursive: true });
|
|
42
|
+
writeFileSync(outFile, JSON.stringify(baseline, null, 2) + '\n', 'utf8');
|
|
43
|
+
return baseline;
|
|
44
|
+
}
|
|
45
|
+
export function readDriftBaseline(file) {
|
|
46
|
+
if (!existsSync(file))
|
|
47
|
+
return null;
|
|
48
|
+
try {
|
|
49
|
+
return JSON.parse(readFileSync(file, 'utf8'));
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export function compareDriftBaseline(inspection, baselineFile) {
|
|
56
|
+
const baseline = readDriftBaseline(baselineFile);
|
|
57
|
+
if (!baseline)
|
|
58
|
+
return null;
|
|
59
|
+
const drift = buildDriftReport(inspection);
|
|
60
|
+
const currentList = drift.findings.map(toBaselineFinding);
|
|
61
|
+
const baselineSet = new Set(baseline.findings.map((f) => f.fingerprint));
|
|
62
|
+
const currentSet = new Set(currentList.map((f) => f.fingerprint));
|
|
63
|
+
const existing = currentList.filter((f) => baselineSet.has(f.fingerprint));
|
|
64
|
+
const newFindings = currentList.filter((f) => !baselineSet.has(f.fingerprint));
|
|
65
|
+
const resolved = baseline.findings.filter((f) => !currentSet.has(f.fingerprint));
|
|
66
|
+
return {
|
|
67
|
+
schema: 'sharkcraft.drift-baseline-comparison/v1',
|
|
68
|
+
baselineFile,
|
|
69
|
+
baseline,
|
|
70
|
+
current: {
|
|
71
|
+
schema: DRIFT_BASELINE_SCHEMA,
|
|
72
|
+
createdAt: nowIso(),
|
|
73
|
+
projectRoot: inspection.projectRoot,
|
|
74
|
+
findings: currentList,
|
|
75
|
+
},
|
|
76
|
+
existing,
|
|
77
|
+
newFindings,
|
|
78
|
+
resolved,
|
|
79
|
+
};
|
|
80
|
+
}
|
package/dist/drift.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ISharkcraftInspection } from './sharkcraft-inspector.js';
|
|
2
|
+
export type DriftSeverity = 'error' | 'warning' | 'info';
|
|
3
|
+
export type DriftCategory = 'boundary' | 'preset-reference' | 'preset-composition' | 'missing-pack-asset' | 'config-mismatch' | 'template-relationship' | 'pipeline-template-link';
|
|
4
|
+
export interface IDriftFinding {
|
|
5
|
+
category: DriftCategory;
|
|
6
|
+
severity: DriftSeverity;
|
|
7
|
+
message: string;
|
|
8
|
+
evidence?: Record<string, unknown>;
|
|
9
|
+
suggestedFix?: string;
|
|
10
|
+
related?: {
|
|
11
|
+
kind: 'rule' | 'template' | 'path' | 'pipeline' | 'preset' | 'pack';
|
|
12
|
+
id: string;
|
|
13
|
+
}[];
|
|
14
|
+
}
|
|
15
|
+
export interface IDriftReport {
|
|
16
|
+
findings: IDriftFinding[];
|
|
17
|
+
counts: {
|
|
18
|
+
error: number;
|
|
19
|
+
warning: number;
|
|
20
|
+
info: number;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface IBuildDriftOptions {
|
|
24
|
+
/** When true, run the full boundary scan (slow on large repos). Default: true. */
|
|
25
|
+
runBoundaries?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* First-cut drift report. Combines:
|
|
29
|
+
* - Boundary violations (when boundary rules are present).
|
|
30
|
+
* - Preset reference resolution (missing pack assets).
|
|
31
|
+
* - Preset composition issues.
|
|
32
|
+
* - Pipeline → template references that don't resolve.
|
|
33
|
+
*
|
|
34
|
+
* Pure orchestration over existing services. Returns warnings by default;
|
|
35
|
+
* elevates clear architecture problems to errors.
|
|
36
|
+
*/
|
|
37
|
+
export declare function buildDriftReport(inspection: ISharkcraftInspection, options?: IBuildDriftOptions): IDriftReport;
|
|
38
|
+
//# sourceMappingURL=drift.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drift.d.ts","sourceRoot":"","sources":["../src/drift.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGvE,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AACzD,MAAM,MAAM,aAAa,GACrB,UAAU,GACV,kBAAkB,GAClB,oBAAoB,GACpB,oBAAoB,GACpB,iBAAiB,GACjB,uBAAuB,GACvB,wBAAwB,CAAC;AAE7B,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,aAAa,CAAC;IACxB,QAAQ,EAAE,aAAa,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACjG;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1D;AAED,MAAM,WAAW,kBAAkB;IACjC,kFAAkF;IAClF,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,qBAAqB,EACjC,OAAO,GAAE,kBAAuB,GAC/B,YAAY,CAuGd"}
|
package/dist/drift.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { evaluateBoundaries, loadTsconfigPaths, scanImports } from '@shrkcrft/boundaries';
|
|
2
|
+
import { resolvePreset, resolvePresetReferences } from '@shrkcrft/presets';
|
|
3
|
+
import { inspectionReferenceLookup } from "./reference-lookup.js";
|
|
4
|
+
/**
|
|
5
|
+
* First-cut drift report. Combines:
|
|
6
|
+
* - Boundary violations (when boundary rules are present).
|
|
7
|
+
* - Preset reference resolution (missing pack assets).
|
|
8
|
+
* - Preset composition issues.
|
|
9
|
+
* - Pipeline → template references that don't resolve.
|
|
10
|
+
*
|
|
11
|
+
* Pure orchestration over existing services. Returns warnings by default;
|
|
12
|
+
* elevates clear architecture problems to errors.
|
|
13
|
+
*/
|
|
14
|
+
export function buildDriftReport(inspection, options = {}) {
|
|
15
|
+
const findings = [];
|
|
16
|
+
// 1. Boundary violations.
|
|
17
|
+
if ((options.runBoundaries ?? true) && inspection.boundaryRegistry.size() > 0) {
|
|
18
|
+
const scan = scanImports({ projectRoot: inspection.projectRoot });
|
|
19
|
+
const tsconfigPaths = loadTsconfigPaths(inspection.projectRoot);
|
|
20
|
+
const evalResult = evaluateBoundaries(scan, inspection.boundaryRegistry.list(), {
|
|
21
|
+
...(tsconfigPaths.aliases.size > 0 ? { tsconfigPaths } : {}),
|
|
22
|
+
});
|
|
23
|
+
for (const v of evalResult.violations) {
|
|
24
|
+
findings.push({
|
|
25
|
+
category: 'boundary',
|
|
26
|
+
severity: v.severity,
|
|
27
|
+
message: v.message,
|
|
28
|
+
evidence: {
|
|
29
|
+
ruleId: v.ruleId,
|
|
30
|
+
file: v.file,
|
|
31
|
+
line: v.line,
|
|
32
|
+
importSpecifier: v.importSpecifier,
|
|
33
|
+
},
|
|
34
|
+
suggestedFix: v.suggestedFix,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// 2. Preset reference resolution + composition issues.
|
|
39
|
+
const refLookup = inspectionReferenceLookup(inspection);
|
|
40
|
+
for (const preset of inspection.presetRegistry.list()) {
|
|
41
|
+
const resolved = resolvePreset(inspection.presetRegistry, preset.id);
|
|
42
|
+
for (const issue of resolved.issues) {
|
|
43
|
+
findings.push({
|
|
44
|
+
category: 'preset-composition',
|
|
45
|
+
severity: 'error',
|
|
46
|
+
message: `Preset "${preset.id}": ${issue.message}`,
|
|
47
|
+
evidence: { presetId: preset.id, code: issue.code },
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
const refs = resolvePresetReferences(resolved, refLookup);
|
|
51
|
+
for (const missing of refs.missing) {
|
|
52
|
+
findings.push({
|
|
53
|
+
category: 'preset-reference',
|
|
54
|
+
severity: 'warning',
|
|
55
|
+
message: `Preset "${preset.id}" references missing ${missing.kind} id "${missing.id}".`,
|
|
56
|
+
evidence: { presetId: preset.id, ...missing },
|
|
57
|
+
suggestedFix: 'Install the pack that provides this asset, or add the asset locally.',
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// 3. Pipeline step references to templates that don't exist.
|
|
62
|
+
for (const pipeline of inspection.pipelines) {
|
|
63
|
+
for (const step of pipeline.steps ?? []) {
|
|
64
|
+
for (const ref of step.references ?? []) {
|
|
65
|
+
if (!inspection.templates.some((t) => t.id === ref) &&
|
|
66
|
+
!inspection.knowledgeEntries.some((e) => e.id === ref)) {
|
|
67
|
+
findings.push({
|
|
68
|
+
category: 'pipeline-template-link',
|
|
69
|
+
severity: 'warning',
|
|
70
|
+
message: `Pipeline "${pipeline.id}" step "${step.id}" references unknown id "${ref}".`,
|
|
71
|
+
evidence: { pipelineId: pipeline.id, stepId: step.id, ref },
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
// 4. Templates that declare related ids that don't resolve (action hints).
|
|
78
|
+
for (const entry of inspection.knowledgeEntries) {
|
|
79
|
+
const ah = entry.actionHints;
|
|
80
|
+
if (!ah)
|
|
81
|
+
continue;
|
|
82
|
+
for (const id of ah.relatedTemplates ?? []) {
|
|
83
|
+
if (!inspection.templates.some((t) => t.id === id)) {
|
|
84
|
+
findings.push({
|
|
85
|
+
category: 'template-relationship',
|
|
86
|
+
severity: 'info',
|
|
87
|
+
message: `Entry "${entry.id}" hints relatedTemplate "${id}" but no template with that id is registered.`,
|
|
88
|
+
evidence: { entryId: entry.id, templateId: id },
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
for (const id of ah.relatedPathConventions ?? []) {
|
|
93
|
+
if (!inspection.knowledgeEntries.some((e) => e.id === id && String(e.type) === 'path')) {
|
|
94
|
+
findings.push({
|
|
95
|
+
category: 'template-relationship',
|
|
96
|
+
severity: 'info',
|
|
97
|
+
message: `Entry "${entry.id}" hints relatedPathConvention "${id}" but no path convention with that id is registered.`,
|
|
98
|
+
evidence: { entryId: entry.id, pathId: id },
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const counts = { error: 0, warning: 0, info: 0 };
|
|
104
|
+
for (const f of findings)
|
|
105
|
+
counts[f.severity] += 1;
|
|
106
|
+
return { findings, counts };
|
|
107
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entrypoint matrix.
|
|
3
|
+
*
|
|
4
|
+
* Classifies SharkCraft's many "get me context" / "what should I do?" surfaces
|
|
5
|
+
* into four discrete entrypoint classes:
|
|
6
|
+
*
|
|
7
|
+
* - human-interactive — shells / TTY use; primary first answer.
|
|
8
|
+
* - agent-mcp — what an AI coding agent should call first.
|
|
9
|
+
* - machine-json — non-human, machine-consumable JSON packets.
|
|
10
|
+
* - debug-explainability — ranker / boundary / search debugging.
|
|
11
|
+
*
|
|
12
|
+
* This is pure curated data. The CLI exposes it via `shrk commands matrix`,
|
|
13
|
+
* and individual commands (`shrk task`, `shrk context`, `shrk recommend`)
|
|
14
|
+
* include a one-line banner referencing this matrix so the operator sees
|
|
15
|
+
* which class they reached.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ENTRYPOINT_MATRIX_SCHEMA = "sharkcraft.entrypoint-matrix/v1";
|
|
18
|
+
export declare enum EntrypointClass {
|
|
19
|
+
HumanInteractive = "human-interactive",
|
|
20
|
+
AgentMcp = "agent-mcp",
|
|
21
|
+
MachineJson = "machine-json",
|
|
22
|
+
DebugExplainability = "debug-explainability"
|
|
23
|
+
}
|
|
24
|
+
export interface IEntrypointMatrixEntry {
|
|
25
|
+
readonly id: string;
|
|
26
|
+
readonly class: EntrypointClass;
|
|
27
|
+
readonly callShape: string;
|
|
28
|
+
readonly whenToUse: string;
|
|
29
|
+
readonly safety: 'read-only' | 'writes-drafts' | 'writes-source';
|
|
30
|
+
readonly docs?: string;
|
|
31
|
+
/** Identifier of an alternative entrypoint to consider, when relevant. */
|
|
32
|
+
readonly seeAlso?: ReadonlyArray<string>;
|
|
33
|
+
}
|
|
34
|
+
export interface IEntrypointMatrixReport {
|
|
35
|
+
readonly schema: typeof ENTRYPOINT_MATRIX_SCHEMA;
|
|
36
|
+
readonly entries: ReadonlyArray<IEntrypointMatrixEntry>;
|
|
37
|
+
/**
|
|
38
|
+
* Curated decision-tree the renderer leans on:
|
|
39
|
+
* "If you are a … use …"
|
|
40
|
+
*/
|
|
41
|
+
readonly decisionTree: ReadonlyArray<{
|
|
42
|
+
readonly when: string;
|
|
43
|
+
readonly use: string;
|
|
44
|
+
}>;
|
|
45
|
+
}
|
|
46
|
+
export declare function buildEntrypointMatrix(): IEntrypointMatrixReport;
|
|
47
|
+
export declare function renderEntrypointMatrixText(report: IEntrypointMatrixReport): string;
|
|
48
|
+
/**
|
|
49
|
+
* Short banner each command can print to make its role explicit.
|
|
50
|
+
* Wording aligned with the canonical-entrypoint message so every
|
|
51
|
+
* overlapping surface points back at `shrk recommend` for the
|
|
52
|
+
* "what should I do?" question.
|
|
53
|
+
*
|
|
54
|
+
* shrk recommend — canonical human entrypoint.
|
|
55
|
+
* shrk context — context for doing the task; recommend is the workflow.
|
|
56
|
+
* shrk task — machine/task-packet surface; recommend is the workflow.
|
|
57
|
+
* shrk search — registry search; recommend is the workflow.
|
|
58
|
+
* shrk why — ranker reasoning; recommend is the workflow.
|
|
59
|
+
*/
|
|
60
|
+
export declare function entrypointBanner(id: 'task' | 'context' | 'recommend' | 'search' | 'why' | 'task-json'): string;
|
|
61
|
+
//# sourceMappingURL=entrypoint-matrix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entrypoint-matrix.d.ts","sourceRoot":"","sources":["../src/entrypoint-matrix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,wBAAwB,oCAAoC,CAAC;AAE1E,oBAAY,eAAe;IACzB,gBAAgB,sBAAsB;IACtC,QAAQ,cAAc;IACtB,WAAW,iBAAiB;IAC5B,mBAAmB,yBAAyB;CAC7C;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,eAAe,GAAG,eAAe,CAAC;IACjE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,OAAO,wBAAwB,CAAC;IACjD,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IACxD;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;QACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;KACtB,CAAC,CAAC;CACJ;AAoJD,wBAAgB,qBAAqB,IAAI,uBAAuB,CAM/D;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,uBAAuB,GAAG,MAAM,CA2BlF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,KAAK,GAAG,WAAW,GACpE,MAAM,CAeR"}
|