@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.
Files changed (708) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +15 -0
  3. package/dist/acceptance-replay.d.ts +63 -0
  4. package/dist/acceptance-replay.d.ts.map +1 -0
  5. package/dist/acceptance-replay.js +240 -0
  6. package/dist/action-hint-diagnostics.d.ts +32 -0
  7. package/dist/action-hint-diagnostics.d.ts.map +1 -0
  8. package/dist/action-hint-diagnostics.js +133 -0
  9. package/dist/adoption-check.d.ts +28 -0
  10. package/dist/adoption-check.d.ts.map +1 -0
  11. package/dist/adoption-check.js +181 -0
  12. package/dist/adoption-checkpoint.d.ts +97 -0
  13. package/dist/adoption-checkpoint.d.ts.map +1 -0
  14. package/dist/adoption-checkpoint.js +209 -0
  15. package/dist/adoption-merge-preview.d.ts +28 -0
  16. package/dist/adoption-merge-preview.d.ts.map +1 -0
  17. package/dist/adoption-merge-preview.js +254 -0
  18. package/dist/adoption-report-renderer.d.ts +33 -0
  19. package/dist/adoption-report-renderer.d.ts.map +1 -0
  20. package/dist/adoption-report-renderer.js +257 -0
  21. package/dist/adoption-state.d.ts +100 -0
  22. package/dist/adoption-state.d.ts.map +1 -0
  23. package/dist/adoption-state.js +296 -0
  24. package/dist/adoption-three-way.d.ts +46 -0
  25. package/dist/adoption-three-way.d.ts.map +1 -0
  26. package/dist/adoption-three-way.js +181 -0
  27. package/dist/agent-brief.d.ts +77 -0
  28. package/dist/agent-brief.d.ts.map +1 -0
  29. package/dist/agent-brief.js +490 -0
  30. package/dist/agent-contract-gate.d.ts +108 -0
  31. package/dist/agent-contract-gate.d.ts.map +1 -0
  32. package/dist/agent-contract-gate.js +412 -0
  33. package/dist/agent-contract-templates.d.ts +63 -0
  34. package/dist/agent-contract-templates.d.ts.map +1 -0
  35. package/dist/agent-contract-templates.js +346 -0
  36. package/dist/agent-contract.d.ts +65 -0
  37. package/dist/agent-contract.d.ts.map +1 -0
  38. package/dist/agent-contract.js +555 -0
  39. package/dist/agent-handoff.d.ts +123 -0
  40. package/dist/agent-handoff.d.ts.map +1 -0
  41. package/dist/agent-handoff.js +470 -0
  42. package/dist/agent-instructions.d.ts +2 -0
  43. package/dist/agent-instructions.d.ts.map +1 -0
  44. package/dist/agent-instructions.js +21 -0
  45. package/dist/agent-orchestration.d.ts +61 -0
  46. package/dist/agent-orchestration.d.ts.map +1 -0
  47. package/dist/agent-orchestration.js +285 -0
  48. package/dist/agent-task-prep.d.ts +31 -0
  49. package/dist/agent-task-prep.d.ts.map +1 -0
  50. package/dist/agent-task-prep.js +73 -0
  51. package/dist/ai-readiness.d.ts +30 -0
  52. package/dist/ai-readiness.d.ts.map +1 -0
  53. package/dist/ai-readiness.js +279 -0
  54. package/dist/api-report.d.ts +51 -0
  55. package/dist/api-report.d.ts.map +1 -0
  56. package/dist/api-report.js +254 -0
  57. package/dist/apply-dispatch-trace.d.ts +93 -0
  58. package/dist/apply-dispatch-trace.d.ts.map +1 -0
  59. package/dist/apply-dispatch-trace.js +283 -0
  60. package/dist/apply-gate-result.d.ts +52 -0
  61. package/dist/apply-gate-result.d.ts.map +1 -0
  62. package/dist/apply-gate-result.js +44 -0
  63. package/dist/architecture-map.d.ts +118 -0
  64. package/dist/architecture-map.d.ts.map +1 -0
  65. package/dist/architecture-map.js +543 -0
  66. package/dist/area-explore.d.ts +75 -0
  67. package/dist/area-explore.d.ts.map +1 -0
  68. package/dist/area-explore.js +438 -0
  69. package/dist/area-map.d.ts +57 -0
  70. package/dist/area-map.d.ts.map +1 -0
  71. package/dist/area-map.js +214 -0
  72. package/dist/asset-provenance.d.ts +123 -0
  73. package/dist/asset-provenance.d.ts.map +1 -0
  74. package/dist/asset-provenance.js +209 -0
  75. package/dist/barrel-operations.d.ts +45 -0
  76. package/dist/barrel-operations.d.ts.map +1 -0
  77. package/dist/barrel-operations.js +159 -0
  78. package/dist/boundaries-changed-only.d.ts +62 -0
  79. package/dist/boundaries-changed-only.d.ts.map +1 -0
  80. package/dist/boundaries-changed-only.js +97 -0
  81. package/dist/boundary-suggestions.d.ts +20 -0
  82. package/dist/boundary-suggestions.d.ts.map +1 -0
  83. package/dist/boundary-suggestions.js +51 -0
  84. package/dist/bundle-diff.d.ts +98 -0
  85. package/dist/bundle-diff.d.ts.map +1 -0
  86. package/dist/bundle-diff.js +531 -0
  87. package/dist/bundle-replay.d.ts +68 -0
  88. package/dist/bundle-replay.d.ts.map +1 -0
  89. package/dist/bundle-replay.js +273 -0
  90. package/dist/bundle-validate-html.d.ts +11 -0
  91. package/dist/bundle-validate-html.d.ts.map +1 -0
  92. package/dist/bundle-validate-html.js +60 -0
  93. package/dist/change-intent.d.ts +36 -0
  94. package/dist/change-intent.d.ts.map +1 -0
  95. package/dist/change-intent.js +259 -0
  96. package/dist/changed-preflight.d.ts +59 -0
  97. package/dist/changed-preflight.d.ts.map +1 -0
  98. package/dist/changed-preflight.js +358 -0
  99. package/dist/changed-scope.d.ts +112 -0
  100. package/dist/changed-scope.d.ts.map +1 -0
  101. package/dist/changed-scope.js +172 -0
  102. package/dist/changes-summary.d.ts +87 -0
  103. package/dist/changes-summary.d.ts.map +1 -0
  104. package/dist/changes-summary.js +323 -0
  105. package/dist/check-result-v1.d.ts +90 -0
  106. package/dist/check-result-v1.d.ts.map +1 -0
  107. package/dist/check-result-v1.js +335 -0
  108. package/dist/ci-integrity-report.d.ts +38 -0
  109. package/dist/ci-integrity-report.d.ts.map +1 -0
  110. package/dist/ci-integrity-report.js +324 -0
  111. package/dist/ci-permissions-fix.d.ts +38 -0
  112. package/dist/ci-permissions-fix.d.ts.map +1 -0
  113. package/dist/ci-permissions-fix.js +382 -0
  114. package/dist/ci-permissions.d.ts +51 -0
  115. package/dist/ci-permissions.d.ts.map +1 -0
  116. package/dist/ci-permissions.js +431 -0
  117. package/dist/ci-predict.d.ts +42 -0
  118. package/dist/ci-predict.d.ts.map +1 -0
  119. package/dist/ci-predict.js +300 -0
  120. package/dist/ci-scaffold.d.ts +47 -0
  121. package/dist/ci-scaffold.d.ts.map +1 -0
  122. package/dist/ci-scaffold.js +638 -0
  123. package/dist/codemod-assist.d.ts +97 -0
  124. package/dist/codemod-assist.d.ts.map +1 -0
  125. package/dist/codemod-assist.js +261 -0
  126. package/dist/command-recommender.d.ts +25 -0
  127. package/dist/command-recommender.d.ts.map +1 -0
  128. package/dist/command-recommender.js +145 -0
  129. package/dist/command-suggester.d.ts +61 -0
  130. package/dist/command-suggester.d.ts.map +1 -0
  131. package/dist/command-suggester.js +159 -0
  132. package/dist/command-taxonomy.d.ts +38 -0
  133. package/dist/command-taxonomy.d.ts.map +1 -0
  134. package/dist/command-taxonomy.js +164 -0
  135. package/dist/compliance-evidence.d.ts +58 -0
  136. package/dist/compliance-evidence.d.ts.map +1 -0
  137. package/dist/compliance-evidence.js +260 -0
  138. package/dist/compliance-profiles.d.ts +42 -0
  139. package/dist/compliance-profiles.d.ts.map +1 -0
  140. package/dist/compliance-profiles.js +171 -0
  141. package/dist/construct-adoption-diff.d.ts +55 -0
  142. package/dist/construct-adoption-diff.d.ts.map +1 -0
  143. package/dist/construct-adoption-diff.js +331 -0
  144. package/dist/construct-adoption.d.ts +71 -0
  145. package/dist/construct-adoption.d.ts.map +1 -0
  146. package/dist/construct-adoption.js +331 -0
  147. package/dist/construct-inference.d.ts +44 -0
  148. package/dist/construct-inference.d.ts.map +1 -0
  149. package/dist/construct-inference.js +391 -0
  150. package/dist/construct-registry.d.ts +32 -0
  151. package/dist/construct-registry.d.ts.map +1 -0
  152. package/dist/construct-registry.js +198 -0
  153. package/dist/contract-file-rule.d.ts +37 -0
  154. package/dist/contract-file-rule.d.ts.map +1 -0
  155. package/dist/contract-file-rule.js +99 -0
  156. package/dist/contract-template-registry.d.ts +28 -0
  157. package/dist/contract-template-registry.d.ts.map +1 -0
  158. package/dist/contract-template-registry.js +161 -0
  159. package/dist/contradictions.d.ts +52 -0
  160. package/dist/contradictions.d.ts.map +1 -0
  161. package/dist/contradictions.js +391 -0
  162. package/dist/convention-registry.d.ts +44 -0
  163. package/dist/convention-registry.d.ts.map +1 -0
  164. package/dist/convention-registry.js +195 -0
  165. package/dist/coverage-report.d.ts +25 -0
  166. package/dist/coverage-report.d.ts.map +1 -0
  167. package/dist/coverage-report.js +190 -0
  168. package/dist/custom-checks.d.ts +146 -0
  169. package/dist/custom-checks.d.ts.map +1 -0
  170. package/dist/custom-checks.js +260 -0
  171. package/dist/dashboard/dashboard-data.d.ts +59 -0
  172. package/dist/dashboard/dashboard-data.d.ts.map +1 -0
  173. package/dist/dashboard/dashboard-data.js +653 -0
  174. package/dist/dashboard-export.d.ts +67 -0
  175. package/dist/dashboard-export.d.ts.map +1 -0
  176. package/dist/dashboard-export.js +203 -0
  177. package/dist/decision-records.d.ts +47 -0
  178. package/dist/decision-records.d.ts.map +1 -0
  179. package/dist/decision-records.js +255 -0
  180. package/dist/demo-package.d.ts +49 -0
  181. package/dist/demo-package.d.ts.map +1 -0
  182. package/dist/demo-package.js +305 -0
  183. package/dist/demo-script.d.ts +25 -0
  184. package/dist/demo-script.d.ts.map +1 -0
  185. package/dist/demo-script.js +198 -0
  186. package/dist/demo-workflow.d.ts +28 -0
  187. package/dist/demo-workflow.d.ts.map +1 -0
  188. package/dist/demo-workflow.js +178 -0
  189. package/dist/dev-cycle.d.ts +41 -0
  190. package/dist/dev-cycle.d.ts.map +1 -0
  191. package/dist/dev-cycle.js +94 -0
  192. package/dist/dev-session-html.d.ts +13 -0
  193. package/dist/dev-session-html.d.ts.map +1 -0
  194. package/dist/dev-session-html.js +223 -0
  195. package/dist/dev-session-report.d.ts +11 -0
  196. package/dist/dev-session-report.d.ts.map +1 -0
  197. package/dist/dev-session-report.js +206 -0
  198. package/dist/dev-session.d.ts +257 -0
  199. package/dist/dev-session.d.ts.map +1 -0
  200. package/dist/dev-session.js +568 -0
  201. package/dist/diagnostics-suggest.d.ts +17 -0
  202. package/dist/diagnostics-suggest.d.ts.map +1 -0
  203. package/dist/diagnostics-suggest.js +69 -0
  204. package/dist/docs-check.d.ts +40 -0
  205. package/dist/docs-check.d.ts.map +1 -0
  206. package/dist/docs-check.js +221 -0
  207. package/dist/doctor-acknowledgements.d.ts +69 -0
  208. package/dist/doctor-acknowledgements.d.ts.map +1 -0
  209. package/dist/doctor-acknowledgements.js +150 -0
  210. package/dist/doctor-result.d.ts +51 -0
  211. package/dist/doctor-result.d.ts.map +1 -0
  212. package/dist/doctor-result.js +7 -0
  213. package/dist/doctor-suppressions.d.ts +91 -0
  214. package/dist/doctor-suppressions.d.ts.map +1 -0
  215. package/dist/doctor-suppressions.js +238 -0
  216. package/dist/drift-baseline.d.ts +29 -0
  217. package/dist/drift-baseline.d.ts.map +1 -0
  218. package/dist/drift-baseline.js +80 -0
  219. package/dist/drift.d.ts +38 -0
  220. package/dist/drift.d.ts.map +1 -0
  221. package/dist/drift.js +107 -0
  222. package/dist/entrypoint-matrix.d.ts +61 -0
  223. package/dist/entrypoint-matrix.d.ts.map +1 -0
  224. package/dist/entrypoint-matrix.js +221 -0
  225. package/dist/examples-check.d.ts +36 -0
  226. package/dist/examples-check.d.ts.map +1 -0
  227. package/dist/examples-check.js +168 -0
  228. package/dist/execution-graph.d.ts +98 -0
  229. package/dist/execution-graph.d.ts.map +1 -0
  230. package/dist/execution-graph.js +484 -0
  231. package/dist/export-bundle.d.ts +10 -0
  232. package/dist/export-bundle.d.ts.map +1 -0
  233. package/dist/export-bundle.js +90 -0
  234. package/dist/failure-diagnostics.d.ts +63 -0
  235. package/dist/failure-diagnostics.d.ts.map +1 -0
  236. package/dist/failure-diagnostics.js +243 -0
  237. package/dist/feature-bundle.d.ts +111 -0
  238. package/dist/feature-bundle.d.ts.map +1 -0
  239. package/dist/feature-bundle.js +211 -0
  240. package/dist/feedback-actions-v2.d.ts +65 -0
  241. package/dist/feedback-actions-v2.d.ts.map +1 -0
  242. package/dist/feedback-actions-v2.js +183 -0
  243. package/dist/feedback-ingestion.d.ts +96 -0
  244. package/dist/feedback-ingestion.d.ts.map +1 -0
  245. package/dist/feedback-ingestion.js +400 -0
  246. package/dist/fix-preview.d.ts +82 -0
  247. package/dist/fix-preview.d.ts.map +1 -0
  248. package/dist/fix-preview.js +365 -0
  249. package/dist/fuzzy-impact.d.ts +50 -0
  250. package/dist/fuzzy-impact.d.ts.map +1 -0
  251. package/dist/fuzzy-impact.js +446 -0
  252. package/dist/generated-code.d.ts +97 -0
  253. package/dist/generated-code.d.ts.map +1 -0
  254. package/dist/generated-code.js +395 -0
  255. package/dist/git-helpers.d.ts +38 -0
  256. package/dist/git-helpers.d.ts.map +1 -0
  257. package/dist/git-helpers.js +173 -0
  258. package/dist/golden-output.d.ts +33 -0
  259. package/dist/golden-output.d.ts.map +1 -0
  260. package/dist/golden-output.js +92 -0
  261. package/dist/grounding/build-grounding.d.ts +53 -0
  262. package/dist/grounding/build-grounding.d.ts.map +1 -0
  263. package/dist/grounding/build-grounding.js +51 -0
  264. package/dist/grounding/nx-projects.d.ts +29 -0
  265. package/dist/grounding/nx-projects.d.ts.map +1 -0
  266. package/dist/grounding/nx-projects.js +109 -0
  267. package/dist/grounding/validate-extracted-plan.d.ts +20 -0
  268. package/dist/grounding/validate-extracted-plan.d.ts.map +1 -0
  269. package/dist/grounding/validate-extracted-plan.js +127 -0
  270. package/dist/healing-plan.d.ts +33 -0
  271. package/dist/healing-plan.d.ts.map +1 -0
  272. package/dist/healing-plan.js +346 -0
  273. package/dist/helper-registry.d.ts +90 -0
  274. package/dist/helper-registry.d.ts.map +1 -0
  275. package/dist/helper-registry.js +529 -0
  276. package/dist/impact-analysis.d.ts +150 -0
  277. package/dist/impact-analysis.d.ts.map +1 -0
  278. package/dist/impact-analysis.js +697 -0
  279. package/dist/impact-graph-render.d.ts +51 -0
  280. package/dist/impact-graph-render.d.ts.map +1 -0
  281. package/dist/impact-graph-render.js +139 -0
  282. package/dist/impact-graph.d.ts +17 -0
  283. package/dist/impact-graph.d.ts.map +1 -0
  284. package/dist/impact-graph.js +119 -0
  285. package/dist/impact-render.d.ts +22 -0
  286. package/dist/impact-render.d.ts.map +1 -0
  287. package/dist/impact-render.js +422 -0
  288. package/dist/import-graph-analysis.d.ts +28 -0
  289. package/dist/import-graph-analysis.d.ts.map +1 -0
  290. package/dist/import-graph-analysis.js +193 -0
  291. package/dist/import-hygiene.d.ts +93 -0
  292. package/dist/import-hygiene.d.ts.map +1 -0
  293. package/dist/import-hygiene.js +366 -0
  294. package/dist/index.d.ts +224 -0
  295. package/dist/index.d.ts.map +1 -0
  296. package/dist/index.js +234 -0
  297. package/dist/ingest-adoption.d.ts +50 -0
  298. package/dist/ingest-adoption.d.ts.map +1 -0
  299. package/dist/ingest-adoption.js +183 -0
  300. package/dist/ingest-apply.d.ts +80 -0
  301. package/dist/ingest-apply.d.ts.map +1 -0
  302. package/dist/ingest-apply.js +227 -0
  303. package/dist/ingest-body-extractor.d.ts +28 -0
  304. package/dist/ingest-body-extractor.d.ts.map +1 -0
  305. package/dist/ingest-body-extractor.js +129 -0
  306. package/dist/ingest-drafts.d.ts +16 -0
  307. package/dist/ingest-drafts.d.ts.map +1 -0
  308. package/dist/ingest-drafts.js +482 -0
  309. package/dist/inspector-cache.d.ts +41 -0
  310. package/dist/inspector-cache.d.ts.map +1 -0
  311. package/dist/inspector-cache.js +104 -0
  312. package/dist/install-smoke.d.ts +44 -0
  313. package/dist/install-smoke.d.ts.map +1 -0
  314. package/dist/install-smoke.js +31 -0
  315. package/dist/knowledge-authoring.d.ts +151 -0
  316. package/dist/knowledge-authoring.d.ts.map +1 -0
  317. package/dist/knowledge-authoring.js +586 -0
  318. package/dist/knowledge-graph.d.ts +76 -0
  319. package/dist/knowledge-graph.d.ts.map +1 -0
  320. package/dist/knowledge-graph.js +336 -0
  321. package/dist/knowledge-lint.d.ts +97 -0
  322. package/dist/knowledge-lint.d.ts.map +1 -0
  323. package/dist/knowledge-lint.js +302 -0
  324. package/dist/knowledge-rename.d.ts +38 -0
  325. package/dist/knowledge-rename.d.ts.map +1 -0
  326. package/dist/knowledge-rename.js +88 -0
  327. package/dist/knowledge-stale.d.ts +124 -0
  328. package/dist/knowledge-stale.d.ts.map +1 -0
  329. package/dist/knowledge-stale.js +892 -0
  330. package/dist/languages/command-inference.d.ts +27 -0
  331. package/dist/languages/command-inference.d.ts.map +1 -0
  332. package/dist/languages/command-inference.js +214 -0
  333. package/dist/languages/dependency-scan.d.ts +33 -0
  334. package/dist/languages/dependency-scan.d.ts.map +1 -0
  335. package/dist/languages/dependency-scan.js +343 -0
  336. package/dist/languages/index.d.ts +14 -0
  337. package/dist/languages/index.d.ts.map +1 -0
  338. package/dist/languages/index.js +13 -0
  339. package/dist/languages/language-boundaries.d.ts +30 -0
  340. package/dist/languages/language-boundaries.d.ts.map +1 -0
  341. package/dist/languages/language-boundaries.js +176 -0
  342. package/dist/languages/language-cache.d.ts +54 -0
  343. package/dist/languages/language-cache.d.ts.map +1 -0
  344. package/dist/languages/language-cache.js +236 -0
  345. package/dist/languages/language-detection.d.ts +30 -0
  346. package/dist/languages/language-detection.d.ts.map +1 -0
  347. package/dist/languages/language-detection.js +584 -0
  348. package/dist/languages/language-id.d.ts +15 -0
  349. package/dist/languages/language-id.d.ts.map +1 -0
  350. package/dist/languages/language-id.js +15 -0
  351. package/dist/languages/language-runner.d.ts +90 -0
  352. package/dist/languages/language-runner.d.ts.map +1 -0
  353. package/dist/languages/language-runner.js +346 -0
  354. package/dist/languages/polyglot-boundary.d.ts +80 -0
  355. package/dist/languages/polyglot-boundary.d.ts.map +1 -0
  356. package/dist/languages/polyglot-boundary.js +373 -0
  357. package/dist/languages/polyglot-ci.d.ts +25 -0
  358. package/dist/languages/polyglot-ci.d.ts.map +1 -0
  359. package/dist/languages/polyglot-ci.js +278 -0
  360. package/dist/languages/test-impact.d.ts +19 -0
  361. package/dist/languages/test-impact.d.ts.map +1 -0
  362. package/dist/languages/test-impact.js +157 -0
  363. package/dist/loader-diagnostics.d.ts +40 -0
  364. package/dist/loader-diagnostics.d.ts.map +1 -0
  365. package/dist/loader-diagnostics.js +49 -0
  366. package/dist/memory-diff.d.ts +60 -0
  367. package/dist/memory-diff.d.ts.map +1 -0
  368. package/dist/memory-diff.js +302 -0
  369. package/dist/migration-profile-registry.d.ts +26 -0
  370. package/dist/migration-profile-registry.d.ts.map +1 -0
  371. package/dist/migration-profile-registry.js +135 -0
  372. package/dist/migration-readiness.d.ts +101 -0
  373. package/dist/migration-readiness.d.ts.map +1 -0
  374. package/dist/migration-readiness.js +253 -0
  375. package/dist/monorepo-onboarding.d.ts +51 -0
  376. package/dist/monorepo-onboarding.d.ts.map +1 -0
  377. package/dist/monorepo-onboarding.js +235 -0
  378. package/dist/onboarding-adoption-diff.d.ts +53 -0
  379. package/dist/onboarding-adoption-diff.d.ts.map +1 -0
  380. package/dist/onboarding-adoption-diff.js +285 -0
  381. package/dist/onboarding-adoption.d.ts +136 -0
  382. package/dist/onboarding-adoption.d.ts.map +1 -0
  383. package/dist/onboarding-adoption.js +702 -0
  384. package/dist/onboarding-agent-import.d.ts +40 -0
  385. package/dist/onboarding-agent-import.d.ts.map +1 -0
  386. package/dist/onboarding-agent-import.js +114 -0
  387. package/dist/onboarding-diff.d.ts +39 -0
  388. package/dist/onboarding-diff.d.ts.map +1 -0
  389. package/dist/onboarding-diff.js +240 -0
  390. package/dist/onboarding-drafts-merge.d.ts +71 -0
  391. package/dist/onboarding-drafts-merge.d.ts.map +1 -0
  392. package/dist/onboarding-drafts-merge.js +174 -0
  393. package/dist/onboarding-drafts.d.ts +42 -0
  394. package/dist/onboarding-drafts.d.ts.map +1 -0
  395. package/dist/onboarding-drafts.js +268 -0
  396. package/dist/onboarding-report.d.ts +8 -0
  397. package/dist/onboarding-report.d.ts.map +1 -0
  398. package/dist/onboarding-report.js +239 -0
  399. package/dist/onboarding.d.ts +134 -0
  400. package/dist/onboarding.d.ts.map +1 -0
  401. package/dist/onboarding.js +729 -0
  402. package/dist/ownership.d.ts +38 -0
  403. package/dist/ownership.d.ts.map +1 -0
  404. package/dist/ownership.js +102 -0
  405. package/dist/pack-author-ux.d.ts +58 -0
  406. package/dist/pack-author-ux.d.ts.map +1 -0
  407. package/dist/pack-author-ux.js +219 -0
  408. package/dist/pack-author.d.ts +94 -0
  409. package/dist/pack-author.d.ts.map +1 -0
  410. package/dist/pack-author.js +208 -0
  411. package/dist/pack-compatibility.d.ts +21 -0
  412. package/dist/pack-compatibility.d.ts.map +1 -0
  413. package/dist/pack-compatibility.js +114 -0
  414. package/dist/pack-contributions-inventory.d.ts +121 -0
  415. package/dist/pack-contributions-inventory.d.ts.map +1 -0
  416. package/dist/pack-contributions-inventory.js +732 -0
  417. package/dist/pack-docs.d.ts +11 -0
  418. package/dist/pack-docs.d.ts.map +1 -0
  419. package/dist/pack-docs.js +101 -0
  420. package/dist/pack-doctor.d.ts +50 -0
  421. package/dist/pack-doctor.d.ts.map +1 -0
  422. package/dist/pack-doctor.js +302 -0
  423. package/dist/pack-helper-registry.d.ts +29 -0
  424. package/dist/pack-helper-registry.d.ts.map +1 -0
  425. package/dist/pack-helper-registry.js +144 -0
  426. package/dist/pack-pending.d.ts +68 -0
  427. package/dist/pack-pending.d.ts.map +1 -0
  428. package/dist/pack-pending.js +189 -0
  429. package/dist/pack-quality-score.d.ts +44 -0
  430. package/dist/pack-quality-score.d.ts.map +1 -0
  431. package/dist/pack-quality-score.js +155 -0
  432. package/dist/pack-release-check.d.ts +24 -0
  433. package/dist/pack-release-check.d.ts.map +1 -0
  434. package/dist/pack-release-check.js +258 -0
  435. package/dist/pack-signature-status.d.ts +72 -0
  436. package/dist/pack-signature-status.d.ts.map +1 -0
  437. package/dist/pack-signature-status.js +222 -0
  438. package/dist/pack-symbol-compat.d.ts +73 -0
  439. package/dist/pack-symbol-compat.d.ts.map +1 -0
  440. package/dist/pack-symbol-compat.js +519 -0
  441. package/dist/pack-test-runner.d.ts +59 -0
  442. package/dist/pack-test-runner.d.ts.map +1 -0
  443. package/dist/pack-test-runner.js +211 -0
  444. package/dist/pipeline-command-dictionary.d.ts +2 -0
  445. package/dist/pipeline-command-dictionary.d.ts.map +1 -0
  446. package/dist/pipeline-command-dictionary.js +20 -0
  447. package/dist/pipeline-lint.d.ts +30 -0
  448. package/dist/pipeline-lint.d.ts.map +1 -0
  449. package/dist/pipeline-lint.js +134 -0
  450. package/dist/plan-dependency-graph.d.ts +25 -0
  451. package/dist/plan-dependency-graph.d.ts.map +1 -0
  452. package/dist/plan-dependency-graph.js +195 -0
  453. package/dist/plan-review.d.ts +64 -0
  454. package/dist/plan-review.d.ts.map +1 -0
  455. package/dist/plan-review.js +242 -0
  456. package/dist/plan-simulation.d.ts +108 -0
  457. package/dist/plan-simulation.d.ts.map +1 -0
  458. package/dist/plan-simulation.js +767 -0
  459. package/dist/playbook-registry.d.ts +25 -0
  460. package/dist/playbook-registry.d.ts.map +1 -0
  461. package/dist/playbook-registry.js +148 -0
  462. package/dist/playbook-script.d.ts +60 -0
  463. package/dist/playbook-script.d.ts.map +1 -0
  464. package/dist/playbook-script.js +161 -0
  465. package/dist/plugin-lifecycle-profile-registry.d.ts +52 -0
  466. package/dist/plugin-lifecycle-profile-registry.d.ts.map +1 -0
  467. package/dist/plugin-lifecycle-profile-registry.js +202 -0
  468. package/dist/plugin-lifecycle.d.ts +132 -0
  469. package/dist/plugin-lifecycle.d.ts.map +1 -0
  470. package/dist/plugin-lifecycle.js +477 -0
  471. package/dist/policy-engine.d.ts +101 -0
  472. package/dist/policy-engine.d.ts.map +1 -0
  473. package/dist/policy-engine.js +321 -0
  474. package/dist/policy-override-audit.d.ts +18 -0
  475. package/dist/policy-override-audit.d.ts.map +1 -0
  476. package/dist/policy-override-audit.js +54 -0
  477. package/dist/policy-overrides.d.ts +35 -0
  478. package/dist/policy-overrides.d.ts.map +1 -0
  479. package/dist/policy-overrides.js +84 -0
  480. package/dist/policy-test.d.ts +83 -0
  481. package/dist/policy-test.d.ts.map +1 -0
  482. package/dist/policy-test.js +342 -0
  483. package/dist/pr-summary.d.ts +34 -0
  484. package/dist/pr-summary.d.ts.map +1 -0
  485. package/dist/pr-summary.js +220 -0
  486. package/dist/product-coherence.d.ts +21 -0
  487. package/dist/product-coherence.d.ts.map +1 -0
  488. package/dist/product-coherence.js +158 -0
  489. package/dist/profile-registry.d.ts +42 -0
  490. package/dist/profile-registry.d.ts.map +1 -0
  491. package/dist/profile-registry.js +104 -0
  492. package/dist/project-coupling-audit.d.ts +64 -0
  493. package/dist/project-coupling-audit.d.ts.map +1 -0
  494. package/dist/project-coupling-audit.js +282 -0
  495. package/dist/project-overview.d.ts +14 -0
  496. package/dist/project-overview.d.ts.map +1 -0
  497. package/dist/project-overview.js +27 -0
  498. package/dist/propose-knowledge.d.ts +64 -0
  499. package/dist/propose-knowledge.d.ts.map +1 -0
  500. package/dist/propose-knowledge.js +367 -0
  501. package/dist/quality-baseline.d.ts +123 -0
  502. package/dist/quality-baseline.d.ts.map +1 -0
  503. package/dist/quality-baseline.js +433 -0
  504. package/dist/quality-html.d.ts +7 -0
  505. package/dist/quality-html.d.ts.map +1 -0
  506. package/dist/quality-html.js +64 -0
  507. package/dist/quality-report.d.ts +49 -0
  508. package/dist/quality-report.d.ts.map +1 -0
  509. package/dist/quality-report.js +296 -0
  510. package/dist/query-resolver.d.ts +38 -0
  511. package/dist/query-resolver.d.ts.map +1 -0
  512. package/dist/query-resolver.js +163 -0
  513. package/dist/ranker-explainability.d.ts +91 -0
  514. package/dist/ranker-explainability.d.ts.map +1 -0
  515. package/dist/ranker-explainability.js +550 -0
  516. package/dist/reference-lookup.d.ts +8 -0
  517. package/dist/reference-lookup.d.ts.map +1 -0
  518. package/dist/reference-lookup.js +18 -0
  519. package/dist/registration-hint-registry.d.ts +55 -0
  520. package/dist/registration-hint-registry.d.ts.map +1 -0
  521. package/dist/registration-hint-registry.js +327 -0
  522. package/dist/registry-lifecycle.d.ts +47 -0
  523. package/dist/registry-lifecycle.d.ts.map +1 -0
  524. package/dist/registry-lifecycle.js +214 -0
  525. package/dist/release-readiness.d.ts +64 -0
  526. package/dist/release-readiness.d.ts.map +1 -0
  527. package/dist/release-readiness.js +456 -0
  528. package/dist/release-smoke.d.ts +138 -0
  529. package/dist/release-smoke.d.ts.map +1 -0
  530. package/dist/release-smoke.js +459 -0
  531. package/dist/release-train.d.ts +33 -0
  532. package/dist/release-train.d.ts.map +1 -0
  533. package/dist/release-train.js +104 -0
  534. package/dist/repo-memory.d.ts +95 -0
  535. package/dist/repo-memory.d.ts.map +1 -0
  536. package/dist/repo-memory.js +614 -0
  537. package/dist/report-site.d.ts +92 -0
  538. package/dist/report-site.d.ts.map +1 -0
  539. package/dist/report-site.js +658 -0
  540. package/dist/reposet.d.ts +56 -0
  541. package/dist/reposet.d.ts.map +1 -0
  542. package/dist/reposet.js +160 -0
  543. package/dist/repository-intelligence.d.ts +145 -0
  544. package/dist/repository-intelligence.d.ts.map +1 -0
  545. package/dist/repository-intelligence.js +729 -0
  546. package/dist/repository-knowledge-model.d.ts +218 -0
  547. package/dist/repository-knowledge-model.d.ts.map +1 -0
  548. package/dist/repository-knowledge-model.js +939 -0
  549. package/dist/repository-map.d.ts +72 -0
  550. package/dist/repository-map.d.ts.map +1 -0
  551. package/dist/repository-map.js +332 -0
  552. package/dist/repository-stats.d.ts +66 -0
  553. package/dist/repository-stats.d.ts.map +1 -0
  554. package/dist/repository-stats.js +329 -0
  555. package/dist/review-comment-renderer.d.ts +59 -0
  556. package/dist/review-comment-renderer.d.ts.map +1 -0
  557. package/dist/review-comment-renderer.js +181 -0
  558. package/dist/review-comment-v2.d.ts +9 -0
  559. package/dist/review-comment-v2.d.ts.map +1 -0
  560. package/dist/review-comment-v2.js +178 -0
  561. package/dist/review-html.d.ts +13 -0
  562. package/dist/review-html.d.ts.map +1 -0
  563. package/dist/review-html.js +79 -0
  564. package/dist/review-packet-v2.d.ts +29 -0
  565. package/dist/review-packet-v2.d.ts.map +1 -0
  566. package/dist/review-packet-v2.js +81 -0
  567. package/dist/review-packet-v3.d.ts +22 -0
  568. package/dist/review-packet-v3.d.ts.map +1 -0
  569. package/dist/review-packet-v3.js +181 -0
  570. package/dist/review-packet.d.ts +49 -0
  571. package/dist/review-packet.d.ts.map +1 -0
  572. package/dist/review-packet.js +129 -0
  573. package/dist/risk-signals.d.ts +28 -0
  574. package/dist/risk-signals.d.ts.map +1 -0
  575. package/dist/risk-signals.js +68 -0
  576. package/dist/role-views.d.ts +50 -0
  577. package/dist/role-views.d.ts.map +1 -0
  578. package/dist/role-views.js +334 -0
  579. package/dist/rounds.d.ts +52 -0
  580. package/dist/rounds.d.ts.map +1 -0
  581. package/dist/rounds.js +172 -0
  582. package/dist/rule-drift.d.ts +42 -0
  583. package/dist/rule-drift.d.ts.map +1 -0
  584. package/dist/rule-drift.js +148 -0
  585. package/dist/rule-quality.d.ts +73 -0
  586. package/dist/rule-quality.d.ts.map +1 -0
  587. package/dist/rule-quality.js +356 -0
  588. package/dist/rule-scaffold.d.ts +71 -0
  589. package/dist/rule-scaffold.d.ts.map +1 -0
  590. package/dist/rule-scaffold.js +258 -0
  591. package/dist/safety-audit-deep.d.ts +38 -0
  592. package/dist/safety-audit-deep.d.ts.map +1 -0
  593. package/dist/safety-audit-deep.js +162 -0
  594. package/dist/safety-audit.d.ts +91 -0
  595. package/dist/safety-audit.d.ts.map +1 -0
  596. package/dist/safety-audit.js +138 -0
  597. package/dist/safety-html.d.ts +7 -0
  598. package/dist/safety-html.d.ts.map +1 -0
  599. package/dist/safety-html.js +70 -0
  600. package/dist/scaffold-coverage.d.ts +46 -0
  601. package/dist/scaffold-coverage.d.ts.map +1 -0
  602. package/dist/scaffold-coverage.js +273 -0
  603. package/dist/scaffold-patterns.d.ts +38 -0
  604. package/dist/scaffold-patterns.d.ts.map +1 -0
  605. package/dist/scaffold-patterns.js +282 -0
  606. package/dist/schema-inventory.d.ts +55 -0
  607. package/dist/schema-inventory.d.ts.map +1 -0
  608. package/dist/schema-inventory.js +301 -0
  609. package/dist/search-index.d.ts +75 -0
  610. package/dist/search-index.d.ts.map +1 -0
  611. package/dist/search-index.js +531 -0
  612. package/dist/search-tuning-explain.d.ts +68 -0
  613. package/dist/search-tuning-explain.d.ts.map +1 -0
  614. package/dist/search-tuning-explain.js +207 -0
  615. package/dist/search-tuning-registry.d.ts +54 -0
  616. package/dist/search-tuning-registry.d.ts.map +1 -0
  617. package/dist/search-tuning-registry.js +303 -0
  618. package/dist/self-audit.d.ts +59 -0
  619. package/dist/self-audit.d.ts.map +1 -0
  620. package/dist/self-audit.js +192 -0
  621. package/dist/self-config-doctor-v2.d.ts +57 -0
  622. package/dist/self-config-doctor-v2.d.ts.map +1 -0
  623. package/dist/self-config-doctor-v2.js +653 -0
  624. package/dist/self-config-doctor.d.ts +47 -0
  625. package/dist/self-config-doctor.d.ts.map +1 -0
  626. package/dist/self-config-doctor.js +432 -0
  627. package/dist/sharkcraft-inspector.d.ts +73 -0
  628. package/dist/sharkcraft-inspector.d.ts.map +1 -0
  629. package/dist/sharkcraft-inspector.js +745 -0
  630. package/dist/spec/spec-cross-validate.d.ts +17 -0
  631. package/dist/spec/spec-cross-validate.d.ts.map +1 -0
  632. package/dist/spec/spec-cross-validate.js +53 -0
  633. package/dist/spec/spec-discovery.d.ts +27 -0
  634. package/dist/spec/spec-discovery.d.ts.map +1 -0
  635. package/dist/spec/spec-discovery.js +78 -0
  636. package/dist/spec/spec-review.d.ts +36 -0
  637. package/dist/spec/spec-review.d.ts.map +1 -0
  638. package/dist/spec/spec-review.js +37 -0
  639. package/dist/stability-map.d.ts +62 -0
  640. package/dist/stability-map.d.ts.map +1 -0
  641. package/dist/stability-map.js +404 -0
  642. package/dist/start-here.d.ts +49 -0
  643. package/dist/start-here.d.ts.map +1 -0
  644. package/dist/start-here.js +259 -0
  645. package/dist/surface-profile-detect.d.ts +42 -0
  646. package/dist/surface-profile-detect.d.ts.map +1 -0
  647. package/dist/surface-profile-detect.js +76 -0
  648. package/dist/symbol-index.d.ts +108 -0
  649. package/dist/symbol-index.d.ts.map +1 -0
  650. package/dist/symbol-index.js +483 -0
  651. package/dist/task-decompose.d.ts +38 -0
  652. package/dist/task-decompose.d.ts.map +1 -0
  653. package/dist/task-decompose.js +154 -0
  654. package/dist/task-packet.d.ts +104 -0
  655. package/dist/task-packet.d.ts.map +1 -0
  656. package/dist/task-packet.js +156 -0
  657. package/dist/task-ranker.d.ts +51 -0
  658. package/dist/task-ranker.d.ts.map +1 -0
  659. package/dist/task-ranker.js +410 -0
  660. package/dist/task-risk.d.ts +84 -0
  661. package/dist/task-risk.d.ts.map +1 -0
  662. package/dist/task-risk.js +731 -0
  663. package/dist/task-routing-hint-registry.d.ts +36 -0
  664. package/dist/task-routing-hint-registry.d.ts.map +1 -0
  665. package/dist/task-routing-hint-registry.js +186 -0
  666. package/dist/template-authoring.d.ts +113 -0
  667. package/dist/template-authoring.d.ts.map +1 -0
  668. package/dist/template-authoring.js +521 -0
  669. package/dist/template-body-inference-v2.d.ts +19 -0
  670. package/dist/template-body-inference-v2.d.ts.map +1 -0
  671. package/dist/template-body-inference-v2.js +468 -0
  672. package/dist/template-body-inference.d.ts +59 -0
  673. package/dist/template-body-inference.d.ts.map +1 -0
  674. package/dist/template-body-inference.js +277 -0
  675. package/dist/template-drift.d.ts +39 -0
  676. package/dist/template-drift.d.ts.map +1 -0
  677. package/dist/template-drift.js +353 -0
  678. package/dist/template-lint.d.ts +31 -0
  679. package/dist/template-lint.d.ts.map +1 -0
  680. package/dist/template-lint.js +113 -0
  681. package/dist/test-definitions.d.ts +41 -0
  682. package/dist/test-definitions.d.ts.map +1 -0
  683. package/dist/test-definitions.js +6 -0
  684. package/dist/test-impact.d.ts +30 -0
  685. package/dist/test-impact.d.ts.map +1 -0
  686. package/dist/test-impact.js +173 -0
  687. package/dist/test-runner.d.ts +87 -0
  688. package/dist/test-runner.d.ts.map +1 -0
  689. package/dist/test-runner.js +560 -0
  690. package/dist/uncertainty-report.d.ts +46 -0
  691. package/dist/uncertainty-report.d.ts.map +1 -0
  692. package/dist/uncertainty-report.js +108 -0
  693. package/dist/uncertainty.d.ts +38 -0
  694. package/dist/uncertainty.d.ts.map +1 -0
  695. package/dist/uncertainty.js +115 -0
  696. package/dist/universal-search.d.ts +64 -0
  697. package/dist/universal-search.d.ts.map +1 -0
  698. package/dist/universal-search.js +347 -0
  699. package/dist/upgrade-advisor.d.ts +22 -0
  700. package/dist/upgrade-advisor.d.ts.map +1 -0
  701. package/dist/upgrade-advisor.js +109 -0
  702. package/dist/why-file.d.ts +75 -0
  703. package/dist/why-file.d.ts.map +1 -0
  704. package/dist/why-file.js +202 -0
  705. package/dist/workflow-simulation.d.ts +46 -0
  706. package/dist/workflow-simulation.d.ts.map +1 -0
  707. package/dist/workflow-simulation.js +154 -0
  708. package/package.json +65 -0
