@stsepelin/checktrail 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 (385) hide show
  1. package/CONTRIBUTING.md +42 -0
  2. package/LICENSE +21 -0
  3. package/README.md +355 -0
  4. package/SECURITY.md +46 -0
  5. package/dist/src/actionlint-evidence.d.ts +2 -0
  6. package/dist/src/actionlint-evidence.js +166 -0
  7. package/dist/src/actionlint-inputs.d.ts +5 -0
  8. package/dist/src/actionlint-inputs.js +123 -0
  9. package/dist/src/actionlint-runner.d.ts +1 -0
  10. package/dist/src/actionlint-runner.js +122 -0
  11. package/dist/src/actionlint.d.ts +19 -0
  12. package/dist/src/actionlint.js +80 -0
  13. package/dist/src/adapters.d.ts +49 -0
  14. package/dist/src/adapters.js +430 -0
  15. package/dist/src/architecture.d.ts +107 -0
  16. package/dist/src/architecture.js +230 -0
  17. package/dist/src/clang-evidence.d.ts +2 -0
  18. package/dist/src/clang-evidence.js +194 -0
  19. package/dist/src/clang-protocol.d.ts +3 -0
  20. package/dist/src/clang-protocol.js +25 -0
  21. package/dist/src/clang-runner.d.ts +1 -0
  22. package/dist/src/clang-runner.js +159 -0
  23. package/dist/src/clang.d.ts +44 -0
  24. package/dist/src/clang.js +197 -0
  25. package/dist/src/cli.d.ts +2 -0
  26. package/dist/src/cli.js +338 -0
  27. package/dist/src/config.d.ts +33 -0
  28. package/dist/src/config.js +140 -0
  29. package/dist/src/contract-schema.d.ts +85 -0
  30. package/dist/src/contract-schema.js +56 -0
  31. package/dist/src/contract-worker.d.ts +1 -0
  32. package/dist/src/contract-worker.js +123 -0
  33. package/dist/src/contracts.d.ts +22 -0
  34. package/dist/src/contracts.js +123 -0
  35. package/dist/src/django-evidence.d.ts +2 -0
  36. package/dist/src/django-evidence.js +100 -0
  37. package/dist/src/django-runner.d.ts +1 -0
  38. package/dist/src/django-runner.js +80 -0
  39. package/dist/src/django.d.ts +9 -0
  40. package/dist/src/django.js +50 -0
  41. package/dist/src/dotnet-compiler.d.ts +1 -0
  42. package/dist/src/dotnet-compiler.js +87 -0
  43. package/dist/src/dotnet-evidence.d.ts +2 -0
  44. package/dist/src/dotnet-evidence.js +127 -0
  45. package/dist/src/dotnet-runner.d.ts +1 -0
  46. package/dist/src/dotnet-runner.js +167 -0
  47. package/dist/src/dotnet.d.ts +65 -0
  48. package/dist/src/dotnet.js +120 -0
  49. package/dist/src/engine.d.ts +19 -0
  50. package/dist/src/engine.js +239 -0
  51. package/dist/src/environment.d.ts +6 -0
  52. package/dist/src/environment.js +36 -0
  53. package/dist/src/eslint-evidence.d.ts +2 -0
  54. package/dist/src/eslint-evidence.js +98 -0
  55. package/dist/src/eslint-runner.d.ts +1 -0
  56. package/dist/src/eslint-runner.js +61 -0
  57. package/dist/src/eslint.d.ts +2 -0
  58. package/dist/src/eslint.js +40 -0
  59. package/dist/src/evidence.d.ts +2 -0
  60. package/dist/src/evidence.js +313 -0
  61. package/dist/src/external-adapter.d.ts +164 -0
  62. package/dist/src/external-adapter.js +265 -0
  63. package/dist/src/external-evidence.d.ts +2 -0
  64. package/dist/src/external-evidence.js +127 -0
  65. package/dist/src/external-runner.d.ts +1 -0
  66. package/dist/src/external-runner.js +122 -0
  67. package/dist/src/fastapi-evidence.d.ts +2 -0
  68. package/dist/src/fastapi-evidence.js +126 -0
  69. package/dist/src/fastapi-runner.d.ts +1 -0
  70. package/dist/src/fastapi-runner.js +84 -0
  71. package/dist/src/fastapi.d.ts +10 -0
  72. package/dist/src/fastapi.js +52 -0
  73. package/dist/src/fetch-pack.d.ts +16 -0
  74. package/dist/src/fetch-pack.js +154 -0
  75. package/dist/src/finding-policy-schema.d.ts +146 -0
  76. package/dist/src/finding-policy-schema.js +70 -0
  77. package/dist/src/finding-policy.d.ts +62 -0
  78. package/dist/src/finding-policy.js +206 -0
  79. package/dist/src/git-selection.d.ts +3 -0
  80. package/dist/src/git-selection.js +229 -0
  81. package/dist/src/go-directives.d.ts +1 -0
  82. package/dist/src/go-directives.js +32 -0
  83. package/dist/src/go-scope.d.ts +11 -0
  84. package/dist/src/go-scope.js +122 -0
  85. package/dist/src/golangci-evidence.d.ts +2 -0
  86. package/dist/src/golangci-evidence.js +92 -0
  87. package/dist/src/golangci-runner.d.ts +1 -0
  88. package/dist/src/golangci-runner.js +124 -0
  89. package/dist/src/golangci.d.ts +2 -0
  90. package/dist/src/golangci.js +35 -0
  91. package/dist/src/guidance.d.ts +98 -0
  92. package/dist/src/guidance.js +247 -0
  93. package/dist/src/index.d.ts +31 -0
  94. package/dist/src/index.js +16 -0
  95. package/dist/src/inventory.d.ts +4 -0
  96. package/dist/src/inventory.js +94 -0
  97. package/dist/src/java-compiler.d.ts +1 -0
  98. package/dist/src/java-compiler.js +110 -0
  99. package/dist/src/java-evidence.d.ts +2 -0
  100. package/dist/src/java-evidence.js +114 -0
  101. package/dist/src/java-runner.d.ts +1 -0
  102. package/dist/src/java-runner.js +79 -0
  103. package/dist/src/java.d.ts +25 -0
  104. package/dist/src/java.js +102 -0
  105. package/dist/src/jest-evidence.d.ts +2 -0
  106. package/dist/src/jest-evidence.js +117 -0
  107. package/dist/src/jest-runner.d.ts +1 -0
  108. package/dist/src/jest-runner.js +46 -0
  109. package/dist/src/jest.d.ts +2 -0
  110. package/dist/src/jest.js +36 -0
  111. package/dist/src/junit.d.ts +18 -0
  112. package/dist/src/junit.js +157 -0
  113. package/dist/src/laravel-evidence.d.ts +2 -0
  114. package/dist/src/laravel-evidence.js +175 -0
  115. package/dist/src/laravel-runner.d.ts +1 -0
  116. package/dist/src/laravel-runner.js +168 -0
  117. package/dist/src/laravel.d.ts +8 -0
  118. package/dist/src/laravel.js +50 -0
  119. package/dist/src/local-tool.d.ts +1 -0
  120. package/dist/src/local-tool.js +19 -0
  121. package/dist/src/mcp.d.ts +14 -0
  122. package/dist/src/mcp.js +362 -0
  123. package/dist/src/mutation.d.ts +118 -0
  124. package/dist/src/mutation.js +370 -0
  125. package/dist/src/mypy-evidence.d.ts +2 -0
  126. package/dist/src/mypy-evidence.js +63 -0
  127. package/dist/src/mypy.d.ts +2 -0
  128. package/dist/src/mypy.js +59 -0
  129. package/dist/src/node-reporter.d.ts +1 -0
  130. package/dist/src/node-reporter.js +28 -0
  131. package/dist/src/nuxt-evidence.d.ts +2 -0
  132. package/dist/src/nuxt-evidence.js +160 -0
  133. package/dist/src/nuxt-protocol.d.ts +52 -0
  134. package/dist/src/nuxt-protocol.js +29 -0
  135. package/dist/src/nuxt-runner.d.ts +1 -0
  136. package/dist/src/nuxt-runner.js +165 -0
  137. package/dist/src/nuxt.d.ts +24 -0
  138. package/dist/src/nuxt.js +105 -0
  139. package/dist/src/output.d.ts +3 -0
  140. package/dist/src/output.js +48 -0
  141. package/dist/src/phpstan-evidence.d.ts +2 -0
  142. package/dist/src/phpstan-evidence.js +81 -0
  143. package/dist/src/phpstan.d.ts +2 -0
  144. package/dist/src/phpstan.js +51 -0
  145. package/dist/src/phpunit-evidence.d.ts +2 -0
  146. package/dist/src/phpunit-evidence.js +53 -0
  147. package/dist/src/phpunit.d.ts +2 -0
  148. package/dist/src/phpunit.js +58 -0
  149. package/dist/src/pint-evidence.d.ts +2 -0
  150. package/dist/src/pint-evidence.js +79 -0
  151. package/dist/src/pint-runner.d.ts +1 -0
  152. package/dist/src/pint-runner.js +53 -0
  153. package/dist/src/pint.d.ts +2 -0
  154. package/dist/src/pint.js +37 -0
  155. package/dist/src/playwright-evidence.d.ts +2 -0
  156. package/dist/src/playwright-evidence.js +127 -0
  157. package/dist/src/playwright-reporter.d.ts +10 -0
  158. package/dist/src/playwright-reporter.js +37 -0
  159. package/dist/src/playwright-runner.d.ts +1 -0
  160. package/dist/src/playwright-runner.js +61 -0
  161. package/dist/src/playwright.d.ts +2 -0
  162. package/dist/src/playwright.js +35 -0
  163. package/dist/src/policy-pack.d.ts +21 -0
  164. package/dist/src/policy-pack.js +41 -0
  165. package/dist/src/pytest-evidence.d.ts +2 -0
  166. package/dist/src/pytest-evidence.js +116 -0
  167. package/dist/src/pytest-runner.d.ts +1 -0
  168. package/dist/src/pytest-runner.js +48 -0
  169. package/dist/src/pytest.d.ts +2 -0
  170. package/dist/src/pytest.js +25 -0
  171. package/dist/src/report-validation.d.ts +129 -0
  172. package/dist/src/report-validation.js +27 -0
  173. package/dist/src/review.d.ts +270 -0
  174. package/dist/src/review.js +349 -0
  175. package/dist/src/ruby.d.ts +2 -0
  176. package/dist/src/ruby.js +25 -0
  177. package/dist/src/ruff-evidence.d.ts +2 -0
  178. package/dist/src/ruff-evidence.js +99 -0
  179. package/dist/src/ruff.d.ts +2 -0
  180. package/dist/src/ruff.js +40 -0
  181. package/dist/src/runner.d.ts +8 -0
  182. package/dist/src/runner.js +117 -0
  183. package/dist/src/runtime-inventory.d.ts +112 -0
  184. package/dist/src/runtime-inventory.js +200 -0
  185. package/dist/src/rust-dep-info.d.ts +1 -0
  186. package/dist/src/rust-dep-info.js +46 -0
  187. package/dist/src/rust-evidence.d.ts +2 -0
  188. package/dist/src/rust-evidence.js +157 -0
  189. package/dist/src/rust-runner.d.ts +1 -0
  190. package/dist/src/rust-runner.js +161 -0
  191. package/dist/src/rust.d.ts +7 -0
  192. package/dist/src/rust.js +39 -0
  193. package/dist/src/sarif.d.ts +86 -0
  194. package/dist/src/sarif.js +113 -0
  195. package/dist/src/schemas.d.ts +393 -0
  196. package/dist/src/schemas.js +222 -0
  197. package/dist/src/staticcheck-evidence.d.ts +2 -0
  198. package/dist/src/staticcheck-evidence.js +75 -0
  199. package/dist/src/swift.d.ts +2 -0
  200. package/dist/src/swift.js +20 -0
  201. package/dist/src/task-store.d.ts +37 -0
  202. package/dist/src/task-store.js +349 -0
  203. package/dist/src/tool-versions.d.ts +3 -0
  204. package/dist/src/tool-versions.js +260 -0
  205. package/dist/src/types.d.ts +157 -0
  206. package/dist/src/types.js +37 -0
  207. package/dist/src/typescript-build-evidence.d.ts +2 -0
  208. package/dist/src/typescript-build-evidence.js +86 -0
  209. package/dist/src/typescript-build-runner.d.ts +1 -0
  210. package/dist/src/typescript-build-runner.js +132 -0
  211. package/dist/src/typescript-build.d.ts +2 -0
  212. package/dist/src/typescript-build.js +41 -0
  213. package/dist/src/typescript.d.ts +2 -0
  214. package/dist/src/typescript.js +54 -0
  215. package/dist/src/validation-task-worker.d.ts +1 -0
  216. package/dist/src/validation-task-worker.js +205 -0
  217. package/dist/src/validation-tasks-protocol.d.ts +69 -0
  218. package/dist/src/validation-tasks-protocol.js +57 -0
  219. package/dist/src/validation-tasks.d.ts +11 -0
  220. package/dist/src/validation-tasks.js +144 -0
  221. package/dist/src/vitest-evidence.d.ts +2 -0
  222. package/dist/src/vitest-evidence.js +112 -0
  223. package/dist/src/vitest-runner.d.ts +1 -0
  224. package/dist/src/vitest-runner.js +48 -0
  225. package/dist/src/vitest.d.ts +2 -0
  226. package/dist/src/vitest.js +36 -0
  227. package/dist/src/vue-router-capture.d.ts +42 -0
  228. package/dist/src/vue-router-capture.js +87 -0
  229. package/dist/src/vue-router-evidence.d.ts +2 -0
  230. package/dist/src/vue-router-evidence.js +126 -0
  231. package/dist/src/vue-router-protocol.d.ts +63 -0
  232. package/dist/src/vue-router-protocol.js +44 -0
  233. package/dist/src/vue-router-runner.d.ts +1 -0
  234. package/dist/src/vue-router-runner.js +88 -0
  235. package/dist/src/vue-router.d.ts +23 -0
  236. package/dist/src/vue-router.js +108 -0
  237. package/dist/src/vue-tsc-runner.d.ts +1 -0
  238. package/dist/src/vue-tsc-runner.js +24 -0
  239. package/dist/src/workspace.d.ts +7 -0
  240. package/dist/src/workspace.js +53 -0
  241. package/docs/ACCEPTANCE.md +56 -0
  242. package/docs/ACTIONLINT.md +112 -0
  243. package/docs/ARCHITECTURE-POLICY.md +82 -0
  244. package/docs/ARCHITECTURE.md +122 -0
  245. package/docs/CLANG.md +113 -0
  246. package/docs/CLIENTS.md +109 -0
  247. package/docs/CONTRACTS.md +73 -0
  248. package/docs/DEPENDENCIES.md +42 -0
  249. package/docs/DJANGO.md +70 -0
  250. package/docs/DOTNET.md +114 -0
  251. package/docs/ENVIRONMENTS.md +52 -0
  252. package/docs/ESLINT.md +68 -0
  253. package/docs/EVALUATION.md +124 -0
  254. package/docs/EXECUTION.md +250 -0
  255. package/docs/EXTERNAL-ADAPTERS.md +170 -0
  256. package/docs/EXTERNAL-EVALUATION.md +155 -0
  257. package/docs/EXTERNAL-RUFF-EVALUATION.md +85 -0
  258. package/docs/FASTAPI.md +73 -0
  259. package/docs/FINDING-POLICY.md +67 -0
  260. package/docs/GO-RACE.md +19 -0
  261. package/docs/GO-SCOPE.md +63 -0
  262. package/docs/GOLANGCI-LINT.md +64 -0
  263. package/docs/GUIDANCE.md +46 -0
  264. package/docs/IMPACT-MEASUREMENT.md +97 -0
  265. package/docs/INSTALLATION.md +102 -0
  266. package/docs/JAVA.md +79 -0
  267. package/docs/JEST.md +36 -0
  268. package/docs/JUNIT.md +31 -0
  269. package/docs/LANGUAGES.md +113 -0
  270. package/docs/LARAVEL.md +111 -0
  271. package/docs/MCP-COMPATIBILITY.md +68 -0
  272. package/docs/MUTATIONS.md +93 -0
  273. package/docs/MYPY.md +37 -0
  274. package/docs/NATIVE-CI.md +96 -0
  275. package/docs/NUXT.md +123 -0
  276. package/docs/PACK-DISTRIBUTION.md +98 -0
  277. package/docs/PERFORMANCE.md +71 -0
  278. package/docs/PEST.md +36 -0
  279. package/docs/PHPSTAN.md +48 -0
  280. package/docs/PHPUNIT.md +32 -0
  281. package/docs/PINT.md +41 -0
  282. package/docs/PLAN.md +265 -0
  283. package/docs/PLAYWRIGHT.md +73 -0
  284. package/docs/POLICY-PACKS.md +106 -0
  285. package/docs/PRIOR-WORKFLOW-EVALUATION.md +116 -0
  286. package/docs/PUBLICATION.md +28 -0
  287. package/docs/PYTEST.md +51 -0
  288. package/docs/RELEASE.md +115 -0
  289. package/docs/RENAMING.md +55 -0
  290. package/docs/REVIEW-EXCHANGE.md +136 -0
  291. package/docs/RUBY.md +50 -0
  292. package/docs/RUFF.md +39 -0
  293. package/docs/RUNTIME-INVENTORY.md +56 -0
  294. package/docs/RUST.md +74 -0
  295. package/docs/SARIF.md +64 -0
  296. package/docs/STATUS.md +530 -0
  297. package/docs/SWIFT.md +48 -0
  298. package/docs/TASK-STORAGE.md +141 -0
  299. package/docs/TOOL-IDENTITY.md +30 -0
  300. package/docs/TYPESCRIPT-BUILD.md +55 -0
  301. package/docs/VALIDATION-TASKS.md +119 -0
  302. package/docs/VITEST.md +36 -0
  303. package/docs/VUE-ROUTER.md +130 -0
  304. package/docs/VUE-TSC.md +26 -0
  305. package/docs/WORKSPACES.md +81 -0
  306. package/docs/licenses/nodable-entities-3.0.0.txt +21 -0
  307. package/docs/measurements/client-claude-before-schema-fix-darwin-arm64-node26.json +60 -0
  308. package/docs/measurements/client-claude-darwin-arm64-node26.json +55 -0
  309. package/docs/measurements/client-codex-darwin-arm64-node26.json +175 -0
  310. package/docs/measurements/evaluation-corpus-repo-verifier.json +332 -0
  311. package/docs/measurements/evaluation-darwin-arm64-node26.json +1236 -0
  312. package/docs/measurements/evaluation-linux-arm64-node22.json +1236 -0
  313. package/docs/measurements/external-eslint-darwin-arm64-node26.json +11866 -0
  314. package/docs/measurements/external-eslint-linux-arm64-node22.json +11866 -0
  315. package/docs/measurements/external-eslint-preservation.json +1527 -0
  316. package/docs/measurements/external-ruff-darwin-arm64-node26.json +1031 -0
  317. package/docs/measurements/external-ruff-linux-arm64-node22.json +1031 -0
  318. package/docs/measurements/hosted-ci-52ba415.json +1005 -0
  319. package/docs/measurements/impact-darwin-arm64-node26.json +6685 -0
  320. package/docs/measurements/impact-linux-arm64-node22.json +6690 -0
  321. package/docs/measurements/performance-darwin-arm64-node26.json +845 -0
  322. package/docs/measurements/performance-linux-arm64-node22.json +845 -0
  323. package/docs/measurements/required-native-profiles.json +500 -0
  324. package/package.json +72 -0
  325. package/packs/actionlint.json +8 -0
  326. package/packs/cpp.json +8 -0
  327. package/packs/dotnet.json +8 -0
  328. package/packs/go.json +7 -0
  329. package/packs/java.json +8 -0
  330. package/packs/javascript-node.json +7 -0
  331. package/packs/nuxt.json +7 -0
  332. package/packs/php-pest.json +7 -0
  333. package/packs/php-phpunit.json +7 -0
  334. package/packs/python-pytest.json +7 -0
  335. package/packs/ruby.json +7 -0
  336. package/packs/rust.json +7 -0
  337. package/packs/swift.json +7 -0
  338. package/packs/vue-router.json +7 -0
  339. package/packs/vue.json +11 -0
  340. package/schemas/actionlint-config.schema.json +19 -0
  341. package/schemas/architecture-policy.schema.json +51 -0
  342. package/schemas/architecture-report.schema.json +123 -0
  343. package/schemas/architecture-summary.schema.json +82 -0
  344. package/schemas/clang-database.schema.json +23 -0
  345. package/schemas/config.schema.json +69 -0
  346. package/schemas/contract-bundle.schema.json +78 -0
  347. package/schemas/contract-report.schema.json +114 -0
  348. package/schemas/contract-summary.schema.json +72 -0
  349. package/schemas/dependency-graph.schema.json +65 -0
  350. package/schemas/django-config.schema.json +16 -0
  351. package/schemas/dotnet-config.schema.json +60 -0
  352. package/schemas/external-manifest.schema.json +97 -0
  353. package/schemas/external-reference.schema.json +10 -0
  354. package/schemas/external-request.schema.json +56 -0
  355. package/schemas/external-result.schema.json +111 -0
  356. package/schemas/fastapi-config.schema.json +27 -0
  357. package/schemas/finding-baseline.schema.json +92 -0
  358. package/schemas/finding-comparison-summary.schema.json +95 -0
  359. package/schemas/finding-comparison.schema.json +121 -0
  360. package/schemas/guidance-context.schema.json +34 -0
  361. package/schemas/guidance-report.schema.json +176 -0
  362. package/schemas/guidance-summary.schema.json +68 -0
  363. package/schemas/java-config.schema.json +24 -0
  364. package/schemas/junit.schema.json +69 -0
  365. package/schemas/laravel-config.schema.json +11 -0
  366. package/schemas/mutation-recipe.schema.json +31 -0
  367. package/schemas/mutation-report.schema.json +238 -0
  368. package/schemas/mutation-summary.schema.json +98 -0
  369. package/schemas/nuxt-config.schema.json +51 -0
  370. package/schemas/plan-summary.schema.json +63 -0
  371. package/schemas/plan.schema.json +244 -0
  372. package/schemas/policy-pack.schema.json +41 -0
  373. package/schemas/report-summary.schema.json +100 -0
  374. package/schemas/report.schema.json +463 -0
  375. package/schemas/review-assessment.schema.json +133 -0
  376. package/schemas/review-context-summary.schema.json +31 -0
  377. package/schemas/review-context.schema.json +254 -0
  378. package/schemas/review-receipt-summary.schema.json +104 -0
  379. package/schemas/review-receipt.schema.json +271 -0
  380. package/schemas/review-selection.schema.json +30 -0
  381. package/schemas/runtime-comparison-summary.schema.json +68 -0
  382. package/schemas/runtime-comparison.schema.json +127 -0
  383. package/schemas/runtime-inventory.schema.json +99 -0
  384. package/schemas/vue-router-config.schema.json +67 -0
  385. package/server.json +47 -0