@@ -0,0 +1,446 @@
1
+ /**
2
+ * Fuzzy impact resolution.
3
+ *
4
+ * Wraps the query resolver so `shrk impact <query>` can accept any
5
+ * free-form identifier (construct id, plugin key, symbol name, knowledge
6
+ * id, template id, helper id, playbook id, command id, package name).
7
+ *
8
+ * Resolution converts the best match into a concrete impact input:
9
+ * file → push the file
10
+ * construct → push the construct's files
11
+ * symbol → push files where the symbol is defined (via construct
12
+ * files + heuristic text scan)
13
+ * plugin key → push the matching construct's files
14
+ * event/DI → push files of the construct that declares the facet
15
+ * template → emit the template's target path as a suggested file
16
+ * helper → emit the helper's suggested files where present
17
+ * playbook → emit related files (file targets in the playbook)
18
+ * knowledge → emit `references[]` of kind `file` from the entry
19
+ * command → no impact target; return a next-command hint
20
+ * package → no impact target by default; surface as a hint
21
+ *
22
+ * Read-only. No writes. No network.
23
+ *
24
+ * Schema: sharkcraft.fuzzy-impact-resolution/v1
25
+ */
26
+ import { existsSync } from 'node:fs';
27
+ import * as nodePath from 'node:path';
28
+ import { QueryMatchKind, resolveQuery, } from "./query-resolver.js";
29
+ import { HELPERS } from "./helper-registry.js";
30
+ export const FUZZY_IMPACT_RESOLUTION_SCHEMA = 'sharkcraft.fuzzy-impact-resolution/v1';
31
+ export var FuzzyImpactSourceKind;
32
+ (function (FuzzyImpactSourceKind) {
33
+ FuzzyImpactSourceKind["ExactFile"] = "exact-file";
34
+ FuzzyImpactSourceKind["Construct"] = "construct";
35
+ FuzzyImpactSourceKind["PluginKey"] = "plugin-key";
36
+ FuzzyImpactSourceKind["EventToken"] = "event-token";
37
+ FuzzyImpactSourceKind["DIToken"] = "di-token";
38
+ FuzzyImpactSourceKind["Symbol"] = "symbol";
39
+ FuzzyImpactSourceKind["Template"] = "template";
40
+ FuzzyImpactSourceKind["Helper"] = "helper";
41
+ FuzzyImpactSourceKind["Playbook"] = "playbook";
42
+ FuzzyImpactSourceKind["Knowledge"] = "knowledge";
43
+ FuzzyImpactSourceKind["Command"] = "command";
44
+ FuzzyImpactSourceKind["Package"] = "package";
45
+ FuzzyImpactSourceKind["Unresolved"] = "unresolved";
46
+ })(FuzzyImpactSourceKind || (FuzzyImpactSourceKind = {}));
47
+ function listConstructsFrom(inspection) {
48
+ // 1) Pre-warmed sync cache.
49
+ const direct = inspection.constructs;
50
+ if (direct && direct.length > 0)
51
+ return direct;
52
+ // 2) Registry with list() — duck-typed.
53
+ const reg = inspection
54
+ .constructRegistry;
55
+ if (reg && typeof reg.list === 'function') {
56
+ try {
57
+ return reg.list();
58
+ }
59
+ catch {
60
+ return [];
61
+ }
62
+ }
63
+ return [];
64
+ }
65
+ function constructFor(inspection, id) {
66
+ return listConstructsFrom(inspection).find((c) => c.id === id);
67
+ }
68
+ function symbolToConstruct(inspection, symbol) {
69
+ const target = symbol.toLowerCase();
70
+ for (const c of listConstructsFrom(inspection)) {
71
+ for (const api of c.publicApi ?? []) {
72
+ if (api.toLowerCase().includes(target))
73
+ return c;
74
+ }
75
+ for (const f of c.files ?? []) {
76
+ const base = nodePath.basename(f, nodePath.extname(f)).toLowerCase();
77
+ if (base === target)
78
+ return c;
79
+ }
80
+ }
81
+ return undefined;
82
+ }
83
+ function constructByFacet(inspection, facetKind, value) {
84
+ const target = value.toLowerCase();
85
+ for (const c of listConstructsFrom(inspection)) {
86
+ if (facetKind === 'event') {
87
+ for (const e of c.events ?? []) {
88
+ if (e.toLowerCase() === target || e.toLowerCase().endsWith('/' + target))
89
+ return c;
90
+ }
91
+ }
92
+ if (facetKind === 'token') {
93
+ for (const t of c.tokens ?? []) {
94
+ if (t.toLowerCase() === target)
95
+ return c;
96
+ }
97
+ }
98
+ if (facetKind === 'plugin-key') {
99
+ // Plugin keys typically appear in commands[] or tokens[] for plugin-shaped constructs.
100
+ for (const cmd of c.commands ?? []) {
101
+ if (cmd.toLowerCase().includes(target))
102
+ return c;
103
+ }
104
+ const facets = c.facets ?? {};
105
+ for (const list of Object.values(facets)) {
106
+ for (const v of list ?? []) {
107
+ if (typeof v.value === 'string' && v.value.toLowerCase() === target)
108
+ return c;
109
+ }
110
+ }
111
+ }
112
+ }
113
+ return undefined;
114
+ }
115
+ function templateFilesFor(inspection, templateId) {
116
+ const tpl = inspection.templates.find((t) => t.id === templateId);
117
+ if (!tpl)
118
+ return [];
119
+ const out = [];
120
+ if (typeof tpl.targetPath === 'string') {
121
+ out.push(tpl.targetPath);
122
+ }
123
+ else if (typeof tpl.targetPath === 'function') {
124
+ // Best-effort: invoke with empty values to get a path with placeholders.
125
+ try {
126
+ const p = tpl.targetPath({});
127
+ if (typeof p === 'string')
128
+ out.push(p);
129
+ }
130
+ catch {
131
+ // ignore; we still emit follow-up commands for templates.
132
+ }
133
+ }
134
+ return out;
135
+ }
136
+ function knowledgeFileReferences(inspection, knowledgeId) {
137
+ const k = inspection.knowledgeEntries.find((e) => e.id === knowledgeId);
138
+ if (!k)
139
+ return [];
140
+ const out = [];
141
+ for (const ref of k.references ?? []) {
142
+ if (ref.kind === 'file' && ref.path)
143
+ out.push(ref.path);
144
+ }
145
+ return out;
146
+ }
147
+ function playbookFiles(inspection, playbookId) {
148
+ const reg = inspection.playbookRegistry;
149
+ if (!reg || typeof reg.get !== 'function')
150
+ return [];
151
+ const playbook = reg.get(playbookId);
152
+ if (!playbook)
153
+ return [];
154
+ const out = [];
155
+ for (const f of playbook.relatedFiles ?? [])
156
+ out.push(f);
157
+ for (const step of playbook.steps ?? []) {
158
+ if (step.template?.targetPath)
159
+ out.push(step.template.targetPath);
160
+ for (const f of step.relatedFiles ?? [])
161
+ out.push(f);
162
+ }
163
+ return out;
164
+ }
165
+ function helperFiles(helperId) {
166
+ const helper = HELPERS.find((h) => h.id === helperId);
167
+ if (!helper)
168
+ return [];
169
+ const out = [];
170
+ for (const f of helper.files ?? [])
171
+ out.push(f);
172
+ for (const o of helper.outputs ?? [])
173
+ out.push(o.path);
174
+ return out;
175
+ }
176
+ function filesExist(projectRoot, files) {
177
+ return files.filter((f) => existsSync(nodePath.join(projectRoot, f)));
178
+ }
179
+ function buildResolution(inspection, query, resolution, opts) {
180
+ const best = resolution.bestMatch;
181
+ const limit = opts.limit ?? 8;
182
+ const alternatives = resolution.alternatives.slice(0, limit);
183
+ const followUps = [];
184
+ const diagnostics = [];
185
+ // No match.
186
+ if (!best) {
187
+ return {
188
+ schema: FUZZY_IMPACT_RESOLUTION_SCHEMA,
189
+ query,
190
+ confidence: 'unknown',
191
+ source: FuzzyImpactSourceKind.Unresolved,
192
+ files: [],
193
+ alternatives: [],
194
+ shouldRunImpact: false,
195
+ followUpCommands: [
196
+ `shrk trace "${query}"`,
197
+ `shrk search "${query}"`,
198
+ ],
199
+ diagnostics: [`No registry match for "${query}".`],
200
+ };
201
+ }
202
+ // Exact file path (already verified to exist by the resolver).
203
+ if (best.kind === QueryMatchKind.File) {
204
+ return {
205
+ schema: FUZZY_IMPACT_RESOLUTION_SCHEMA,
206
+ query,
207
+ confidence: resolution.confidence,
208
+ source: FuzzyImpactSourceKind.ExactFile,
209
+ files: [best.id],
210
+ resolvedId: best.id,
211
+ resolvedLabel: best.label,
212
+ alternatives,
213
+ shouldRunImpact: !opts.resolveOnly,
214
+ followUpCommands: [],
215
+ diagnostics: [],
216
+ matchKind: best.kind,
217
+ };
218
+ }
219
+ const auto = resolution.confidence === 'exact' || resolution.confidence === 'high';
220
+ if (best.kind === QueryMatchKind.Construct) {
221
+ const c = constructFor(inspection, best.id);
222
+ const files = c?.files ? filesExist(inspection.projectRoot, c.files) : [];
223
+ if (files.length === 0 && c) {
224
+ diagnostics.push(`Construct "${best.id}" has no files[] entries or none exist on disk — running impact will be empty.`);
225
+ }
226
+ followUps.push(`shrk constructs trace ${best.id} --deep`);
227
+ if (files.length > 0)
228
+ followUps.push(`shrk impact ${files[0]} --json`);
229
+ return {
230
+ schema: FUZZY_IMPACT_RESOLUTION_SCHEMA,
231
+ query,
232
+ confidence: resolution.confidence,
233
+ source: FuzzyImpactSourceKind.Construct,
234
+ files,
235
+ resolvedId: best.id,
236
+ resolvedLabel: best.label,
237
+ alternatives,
238
+ shouldRunImpact: !opts.resolveOnly && auto && files.length > 0,
239
+ followUpCommands: followUps,
240
+ diagnostics,
241
+ matchKind: best.kind,
242
+ };
243
+ }
244
+ if (best.kind === QueryMatchKind.Symbol || best.kind === QueryMatchKind.PluginKey) {
245
+ let construct;
246
+ if (best.kind === QueryMatchKind.Symbol) {
247
+ construct = symbolToConstruct(inspection, best.id);
248
+ }
249
+ else {
250
+ construct = constructByFacet(inspection, 'plugin-key', best.id);
251
+ }
252
+ const files = construct?.files ? filesExist(inspection.projectRoot, construct.files) : [];
253
+ if (!construct) {
254
+ diagnostics.push(`Could not map ${best.kind} "${best.id}" back to a construct file set — try \`shrk constructs trace\`.`);
255
+ followUps.push(`shrk constructs trace ${best.id}`);
256
+ }
257
+ return {
258
+ schema: FUZZY_IMPACT_RESOLUTION_SCHEMA,
259
+ query,
260
+ confidence: resolution.confidence,
261
+ source: best.kind === QueryMatchKind.Symbol
262
+ ? FuzzyImpactSourceKind.Symbol
263
+ : FuzzyImpactSourceKind.PluginKey,
264
+ files,
265
+ resolvedId: best.id,
266
+ resolvedLabel: best.label,
267
+ alternatives,
268
+ shouldRunImpact: !opts.resolveOnly && auto && files.length > 0,
269
+ followUpCommands: followUps,
270
+ diagnostics,
271
+ matchKind: best.kind,
272
+ };
273
+ }
274
+ if (best.kind === QueryMatchKind.EventToken || best.kind === QueryMatchKind.DIToken) {
275
+ const construct = constructByFacet(inspection, best.kind === QueryMatchKind.EventToken ? 'event' : 'token', best.id);
276
+ const files = construct?.files ? filesExist(inspection.projectRoot, construct.files) : [];
277
+ return {
278
+ schema: FUZZY_IMPACT_RESOLUTION_SCHEMA,
279
+ query,
280
+ confidence: resolution.confidence,
281
+ source: best.kind === QueryMatchKind.EventToken
282
+ ? FuzzyImpactSourceKind.EventToken
283
+ : FuzzyImpactSourceKind.DIToken,
284
+ files,
285
+ resolvedId: best.id,
286
+ resolvedLabel: best.label,
287
+ alternatives,
288
+ shouldRunImpact: !opts.resolveOnly && auto && files.length > 0,
289
+ followUpCommands: files.length === 0
290
+ ? [`shrk constructs facets ${best.kind === QueryMatchKind.EventToken ? '--event' : '--token'} ${best.id}`]
291
+ : [],
292
+ diagnostics,
293
+ matchKind: best.kind,
294
+ };
295
+ }
296
+ if (best.kind === QueryMatchKind.Template) {
297
+ const targetPaths = templateFilesFor(inspection, best.id);
298
+ const present = filesExist(inspection.projectRoot, targetPaths);
299
+ followUps.push(`shrk templates get ${best.id}`);
300
+ followUps.push(`shrk templates preview ${best.id}`);
301
+ if (present.length === 0 && targetPaths.length > 0) {
302
+ diagnostics.push(`Template "${best.id}" target path does not exist yet — running impact on a non-existent file returns no dependents.`);
303
+ }
304
+ return {
305
+ schema: FUZZY_IMPACT_RESOLUTION_SCHEMA,
306
+ query,
307
+ confidence: resolution.confidence,
308
+ source: FuzzyImpactSourceKind.Template,
309
+ files: present,
310
+ resolvedId: best.id,
311
+ resolvedLabel: best.label,
312
+ alternatives,
313
+ shouldRunImpact: !opts.resolveOnly && auto && present.length > 0,
314
+ followUpCommands: followUps,
315
+ diagnostics,
316
+ matchKind: best.kind,
317
+ };
318
+ }
319
+ if (best.kind === QueryMatchKind.Helper) {
320
+ const targets = helperFiles(best.id);
321
+ const present = filesExist(inspection.projectRoot, targets);
322
+ followUps.push(`shrk helper get ${best.id}`);
323
+ followUps.push(`shrk helper plan ${best.id} --json`);
324
+ return {
325
+ schema: FUZZY_IMPACT_RESOLUTION_SCHEMA,
326
+ query,
327
+ confidence: resolution.confidence,
328
+ source: FuzzyImpactSourceKind.Helper,
329
+ files: present,
330
+ resolvedId: best.id,
331
+ resolvedLabel: best.label,
332
+ alternatives,
333
+ shouldRunImpact: !opts.resolveOnly && auto && present.length > 0,
334
+ followUpCommands: followUps,
335
+ diagnostics,
336
+ matchKind: best.kind,
337
+ };
338
+ }
339
+ if (best.kind === QueryMatchKind.Playbook) {
340
+ const targets = playbookFiles(inspection, best.id);
341
+ const present = filesExist(inspection.projectRoot, targets);
342
+ followUps.push(`shrk playbooks get ${best.id}`);
343
+ followUps.push(`shrk playbooks runbook ${best.id}`);
344
+ return {
345
+ schema: FUZZY_IMPACT_RESOLUTION_SCHEMA,
346
+ query,
347
+ confidence: resolution.confidence,
348
+ source: FuzzyImpactSourceKind.Playbook,
349
+ files: present,
350
+ resolvedId: best.id,
351
+ resolvedLabel: best.label,
352
+ alternatives,
353
+ shouldRunImpact: !opts.resolveOnly && auto && present.length > 0,
354
+ followUpCommands: followUps,
355
+ diagnostics,
356
+ matchKind: best.kind,
357
+ };
358
+ }
359
+ if (best.kind === QueryMatchKind.Knowledge) {
360
+ const targets = knowledgeFileReferences(inspection, best.id);
361
+ const present = filesExist(inspection.projectRoot, targets);
362
+ followUps.push(`shrk knowledge get ${best.id}`);
363
+ return {
364
+ schema: FUZZY_IMPACT_RESOLUTION_SCHEMA,
365
+ query,
366
+ confidence: resolution.confidence,
367
+ source: FuzzyImpactSourceKind.Knowledge,
368
+ files: present,
369
+ resolvedId: best.id,
370
+ resolvedLabel: best.label,
371
+ alternatives,
372
+ shouldRunImpact: !opts.resolveOnly && auto && present.length > 0,
373
+ followUpCommands: followUps,
374
+ diagnostics: targets.length === 0
375
+ ? [`Knowledge "${best.id}" has no file references — nothing to impact-analyse.`]
376
+ : diagnostics,
377
+ matchKind: best.kind,
378
+ };
379
+ }
380
+ if (best.kind === QueryMatchKind.Command) {
381
+ return {
382
+ schema: FUZZY_IMPACT_RESOLUTION_SCHEMA,
383
+ query,
384
+ confidence: resolution.confidence,
385
+ source: FuzzyImpactSourceKind.Command,
386
+ files: [],
387
+ resolvedId: best.id,
388
+ resolvedLabel: best.label,
389
+ alternatives,
390
+ shouldRunImpact: false,
391
+ followUpCommands: [`shrk commands get ${best.id}`, `shrk ${best.id} --help`],
392
+ diagnostics: [
393
+ `"${best.id}" resolves to a CLI command, not a code construct. Use \`shrk impact <file>\` to analyse files this command would touch.`,
394
+ ],
395
+ matchKind: best.kind,
396
+ };
397
+ }
398
+ // Catch-all (policy, etc).
399
+ return {
400
+ schema: FUZZY_IMPACT_RESOLUTION_SCHEMA,
401
+ query,
402
+ confidence: resolution.confidence,
403
+ source: FuzzyImpactSourceKind.Unresolved,
404
+ files: [],
405
+ resolvedId: best.id,
406
+ resolvedLabel: best.label,
407
+ alternatives,
408
+ shouldRunImpact: false,
409
+ followUpCommands: [`shrk trace "${query}" --deep`],
410
+ diagnostics: [
411
+ `"${query}" resolved to ${best.kind} — no direct impact target. Use the trace command for details.`,
412
+ ],
413
+ matchKind: best.kind,
414
+ };
415
+ }
416
+ export function resolveFuzzyImpact(inspection, query, options = {}) {
417
+ // Short-circuit: if the query is an existing file path, return ExactFile.
418
+ if (query.includes('/') || query.includes('.')) {
419
+ const abs = nodePath.isAbsolute(query) ? query : nodePath.join(inspection.projectRoot, query);
420
+ if (existsSync(abs)) {
421
+ const rel = nodePath.relative(inspection.projectRoot, abs) || query;
422
+ return {
423
+ schema: FUZZY_IMPACT_RESOLUTION_SCHEMA,
424
+ query,
425
+ confidence: 'exact',
426
+ source: FuzzyImpactSourceKind.ExactFile,
427
+ files: [rel],
428
+ resolvedId: rel,
429
+ resolvedLabel: rel,
430
+ alternatives: [],
431
+ shouldRunImpact: !options.resolveOnly,
432
+ followUpCommands: [],
433
+ diagnostics: [],
434
+ matchKind: QueryMatchKind.File,
435
+ };
436
+ }
437
+ }
438
+ const resolveOpts = {
439
+ limit: options.limit ?? 8,
440
+ };
441
+ if (options.kinds && options.kinds.length > 0) {
442
+ resolveOpts.kinds = options.kinds;
443
+ }
444
+ const resolution = resolveQuery(inspection, query, resolveOpts);
445
+ return buildResolution(inspection, query, resolution, options);
446
+ }
@@ -0,0 +1,97 @@
1
+ import type { ISharkcraftInspection } from './sharkcraft-inspector.js';
2
+ export declare const GENERATED_CODE_SCHEMA = "sharkcraft.generated-code/v1";
3
+ export declare enum GeneratedConfidence {
4
+ High = "high",
5
+ Medium = "medium",
6
+ Low = "low"
7
+ }
8
+ export declare enum GeneratedKind {
9
+ Marker = "marker",
10
+ OpenApi = "openapi",
11
+ GraphQL = "graphql",
12
+ Protobuf = "protobuf",
13
+ PrismaClient = "prisma-client",
14
+ AngularEnv = "angular-environment",
15
+ AngularRouter = "angular-router",
16
+ Dist = "dist",
17
+ Lockfile = "lockfile",
18
+ Vendor = "vendor",
19
+ Snapshot = "snapshot",
20
+ /** Per-language markers. */
21
+ JavaGenerated = "java-generated",
22
+ CSharpGenerated = "csharp-generated",
23
+ PythonGenerated = "python-generated",
24
+ GoGenerated = "go-generated",
25
+ RustGenerated = "rust-generated",
26
+ Unknown = "unknown"
27
+ }
28
+ /** Scan depth selector for generated-code detection. */
29
+ export declare enum GeneratedScanDepth {
30
+ /** 4096 bytes / 30 lines per file, 600 files (existing default). */
31
+ Standard = "standard",
32
+ /** 16384 bytes / 200 lines per file, 2000 files. */
33
+ Deep = "deep",
34
+ /** 65536 bytes / capped full scan per file, 5000 files. */
35
+ Extreme = "extreme"
36
+ }
37
+ export interface IGeneratedFileEntry {
38
+ path: string;
39
+ kind: GeneratedKind;
40
+ confidence: GeneratedConfidence;
41
+ reason: string;
42
+ markerLine?: number;
43
+ }
44
+ export interface IGeneratedRoot {
45
+ /** Project-relative path of the directory. */
46
+ path: string;
47
+ kind: GeneratedKind;
48
+ confidence: GeneratedConfidence;
49
+ reason: string;
50
+ /** Number of generated files detected under this root. */
51
+ fileCount: number;
52
+ }
53
+ export interface IProtectedRule {
54
+ id: string;
55
+ title: string;
56
+ content: string;
57
+ /** Path globs the rule applies to. */
58
+ patterns: readonly string[];
59
+ reason: string;
60
+ }
61
+ export interface IRecommendedGeneratedPolicy {
62
+ id: string;
63
+ title: string;
64
+ description: string;
65
+ /** Suggested policy id / file in sharkcraft/policies.ts */
66
+ suggestedId: string;
67
+ patterns: readonly string[];
68
+ reason: string;
69
+ }
70
+ export interface IGeneratedCodeReport {
71
+ schema: typeof GENERATED_CODE_SCHEMA;
72
+ projectRoot: string;
73
+ generatedFiles: readonly IGeneratedFileEntry[];
74
+ handwrittenFiles: readonly string[];
75
+ mixedFiles: readonly string[];
76
+ generatedRoots: readonly IGeneratedRoot[];
77
+ protectedRules: readonly IProtectedRule[];
78
+ recommendedPolicyRules: readonly IRecommendedGeneratedPolicy[];
79
+ /** Total files scanned. */
80
+ filesScanned: number;
81
+ /** Limitations / sampling notes. */
82
+ limitations: readonly string[];
83
+ }
84
+ export interface IBuildGeneratedCodeReportOptions {
85
+ inspection: ISharkcraftInspection;
86
+ /** Max files to peek at for header markers. Default 600 (overrides depth). */
87
+ fileScanLimit?: number;
88
+ /** Max bytes per file head read. Default 4096 (overrides depth). */
89
+ headBytes?: number;
90
+ /** Convenience selector — sets sensible scan limit/head bytes/line count. Default `standard`. */
91
+ depth?: GeneratedScanDepth;
92
+ }
93
+ export declare function buildGeneratedCodeReport(options: IBuildGeneratedCodeReportOptions): IGeneratedCodeReport;
94
+ export declare function renderGeneratedCodeReportText(report: IGeneratedCodeReport): string;
95
+ export declare function renderGeneratedCodeReportMarkdown(report: IGeneratedCodeReport): string;
96
+ export declare function renderGeneratedCodeReportJson(report: IGeneratedCodeReport): string;
97
+ //# sourceMappingURL=generated-code.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-code.d.ts","sourceRoot":"","sources":["../src/generated-code.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,eAAO,MAAM,qBAAqB,iCAAiC,CAAC;AAEpE,oBAAY,mBAAmB;IAC7B,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,GAAG,QAAQ;CACZ;AAED,oBAAY,aAAa;IACvB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,YAAY,kBAAkB;IAC9B,UAAU,wBAAwB;IAClC,aAAa,mBAAmB;IAChC,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,4BAA4B;IAC5B,aAAa,mBAAmB;IAChC,eAAe,qBAAqB;IACpC,eAAe,qBAAqB;IACpC,WAAW,iBAAiB;IAC5B,aAAa,mBAAmB;IAChC,OAAO,YAAY;CACpB;AAED,wDAAwD;AACxD,oBAAY,kBAAkB;IAC5B,oEAAoE;IACpE,QAAQ,aAAa;IACrB,oDAAoD;IACpD,IAAI,SAAS;IACb,2DAA2D;IAC3D,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,mBAAmB,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,mBAAmB,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,OAAO,qBAAqB,CAAC;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC/C,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,cAAc,EAAE,SAAS,cAAc,EAAE,CAAC;IAC1C,cAAc,EAAE,SAAS,cAAc,EAAE,CAAC;IAC1C,sBAAsB,EAAE,SAAS,2BAA2B,EAAE,CAAC;IAC/D,2BAA2B;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,gCAAgC;IAC/C,UAAU,EAAE,qBAAqB,CAAC;IAClC,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iGAAiG;IACjG,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B;AA0FD,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,gCAAgC,GACxC,oBAAoB,CAwMtB;AAsBD,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CA2BlF;AAED,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CA8CtF;AAED,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CAElF"}