@@ -0,0 +1,92 @@
1
+ import path from "node:path";
2
+ import { z } from "zod";
3
+ import { goScopeComplete } from "./go-scope.js";
4
+ const schema = z.object({
5
+ Issues: z.array(z.object({
6
+ FromLinter: z.string().min(1),
7
+ Text: z.string().min(1),
8
+ Pos: z.object({
9
+ Filename: z.string(),
10
+ Line: z.number().int().positive(),
11
+ Column: z.number().int().nonnegative(),
12
+ }),
13
+ })),
14
+ Report: z.object({
15
+ Linters: z
16
+ .array(z.object({ Name: z.string(), Enabled: z.boolean().optional() }))
17
+ .optional(),
18
+ Warnings: z.array(z.unknown()).optional(),
19
+ Error: z.string().optional(),
20
+ }),
21
+ });
22
+ export function golangciEvidence(check, processes, root) {
23
+ const incomplete = {
24
+ status: "inconclusive",
25
+ reason: "golangci-lint evidence, active linters or native Go scope could not be established.",
26
+ };
27
+ if (!root || processes.length !== 2)
28
+ return incomplete;
29
+ const process = processes[1];
30
+ if (![0, 1].includes(process.exitCode ?? -1))
31
+ return {
32
+ status: "error",
33
+ reason: "golangci-lint configuration or its supported execution profile could not run.",
34
+ };
35
+ try {
36
+ const report = schema.parse(JSON.parse(process.stdout));
37
+ const expected = new Set(check.scope.map((file) => path.resolve(root, check.project, file)));
38
+ const active = report.Report.Linters?.filter((linter) => linter.Enabled).map((linter) => linter.Name) ?? [];
39
+ if (!active.some((name) => name !== "typecheck") ||
40
+ new Set(active).size !== active.length ||
41
+ active.some((name) => ![
42
+ "errcheck",
43
+ "govet",
44
+ "ineffassign",
45
+ "staticcheck",
46
+ "unused",
47
+ "typecheck",
48
+ ].includes(name)))
49
+ return incomplete;
50
+ if (report.Issues.some((issue) => !path.isAbsolute(issue.Pos.Filename) ||
51
+ !expected.has(path.resolve(issue.Pos.Filename))))
52
+ return incomplete;
53
+ const findings = report.Issues.map((issue) => ({
54
+ ruleId: issue.FromLinter,
55
+ level: "error",
56
+ message: issue.Text,
57
+ file: path.relative(root, issue.Pos.Filename).split(path.sep).join("/"),
58
+ line: issue.Pos.Line,
59
+ }));
60
+ if (findings.length)
61
+ return {
62
+ status: "failed",
63
+ reason: "golangci-lint reported native diagnostics.",
64
+ findings,
65
+ findingsComplete: process.exitCode === 1 &&
66
+ !process.stderr.trim() &&
67
+ !report.Report.Error &&
68
+ !report.Report.Warnings?.length &&
69
+ report.Issues.every((issue) => issue.FromLinter !== "typecheck" &&
70
+ active.includes(issue.FromLinter)) &&
71
+ goScopeComplete(check, processes[0], root),
72
+ };
73
+ if (process.exitCode !== 0 || report.Report.Error)
74
+ return {
75
+ status: "error",
76
+ reason: "golangci-lint reported an analysis or loading error.",
77
+ };
78
+ if (report.Report.Warnings?.length ||
79
+ process.stderr.trim() ||
80
+ !goScopeComplete(check, processes[0], root))
81
+ return incomplete;
82
+ return {
83
+ status: "passed",
84
+ reason: "Configured golangci-lint checks completed for the inventoried Go scope.",
85
+ findings,
86
+ findingsComplete: true,
87
+ };
88
+ }
89
+ catch {
90
+ return incomplete;
91
+ }
92
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,124 @@
1
+ import { spawnSync } from "node:child_process";
2
+ import { mkdtemp, writeFile, rm } from "node:fs/promises";
3
+ import { tmpdir } from "node:os";
4
+ import path from "node:path";
5
+ import { parseDocument } from "yaml";
6
+ import { z } from "zod";
7
+ import { readProjectFile } from "./inventory.js";
8
+ import { hasGoSuppression } from "./go-directives.js";
9
+ const supported = z.enum([
10
+ "errcheck",
11
+ "govet",
12
+ "ineffassign",
13
+ "staticcheck",
14
+ "unused",
15
+ ]);
16
+ const configuration = z.strictObject({
17
+ version: z.literal("2"),
18
+ linters: z
19
+ .strictObject({
20
+ default: z.enum(["standard", "none"]).optional(),
21
+ enable: z.array(supported).optional(),
22
+ disable: z.array(supported).optional(),
23
+ settings: z.record(z.string(), z.unknown()).optional(),
24
+ exclusions: z.record(z.string(), z.unknown()).optional(),
25
+ })
26
+ .optional(),
27
+ run: z.record(z.string(), z.unknown()).optional(),
28
+ issues: z.record(z.string(), z.unknown()).optional(),
29
+ output: z.record(z.string(), z.unknown()).optional(),
30
+ severity: z.record(z.string(), z.unknown()).optional(),
31
+ formatters: z.record(z.string(), z.unknown()).optional(),
32
+ });
33
+ async function main() {
34
+ const [root, configFile, ...files] = process.argv.slice(2);
35
+ if (!root || !configFile || !files.length)
36
+ throw new Error("Invalid golangci-lint arguments");
37
+ const version = spawnSync("golangci-lint", ["version", "--short"], {
38
+ encoding: "utf8",
39
+ maxBuffer: 8192,
40
+ });
41
+ if (version.error ||
42
+ version.status !== 0 ||
43
+ version.stderr.trim() ||
44
+ version.stdout.trim() !== "2.13.2")
45
+ throw new Error("golangci-lint integration requires installed verified version 2.13.2");
46
+ const raw = await readProjectFile(root, path.relative(root, path.resolve(configFile)));
47
+ const document = parseDocument(raw, { uniqueKeys: true });
48
+ if (document.errors.length || document.warnings.length)
49
+ throw new Error("Invalid golangci-lint configuration");
50
+ const config = configuration.parse(document.toJS({ maxAliasCount: 50 }));
51
+ if (Object.keys(config.linters?.settings ?? {}).length ||
52
+ Object.keys(config.formatters ?? {}).length ||
53
+ Object.hasOwn(config.run ?? {}, "go") ||
54
+ Object.hasOwn(config.run ?? {}, "build-tags"))
55
+ throw new Error("Custom linter settings, formatters and Go build profiles need separately verified integration");
56
+ for (const file of files)
57
+ if (hasGoSuppression(await readProjectFile(root, path.relative(root, path.resolve(file)))))
58
+ throw new Error("Native Go suppression directives prevent complete golangci-lint evidence");
59
+ const temporary = await mkdtemp(path.join(tmpdir(), "checktrail-golangci-"));
60
+ try {
61
+ const target = path.join(temporary, "config.json");
62
+ const native = {
63
+ version: "2",
64
+ run: {
65
+ tests: true,
66
+ "modules-download-mode": "readonly",
67
+ "relative-path-mode": "wd",
68
+ "issues-exit-code": 1,
69
+ "allow-parallel-runners": true,
70
+ "enable-build-vcs": false,
71
+ },
72
+ linters: {
73
+ ...config.linters,
74
+ settings: {},
75
+ exclusions: {
76
+ generated: "disable",
77
+ presets: [],
78
+ rules: [],
79
+ paths: [],
80
+ "paths-except": [],
81
+ },
82
+ },
83
+ issues: {
84
+ fix: false,
85
+ new: false,
86
+ "new-from-rev": "",
87
+ "new-from-merge-base": "",
88
+ "new-from-patch": "",
89
+ "max-issues-per-linter": 0,
90
+ "max-same-issues": 0,
91
+ "uniq-by-line": false,
92
+ },
93
+ output: {
94
+ formats: { json: { path: "stdout" } },
95
+ "show-stats": false,
96
+ "path-mode": "abs",
97
+ "path-prefix": "",
98
+ },
99
+ };
100
+ await writeFile(target, JSON.stringify(native));
101
+ const result = spawnSync("golangci-lint", ["run", "--config", target, "--color", "never", "./..."], {
102
+ encoding: "utf8",
103
+ maxBuffer: 1024 * 1024,
104
+ env: {
105
+ ...process.env,
106
+ GOLANGCI_LINT_CACHE: path.join(temporary, "cache"),
107
+ },
108
+ });
109
+ if (result.error)
110
+ throw result.error;
111
+ process.stdout.write(result.stdout);
112
+ process.stderr.write(result.stderr);
113
+ process.exitCode = result.status ?? 2;
114
+ }
115
+ finally {
116
+ await rm(temporary, { recursive: true, force: true });
117
+ }
118
+ }
119
+ main().catch((error) => {
120
+ process.stderr.write((error instanceof Error
121
+ ? error.message
122
+ : "golangci-lint execution failed") + "\n");
123
+ process.exitCode = 2;
124
+ });
@@ -0,0 +1,2 @@
1
+ import type { Check, Inventory, Project } from "./types.js";
2
+ export declare function golangciCheck(source: Inventory, project: Project): Promise<Check>;
@@ -0,0 +1,35 @@
1
+ import { fileURLToPath } from "node:url";
2
+ import { goEnvironment, goScopeCommand } from "./go-scope.js";
3
+ export async function golangciCheck(source, project) {
4
+ const configs = project.files.filter((file) => /^\.golangci\.(?:ya?ml|json)$/.test(file));
5
+ const files = project.files.filter((file) => file.endsWith(".go"));
6
+ const check = {
7
+ id: "go.golangci-lint",
8
+ adapter: project.adapter,
9
+ project: project.path,
10
+ scope: files,
11
+ kind: "analysis",
12
+ parser: "golangci-json",
13
+ reason: "Run configured supported golangci-lint checks with native Go scope, unfiltered JSON evidence and fixes disabled.",
14
+ commands: [
15
+ goScopeCommand(project.path),
16
+ {
17
+ executable: process.execPath,
18
+ args: [
19
+ fileURLToPath(new URL("./golangci-runner.js", import.meta.url)),
20
+ source.root,
21
+ configs[0] ?? "",
22
+ ...files,
23
+ ],
24
+ cwd: project.path,
25
+ env: goEnvironment,
26
+ },
27
+ ],
28
+ };
29
+ if (configs.length !== 1)
30
+ check.unavailableReason =
31
+ "Exactly one project-local .golangci.yml, .yaml or .json is required.";
32
+ else if (!files.length)
33
+ check.unavailableReason = "No Go source was inventoried.";
34
+ return check;
35
+ }
@@ -0,0 +1,98 @@
1
+ import { z } from "zod";
2
+ export declare const guidanceTopicSchema: z.ZodEnum<{
3
+ "test-lifecycle": "test-lifecycle";
4
+ "analysis-scope": "analysis-scope";
5
+ "package-consumers": "package-consumers";
6
+ "python-imports": "python-imports";
7
+ "framework-assembly": "framework-assembly";
8
+ "execution-depth": "execution-depth";
9
+ }>;
10
+ export declare const guidanceContextSchema: z.ZodObject<{
11
+ schemaVersion: z.ZodLiteral<1>;
12
+ checks: z.ZodArray<z.ZodString>;
13
+ topics: z.ZodArray<z.ZodEnum<{
14
+ "test-lifecycle": "test-lifecycle";
15
+ "analysis-scope": "analysis-scope";
16
+ "package-consumers": "package-consumers";
17
+ "python-imports": "python-imports";
18
+ "framework-assembly": "framework-assembly";
19
+ "execution-depth": "execution-depth";
20
+ }>>;
21
+ }, z.core.$strict>;
22
+ export declare const guidanceReportSchema: z.ZodObject<{
23
+ context: z.ZodObject<{
24
+ schemaVersion: z.ZodLiteral<1>;
25
+ checks: z.ZodArray<z.ZodString>;
26
+ topics: z.ZodArray<z.ZodEnum<{
27
+ "test-lifecycle": "test-lifecycle";
28
+ "analysis-scope": "analysis-scope";
29
+ "package-consumers": "package-consumers";
30
+ "python-imports": "python-imports";
31
+ "framework-assembly": "framework-assembly";
32
+ "execution-depth": "execution-depth";
33
+ }>>;
34
+ }, z.core.$strict>;
35
+ items: z.ZodArray<z.ZodObject<{
36
+ id: z.ZodString;
37
+ version: z.ZodLiteral<"1.0.0">;
38
+ title: z.ZodString;
39
+ triggers: z.ZodObject<{
40
+ checks: z.ZodArray<z.ZodString>;
41
+ topics: z.ZodArray<z.ZodEnum<{
42
+ "test-lifecycle": "test-lifecycle";
43
+ "analysis-scope": "analysis-scope";
44
+ "package-consumers": "package-consumers";
45
+ "python-imports": "python-imports";
46
+ "framework-assembly": "framework-assembly";
47
+ "execution-depth": "execution-depth";
48
+ }>>;
49
+ }, z.core.$strict>;
50
+ questions: z.ZodArray<z.ZodString>;
51
+ references: z.ZodArray<z.ZodObject<{
52
+ title: z.ZodString;
53
+ url: z.ZodURL;
54
+ }, z.core.$strict>>;
55
+ matched: z.ZodObject<{
56
+ schemaVersion: z.ZodLiteral<1>;
57
+ checks: z.ZodArray<z.ZodString>;
58
+ topics: z.ZodArray<z.ZodEnum<{
59
+ "test-lifecycle": "test-lifecycle";
60
+ "analysis-scope": "analysis-scope";
61
+ "package-consumers": "package-consumers";
62
+ "python-imports": "python-imports";
63
+ "framework-assembly": "framework-assembly";
64
+ "execution-depth": "execution-depth";
65
+ }>>;
66
+ }, z.core.$strict>;
67
+ }, z.core.$strict>>;
68
+ schemaVersion: z.ZodLiteral<1>;
69
+ engineVersion: z.ZodString;
70
+ channel: z.ZodLiteral<"advisory">;
71
+ provenance: z.ZodLiteral<"builtin-guidance-selection">;
72
+ catalogueDigest: z.ZodString;
73
+ automatedCoverage: z.ZodLiteral<false>;
74
+ selectionBasis: z.ZodLiteral<"exact-check-or-topic">;
75
+ }, z.core.$strict>;
76
+ export declare const guidanceSummarySchema: z.ZodObject<{
77
+ items: z.ZodArray<z.ZodObject<{
78
+ id: z.ZodString;
79
+ version: z.ZodLiteral<"1.0.0">;
80
+ references: z.ZodArray<z.ZodObject<{
81
+ title: z.ZodString;
82
+ url: z.ZodURL;
83
+ }, z.core.$strict>>;
84
+ title: z.ZodString;
85
+ questions: z.ZodArray<z.ZodString>;
86
+ }, z.core.$strict>>;
87
+ schemaVersion: z.ZodLiteral<1>;
88
+ engineVersion: z.ZodString;
89
+ channel: z.ZodLiteral<"advisory">;
90
+ provenance: z.ZodLiteral<"builtin-guidance-selection">;
91
+ catalogueDigest: z.ZodString;
92
+ automatedCoverage: z.ZodLiteral<false>;
93
+ selectionBasis: z.ZodLiteral<"exact-check-or-topic">;
94
+ }, z.core.$strict>;
95
+ export type GuidanceContext = z.infer<typeof guidanceContextSchema>;
96
+ export type GuidanceReport = z.infer<typeof guidanceReportSchema>;
97
+ export declare function retrieveGuidance(input: unknown): GuidanceReport;
98
+ export declare function projectGuidance(report: GuidanceReport, detailed: boolean): Record<string, unknown>;
@@ -0,0 +1,247 @@
1
+ import { createHash } from "node:crypto";
2
+ import { z } from "zod";
3
+ import { VERSION } from "./types.js";
4
+ export const guidanceTopicSchema = z.enum([
5
+ "test-lifecycle",
6
+ "analysis-scope",
7
+ "package-consumers",
8
+ "python-imports",
9
+ "framework-assembly",
10
+ "execution-depth",
11
+ ]);
12
+ const identifier = z
13
+ .string()
14
+ .min(1)
15
+ .max(128)
16
+ .regex(/^[a-z0-9][a-z0-9.-]*$/);
17
+ const digest = z.string().regex(/^[a-f0-9]{64}$/);
18
+ export const guidanceContextSchema = z.strictObject({
19
+ schemaVersion: z.literal(1),
20
+ checks: z.array(identifier).max(100),
21
+ topics: z.array(guidanceTopicSchema).max(16),
22
+ });
23
+ const referenceSchema = z.strictObject({
24
+ title: z.string().min(1).max(160),
25
+ url: z
26
+ .url()
27
+ .regex(/^https:\/\//)
28
+ .max(512)
29
+ .meta({ format: "uri" }),
30
+ });
31
+ const itemSchema = z.strictObject({
32
+ id: identifier,
33
+ version: z.literal("1.0.0"),
34
+ title: z.string().min(1).max(160),
35
+ triggers: z.strictObject({
36
+ checks: z.array(identifier).max(32),
37
+ topics: z.array(guidanceTopicSchema).min(1).max(16),
38
+ }),
39
+ questions: z.array(z.string().min(1).max(600)).min(1).max(8),
40
+ references: z.array(referenceSchema).min(1).max(8),
41
+ });
42
+ const catalogue = z
43
+ .array(itemSchema)
44
+ .max(64)
45
+ .parse([
46
+ {
47
+ id: "review.test-lifecycle",
48
+ version: "1.0.0",
49
+ title: "Await asynchronous work and release test resources",
50
+ triggers: {
51
+ checks: ["javascript.node-test"],
52
+ topics: ["test-lifecycle"],
53
+ },
54
+ questions: [
55
+ "Does each asynchronous assertion finish before its test completes, including assertions inside subtests and callbacks?",
56
+ "Are timers, mocks and open handles released when an assertion throws, and does running the test alongside its siblings preserve the result?",
57
+ ],
58
+ references: [
59
+ {
60
+ title: "Node.js test runner",
61
+ url: "https://nodejs.org/api/test.html",
62
+ },
63
+ ],
64
+ },
65
+ {
66
+ id: "review.analysis-scope",
67
+ version: "1.0.0",
68
+ title: "Check the files selected by analysis configuration",
69
+ triggers: {
70
+ checks: ["javascript.eslint"],
71
+ topics: ["analysis-scope"],
72
+ },
73
+ questions: [
74
+ "Which source files does the resolved lint configuration select, and which files does it intentionally ignore?",
75
+ "Do changed file extensions and nested packages appear in the tool's observed scope, with any exclusions reviewed explicitly?",
76
+ ],
77
+ references: [
78
+ {
79
+ title: "ESLint ignore configuration",
80
+ url: "https://eslint.org/docs/latest/use/configure/ignore",
81
+ },
82
+ ],
83
+ },
84
+ {
85
+ id: "review.package-consumers",
86
+ version: "1.0.0",
87
+ title: "Exercise the package consumed after a build",
88
+ triggers: {
89
+ checks: ["javascript.typescript-build"],
90
+ topics: ["package-consumers"],
91
+ },
92
+ questions: [
93
+ "Does a consumer resolve the freshly built declarations and runtime entry points that will actually be distributed?",
94
+ "Would both the consumer type check and its runtime test detect a producer interface change, including a declaration that disagrees with emitted JavaScript?",
95
+ ],
96
+ references: [
97
+ {
98
+ title: "TypeScript project references",
99
+ url: "https://www.typescriptlang.org/docs/handbook/project-references.html",
100
+ },
101
+ ],
102
+ },
103
+ {
104
+ id: "review.python-imports",
105
+ version: "1.0.0",
106
+ title: "Establish which Python package tests import",
107
+ triggers: {
108
+ checks: ["python.pytest"],
109
+ topics: ["python-imports"],
110
+ },
111
+ questions: [
112
+ "Does the import mode exercise the intended installed package or source checkout, and is that choice recorded?",
113
+ "Can the distribution's public imports be exercised in a clean environment without relying on the working directory being on the import path?",
114
+ ],
115
+ references: [
116
+ {
117
+ title: "pytest integration practices",
118
+ url: "https://docs.pytest.org/en/stable/explanation/goodpractices.html",
119
+ },
120
+ ],
121
+ },
122
+ {
123
+ id: "review.framework-assembly",
124
+ version: "1.0.0",
125
+ title: "Compare the supported runtime assembly projection",
126
+ triggers: {
127
+ checks: [
128
+ "php.laravel-runtime",
129
+ "javascript.vue-router",
130
+ "javascript.nuxt-runtime",
131
+ "python.fastapi-routes",
132
+ "python.django-routes",
133
+ ],
134
+ topics: ["framework-assembly"],
135
+ },
136
+ questions: [
137
+ "Were both inventories captured after the required startup phase, using compatible collectors and the intended test environment?",
138
+ "Which registration, multiplicity or ordering changes are expected, and which application decisions need separate request-level tests beyond this collector's projection?",
139
+ ],
140
+ references: [
141
+ {
142
+ title: "Laravel routing",
143
+ url: "https://laravel.com/docs/13.x/routing",
144
+ },
145
+ ],
146
+ },
147
+ {
148
+ id: "review.execution-depth",
149
+ version: "1.0.0",
150
+ title: "Distinguish parsing and compilation from executed behavior",
151
+ triggers: {
152
+ checks: [
153
+ "php.syntax",
154
+ "ruby.syntax",
155
+ "swift.syntax",
156
+ "rust.cargo-check",
157
+ ],
158
+ topics: ["execution-depth"],
159
+ },
160
+ questions: [
161
+ "What does the selected native command establish: grammar, types, linking or executed tests?",
162
+ "Which behavioral assertions still need to run after parsing or compilation succeeds, and is unavailable test execution visible in the review?",
163
+ ],
164
+ references: [
165
+ {
166
+ title: "Cargo check command",
167
+ url: "https://doc.rust-lang.org/cargo/commands/cargo-check.html",
168
+ },
169
+ ],
170
+ },
171
+ ]);
172
+ const catalogueDigest = createHash("sha256")
173
+ .update(JSON.stringify(catalogue))
174
+ .digest("hex");
175
+ const metadata = {
176
+ schemaVersion: z.literal(1),
177
+ engineVersion: z.string(),
178
+ channel: z.literal("advisory"),
179
+ provenance: z.literal("builtin-guidance-selection"),
180
+ catalogueDigest: digest,
181
+ automatedCoverage: z.literal(false),
182
+ selectionBasis: z.literal("exact-check-or-topic"),
183
+ };
184
+ export const guidanceReportSchema = z.strictObject({
185
+ ...metadata,
186
+ context: guidanceContextSchema,
187
+ items: z.array(itemSchema.extend({ matched: guidanceContextSchema })).max(64),
188
+ });
189
+ export const guidanceSummarySchema = z.strictObject({
190
+ ...metadata,
191
+ items: z.array(itemSchema.omit({ triggers: true })).max(64),
192
+ });
193
+ export function retrieveGuidance(input) {
194
+ const serialized = JSON.stringify(input);
195
+ if (serialized === undefined || Buffer.byteLength(serialized) > 16_384)
196
+ throw new Error("Guidance context exceeds input limits");
197
+ const context = guidanceContextSchema.parse(input);
198
+ for (const values of [context.checks, context.topics])
199
+ if (new Set(values).size !== values.length)
200
+ throw new Error("Guidance context identifiers must be unique");
201
+ context.checks.sort();
202
+ context.topics.sort();
203
+ const checks = new Set(context.checks);
204
+ const topics = new Set(context.topics);
205
+ const items = catalogue.flatMap((item) => {
206
+ const matched = {
207
+ schemaVersion: 1,
208
+ checks: item.triggers.checks.filter((check) => checks.has(check)),
209
+ topics: item.triggers.topics.filter((topic) => topics.has(topic)),
210
+ };
211
+ return matched.checks.length || matched.topics.length
212
+ ? [{ ...item, matched }]
213
+ : [];
214
+ });
215
+ return guidanceReportSchema.parse({
216
+ schemaVersion: 1,
217
+ engineVersion: VERSION,
218
+ channel: "advisory",
219
+ provenance: "builtin-guidance-selection",
220
+ catalogueDigest,
221
+ automatedCoverage: false,
222
+ selectionBasis: "exact-check-or-topic",
223
+ context,
224
+ items,
225
+ });
226
+ }
227
+ export function projectGuidance(report, detailed) {
228
+ const parsed = guidanceReportSchema.parse(report);
229
+ if (detailed)
230
+ return parsed;
231
+ return guidanceSummarySchema.parse({
232
+ schemaVersion: parsed.schemaVersion,
233
+ engineVersion: parsed.engineVersion,
234
+ channel: parsed.channel,
235
+ provenance: parsed.provenance,
236
+ catalogueDigest: parsed.catalogueDigest,
237
+ automatedCoverage: parsed.automatedCoverage,
238
+ selectionBasis: parsed.selectionBasis,
239
+ items: parsed.items.map((item) => ({
240
+ id: item.id,
241
+ version: item.version,
242
+ title: item.title,
243
+ questions: item.questions,
244
+ references: item.references,
245
+ })),
246
+ });
247
+ }
@@ -0,0 +1,31 @@
1
+ export { createPlan, validate, aggregate } from "./engine.js";
2
+ export { validateContracts } from "./contracts.js";
3
+ export type { ContractBundle, ContractReport } from "./contract-schema.js";
4
+ export type { PlanOptions, ValidationOptions } from "./engine.js";
5
+ export { adapters } from "./adapters.js";
6
+ export type { PolicyPack, PackReference } from "./policy-pack.js";
7
+ export { fetchPolicyPack } from "./fetch-pack.js";
8
+ export type { FetchPackOptions, FetchedPack } from "./fetch-pack.js";
9
+ export { projectPlan, projectReport } from "./output.js";
10
+ export type { Plan, Report, Check, CheckResult, Status, Outcome, TestEvidence, ToolSpec, ToolEvidence, Finding, Workspace, GitIdentity, ChangeSelection, } from "./types.js";
11
+ export { importJUnit } from "./junit.js";
12
+ export type { JUnitImport, JUnitCase } from "./junit.js";
13
+ export { exportSarif } from "./sarif.js";
14
+ export { createFindingBaseline, compareFindings } from "./finding-policy.js";
15
+ export { compareRuntimeInventories } from "./runtime-inventory.js";
16
+ export type { RuntimeInventory, RuntimeComparison, } from "./runtime-inventory.js";
17
+ export type { FindingBaseline, FindingComparison, } from "./finding-policy-schema.js";
18
+ export { checkArchitecture } from "./architecture.js";
19
+ export type { DependencyGraph, ArchitecturePolicy, ArchitectureReport, } from "./architecture.js";
20
+ export { retrieveGuidance, projectGuidance } from "./guidance.js";
21
+ export type { GuidanceContext, GuidanceReport } from "./guidance.js";
22
+ export { runMutations, projectMutations } from "./mutation.js";
23
+ export type { MutationRecipe, MutationReport } from "./mutation.js";
24
+ export { loadExternalAdapters } from "./external-adapter.js";
25
+ export type { ExternalReference, ExternalIdentity, } from "./external-adapter.js";
26
+ export { createReviewContext, projectReviewContext, receiveReview, projectReviewReceipt, } from "./review.js";
27
+ export type { ReviewContext, ReviewAssessment, ReviewReceipt, } from "./review.js";
28
+ export { openTaskStore } from "./task-store.js";
29
+ export type { ValidationTaskStore, StoredValidationTask, TaskStoreOptions, TaskTransition, } from "./task-store.js";
30
+ export { openValidationTasks } from "./validation-tasks.js";
31
+ export type { ValidationTasks, ValidationTasksOptions, } from "./validation-tasks.js";
@@ -0,0 +1,16 @@
1
+ export { createPlan, validate, aggregate } from "./engine.js";
2
+ export { validateContracts } from "./contracts.js";
3
+ export { adapters } from "./adapters.js";
4
+ export { fetchPolicyPack } from "./fetch-pack.js";
5
+ export { projectPlan, projectReport } from "./output.js";
6
+ export { importJUnit } from "./junit.js";
7
+ export { exportSarif } from "./sarif.js";
8
+ export { createFindingBaseline, compareFindings } from "./finding-policy.js";
9
+ export { compareRuntimeInventories } from "./runtime-inventory.js";
10
+ export { checkArchitecture } from "./architecture.js";
11
+ export { retrieveGuidance, projectGuidance } from "./guidance.js";
12
+ export { runMutations, projectMutations } from "./mutation.js";
13
+ export { loadExternalAdapters } from "./external-adapter.js";
14
+ export { createReviewContext, projectReviewContext, receiveReview, projectReviewReceipt, } from "./review.js";
15
+ export { openTaskStore } from "./task-store.js";
16
+ export { openValidationTasks } from "./validation-tasks.js";
@@ -0,0 +1,4 @@
1
+ import type { Inventory } from "./types.js";
2
+ export declare function withinRoot(root: string, relative: string): Promise<string>;
3
+ export declare function readProjectFile(root: string, relative: string): Promise<string>;
4
+ export declare function inventory(inputRoot: string): Promise<Inventory>;