@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,157 @@
1
+ import type { ExternalIdentity } from "./external-adapter.js";
2
+ import type { RuntimeInventory } from "./runtime-inventory.js";
3
+ export declare const VERSION = "0.1.0-alpha.1";
4
+ export declare const PARSERS: readonly ["vue-router-json", "nuxt-json", "exit", "empty", "node-events", "unittest", "go-scope-test", "go-scope-analysis", "golangci-json", "staticcheck-json", "go-json", "typescript-build-json", "tsc-files", "eslint-json", "vitest-json", "playwright-json", "jest-json", "pytest-json", "fastapi-json", "django-json", "laravel-json", "rust-json", "clang-json", "java-json", "dotnet-json", "actionlint-json", "external-json", "ruby-syntax", "silent-syntax", "ruff-json", "mypy-json", "phpstan-json", "phpunit-junit", "pint-json"];
5
+ export type Status = "passed" | "failed" | "unavailable" | "skipped" | "error" | "inconclusive";
6
+ export type Outcome = "passed" | "failed" | "incomplete";
7
+ export interface Inventory {
8
+ root: string;
9
+ files: string[];
10
+ excluded: string[];
11
+ fingerprint: string;
12
+ }
13
+ export interface Project {
14
+ path: string;
15
+ adapter: string;
16
+ markers: string[];
17
+ files: string[];
18
+ }
19
+ export interface Command {
20
+ temporaryDirectory?: boolean;
21
+ executable: string;
22
+ args: string[];
23
+ cwd: string;
24
+ env?: Record<string, string>;
25
+ }
26
+ export type ToolSpec = {
27
+ name: "node";
28
+ source: "engine-runtime";
29
+ } | {
30
+ name: string;
31
+ source: "package-metadata";
32
+ path: string | null;
33
+ } | {
34
+ name: string;
35
+ source: "version-command";
36
+ command: Command;
37
+ };
38
+ export interface ToolEvidence {
39
+ name: string;
40
+ source: ToolSpec["source"];
41
+ version: string | null;
42
+ status: "identified" | "unavailable" | "inconclusive";
43
+ process?: ProcessResult;
44
+ path?: string;
45
+ }
46
+ export interface Check {
47
+ external?: ExternalIdentity;
48
+ id: string;
49
+ adapter: string;
50
+ project: string;
51
+ scope: string[];
52
+ kind: "format" | "analysis" | "test" | "syntax" | "unsupported";
53
+ parser: (typeof PARSERS)[number];
54
+ commands: Command[];
55
+ reason: string;
56
+ unavailableReason?: string;
57
+ tools?: ToolSpec[];
58
+ environment?: string[];
59
+ }
60
+ export interface Workspace {
61
+ complete: boolean;
62
+ dependencies: {
63
+ consumer: string;
64
+ producer: string;
65
+ }[];
66
+ }
67
+ export interface GitIdentity {
68
+ baseCommit: string;
69
+ headCommit: string;
70
+ version: string;
71
+ worktreeId: string;
72
+ indexFingerprint: string;
73
+ }
74
+ export interface ChangeSelection {
75
+ mode: "full" | "affected";
76
+ reason: string;
77
+ changedFiles: string[];
78
+ selectedProjects: string[];
79
+ git?: GitIdentity;
80
+ }
81
+ export interface Plan {
82
+ schemaVersion: 1;
83
+ engineVersion: string;
84
+ sourceFingerprint: string;
85
+ policyFingerprint: string;
86
+ excluded: string[];
87
+ projects: Project[];
88
+ checks: Check[];
89
+ workspace?: Workspace;
90
+ selection?: ChangeSelection;
91
+ }
92
+ export interface ProcessResult {
93
+ command: Command;
94
+ exitCode: number | null;
95
+ signal: string | null;
96
+ stdout: string;
97
+ stderr: string;
98
+ durationMs: number;
99
+ timedOut: boolean;
100
+ cancelled: boolean;
101
+ truncated: boolean;
102
+ errorCode?: string;
103
+ }
104
+ export interface TestEvidence {
105
+ total: number;
106
+ passed: number;
107
+ failed: number;
108
+ skipped: number;
109
+ }
110
+ export interface Finding {
111
+ ruleId: string;
112
+ level: "error" | "warning" | "note";
113
+ message: string;
114
+ file?: string;
115
+ line?: number;
116
+ }
117
+ export interface CheckResult {
118
+ external?: ExternalIdentity & {
119
+ tools?: {
120
+ name: string;
121
+ version: string;
122
+ source: "adapter-reported";
123
+ }[];
124
+ };
125
+ runtime?: RuntimeInventory;
126
+ id: string;
127
+ adapter: string;
128
+ project: string;
129
+ scope: string[];
130
+ status: Status;
131
+ reason: string;
132
+ processes: ProcessResult[];
133
+ tests?: TestEvidence;
134
+ findings?: Finding[];
135
+ findingsComplete?: boolean;
136
+ environment?: {
137
+ names: string[];
138
+ fingerprint: string;
139
+ };
140
+ tools?: ToolEvidence[];
141
+ }
142
+ export interface Report {
143
+ selection?: ChangeSelection;
144
+ schemaVersion: 1;
145
+ engineVersion: string;
146
+ runId: string;
147
+ startedAt: string;
148
+ durationMs: number;
149
+ sourceFingerprint: string;
150
+ finalSourceFingerprint: string | null;
151
+ policyFingerprint: string;
152
+ sourceChanged: boolean;
153
+ sourceError: boolean;
154
+ excluded: string[];
155
+ outcome: Outcome;
156
+ checks: CheckResult[];
157
+ }
@@ -0,0 +1,37 @@
1
+ export const VERSION = "0.1.0-alpha.1";
2
+ export const PARSERS = [
3
+ "vue-router-json",
4
+ "nuxt-json",
5
+ "exit",
6
+ "empty",
7
+ "node-events",
8
+ "unittest",
9
+ "go-scope-test",
10
+ "go-scope-analysis",
11
+ "golangci-json",
12
+ "staticcheck-json",
13
+ "go-json",
14
+ "typescript-build-json",
15
+ "tsc-files",
16
+ "eslint-json",
17
+ "vitest-json",
18
+ "playwright-json",
19
+ "jest-json",
20
+ "pytest-json",
21
+ "fastapi-json",
22
+ "django-json",
23
+ "laravel-json",
24
+ "rust-json",
25
+ "clang-json",
26
+ "java-json",
27
+ "dotnet-json",
28
+ "actionlint-json",
29
+ "external-json",
30
+ "ruby-syntax",
31
+ "silent-syntax",
32
+ "ruff-json",
33
+ "mypy-json",
34
+ "phpstan-json",
35
+ "phpunit-junit",
36
+ "pint-json",
37
+ ];
@@ -0,0 +1,2 @@
1
+ import type { Check, CheckResult, ProcessResult } from "./types.js";
2
+ export declare function typescriptBuildEvidence(check: Check, processes: ProcessResult[], root: string | undefined): Pick<CheckResult, "status" | "reason" | "findings" | "findingsComplete">;
@@ -0,0 +1,86 @@
1
+ import path from "node:path";
2
+ import { z } from "zod";
3
+ const schema = z.object({
4
+ version: z.literal(1),
5
+ exitStatus: z.number().int().nonnegative(),
6
+ programs: z.number().int().nonnegative(),
7
+ configs: z.array(z.string()),
8
+ files: z.array(z.string()),
9
+ diagnostics: z.array(z.object({
10
+ code: z.number().int(),
11
+ message: z.string(),
12
+ file: z.string().optional(),
13
+ line: z.number().int().positive().optional(),
14
+ })),
15
+ });
16
+ export function typescriptBuildEvidence(check, processes, root) {
17
+ const incomplete = {
18
+ status: "inconclusive",
19
+ reason: "TypeScript solution evidence is incomplete or omits inventoried source.",
20
+ };
21
+ if (!root || processes.length !== 1 || !check.scope.length)
22
+ return incomplete;
23
+ const process = processes[0];
24
+ if (![0, 1].includes(process.exitCode ?? -1))
25
+ return {
26
+ status: "error",
27
+ reason: "TypeScript solution configuration or its supported integration could not run.",
28
+ };
29
+ try {
30
+ const report = schema.parse(JSON.parse(process.stdout));
31
+ const inside = (file) => {
32
+ const relative = path.relative(root, file);
33
+ return (path.isAbsolute(file) &&
34
+ relative !== ".." &&
35
+ !relative.startsWith(".." + path.sep) &&
36
+ !path.isAbsolute(relative));
37
+ };
38
+ if ([...report.files, ...report.configs].some((file) => !inside(file)) ||
39
+ new Set(report.files).size !== report.files.length ||
40
+ new Set(report.configs).size !== report.configs.length)
41
+ return incomplete;
42
+ if (report.diagnostics.some((diagnostic) => diagnostic.file && !inside(diagnostic.file)))
43
+ return incomplete;
44
+ const findings = report.diagnostics.map((diagnostic) => ({
45
+ ruleId: "TS" + diagnostic.code,
46
+ level: "error",
47
+ message: diagnostic.message,
48
+ ...(diagnostic.file
49
+ ? {
50
+ file: path
51
+ .relative(root, diagnostic.file)
52
+ .split(path.sep)
53
+ .join("/"),
54
+ }
55
+ : {}),
56
+ ...(diagnostic.line ? { line: diagnostic.line } : {}),
57
+ }));
58
+ if (findings.length || report.exitStatus !== 0 || process.exitCode !== 0)
59
+ return {
60
+ status: "failed",
61
+ reason: "TypeScript solution reported compiler or configuration diagnostics.",
62
+ findings,
63
+ findingsComplete: report.programs > 0 &&
64
+ report.configs.length > 0 &&
65
+ !process.stderr.trim() &&
66
+ check.scope.every((file) => report.files.includes(path.resolve(root, check.project, file))) &&
67
+ process.exitCode === 1 &&
68
+ report.diagnostics.length > 0 &&
69
+ report.diagnostics.every((diagnostic) => diagnostic.file && diagnostic.code >= 2000),
70
+ };
71
+ if (!report.programs ||
72
+ !report.configs.length ||
73
+ process.stderr.trim() ||
74
+ check.scope.some((file) => !report.files.includes(path.resolve(root, check.project, file))))
75
+ return incomplete;
76
+ return {
77
+ status: "passed",
78
+ reason: "TypeScript checked the inventoried solution source using fresh in-memory build outputs.",
79
+ findings,
80
+ findingsComplete: true,
81
+ };
82
+ }
83
+ catch {
84
+ return incomplete;
85
+ }
86
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,132 @@
1
+ import { createRequire } from "node:module";
2
+ import { realpathSync } from "node:fs";
3
+ import path from "node:path";
4
+ import { withinRoot } from "./inventory.js";
5
+ async function main() {
6
+ const [entry, root] = process.argv.slice(2);
7
+ if (!entry || !root)
8
+ throw new Error("Invalid TypeScript solution arguments");
9
+ const tool = await withinRoot(root, path.relative(root, entry));
10
+ const ts = createRequire(tool)(tool);
11
+ if (ts.version !== "6.0.3")
12
+ throw new Error("TypeScript solution integration requires verified version 6.0.3");
13
+ const normalize = (file) => path.resolve(file);
14
+ const inside = (file) => {
15
+ const relative = path.relative(root, normalize(file));
16
+ return (relative !== ".." &&
17
+ !relative.startsWith(".." + path.sep) &&
18
+ !path.isAbsolute(relative));
19
+ };
20
+ const readable = (file) => {
21
+ try {
22
+ return inside(file) && inside(realpathSync(file));
23
+ }
24
+ catch {
25
+ return false;
26
+ }
27
+ };
28
+ const memory = new Map();
29
+ const directories = new Set();
30
+ let bytes = 0;
31
+ const system = {
32
+ ...ts.sys,
33
+ fileExists: (file) => memory.has(normalize(file)) ||
34
+ (!file.endsWith(".tsbuildinfo") &&
35
+ readable(file) &&
36
+ ts.sys.fileExists(file)),
37
+ readFile: (file) => memory.get(normalize(file)) ??
38
+ (!file.endsWith(".tsbuildinfo") && readable(file)
39
+ ? ts.sys.readFile(file)
40
+ : undefined),
41
+ directoryExists: (directory) => directories.has(normalize(directory)) ||
42
+ (readable(directory) && ts.sys.directoryExists(directory)),
43
+ getDirectories: (directory) => readable(directory) ? ts.sys.getDirectories(directory) : [],
44
+ readDirectory: (directory, ...args) => readable(directory)
45
+ ? ts.sys.readDirectory(directory, ...args).filter(readable)
46
+ : [],
47
+ writeFile: (file, text) => {
48
+ const target = normalize(file);
49
+ if (!inside(target))
50
+ throw new Error("TypeScript output escapes the configured root");
51
+ bytes +=
52
+ Buffer.byteLength(text) - Buffer.byteLength(memory.get(target) ?? "");
53
+ if (bytes > 64 * 1024 * 1024 || memory.size >= 20_000)
54
+ throw new Error("TypeScript in-memory output limit exceeded");
55
+ memory.set(target, text);
56
+ let directory = path.dirname(target);
57
+ while (inside(directory)) {
58
+ directories.add(directory);
59
+ if (directory === root)
60
+ break;
61
+ directory = path.dirname(directory);
62
+ }
63
+ },
64
+ createDirectory: (directory) => {
65
+ if (!inside(directory))
66
+ throw new Error("TypeScript output escapes the configured root");
67
+ directories.add(normalize(directory));
68
+ },
69
+ getModifiedTime: (file) => memory.has(normalize(file))
70
+ ? new Date()
71
+ : file.endsWith(".tsbuildinfo")
72
+ ? undefined
73
+ : readable(file)
74
+ ? ts.sys.getModifiedTime?.(file)
75
+ : undefined,
76
+ setModifiedTime: () => { },
77
+ deleteFile: (file) => {
78
+ memory.delete(normalize(file));
79
+ },
80
+ };
81
+ const diagnostics = [];
82
+ const configs = new Set();
83
+ const files = new Set();
84
+ let programs = 0;
85
+ const host = ts.createSolutionBuilderHost(system, undefined, (diagnostic) => diagnostics.push(diagnostic));
86
+ host.getParsedCommandLine = (file) => {
87
+ if (!readable(file))
88
+ throw new Error("TypeScript referenced configuration is missing or outside the configured root");
89
+ configs.add(normalize(file));
90
+ return ts.getParsedCommandLineOfConfigFile(file, { noCheck: false, noEmit: false, noEmitOnError: true, incremental: true }, {
91
+ ...system,
92
+ onUnRecoverableConfigFileDiagnostic: (diagnostic) => diagnostics.push(diagnostic),
93
+ });
94
+ };
95
+ host.afterProgramEmitAndDiagnostics = (program) => {
96
+ programs++;
97
+ for (const file of program.getSourceFiles())
98
+ files.add(normalize(file.fileName));
99
+ };
100
+ const exitStatus = ts
101
+ .createSolutionBuilder(host, [path.resolve("tsconfig.json")], {
102
+ force: true,
103
+ })
104
+ .build();
105
+ process.stdout.write(JSON.stringify({
106
+ version: 1,
107
+ exitStatus,
108
+ programs,
109
+ configs: [...configs].sort(),
110
+ files: [...files].sort(),
111
+ diagnostics: diagnostics.map((diagnostic) => ({
112
+ code: diagnostic.code,
113
+ message: ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n"),
114
+ ...(diagnostic.file
115
+ ? {
116
+ file: normalize(diagnostic.file.fileName),
117
+ ...(diagnostic.start === undefined
118
+ ? {}
119
+ : {
120
+ line: diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start).line + 1,
121
+ }),
122
+ }
123
+ : {}),
124
+ })),
125
+ }) + "\n");
126
+ process.exitCode = exitStatus === 0 && !diagnostics.length ? 0 : 1;
127
+ }
128
+ main().catch((error) => {
129
+ process.stderr.write((error instanceof Error ? error.message : "TypeScript solution failed") +
130
+ "\n");
131
+ process.exitCode = 2;
132
+ });
@@ -0,0 +1,2 @@
1
+ import type { Check, Inventory, Project } from "./types.js";
2
+ export declare function typescriptBuildCheck(source: Inventory, project: Project): Promise<Check>;
@@ -0,0 +1,41 @@
1
+ import path from "node:path";
2
+ import { fileURLToPath } from "node:url";
3
+ import { localTool } from "./local-tool.js";
4
+ export async function typescriptBuildCheck(source, project) {
5
+ const files = source.files
6
+ .filter((file) => (project.path === "." || file.startsWith(project.path + "/")) &&
7
+ /\.(?:[cm]?ts|tsx)$/.test(file))
8
+ .map((file) => path.posix.relative(project.path, file));
9
+ const tool = await localTool(source.root, project.path, "typescript/lib/typescript.js");
10
+ const check = {
11
+ id: "javascript.typescript-build",
12
+ adapter: project.adapter,
13
+ project: project.path,
14
+ scope: files,
15
+ kind: "analysis",
16
+ parser: "typescript-build-json",
17
+ reason: "Type-check the complete TypeScript solution with fresh in-memory declaration outputs and native source accounting.",
18
+ commands: tool
19
+ ? [
20
+ {
21
+ executable: process.execPath,
22
+ args: [
23
+ fileURLToPath(new URL("./typescript-build-runner.js", import.meta.url)),
24
+ tool,
25
+ source.root,
26
+ ],
27
+ cwd: project.path,
28
+ },
29
+ ]
30
+ : [],
31
+ };
32
+ if (!project.files.includes("tsconfig.json"))
33
+ check.unavailableReason = "A project-local tsconfig.json is required.";
34
+ else if (!files.length)
35
+ check.unavailableReason =
36
+ "No TypeScript source was inventoried under the solution root.";
37
+ else if (!tool)
38
+ check.unavailableReason =
39
+ "TypeScript is not installed within the configured root.";
40
+ return check;
41
+ }
@@ -0,0 +1,2 @@
1
+ import type { Check, Inventory, Project } from "./types.js";
2
+ export declare function typescriptCheck(source: Inventory, project: Project, vue?: boolean): Promise<Check>;
@@ -0,0 +1,54 @@
1
+ import { fileURLToPath } from "node:url";
2
+ import { localTool } from "./local-tool.js";
3
+ export async function typescriptCheck(source, project, vue = false) {
4
+ const files = project.files.filter((file) => /\.(?:[cm]?ts|tsx)$/.test(file) || (vue && file.endsWith(".vue")));
5
+ const compiler = await localTool(source.root, project.path, vue ? "vue-tsc/index.js" : "typescript/bin/tsc");
6
+ const check = {
7
+ id: vue ? "javascript.vue-tsc" : "javascript.typescript",
8
+ adapter: project.adapter,
9
+ project: project.path,
10
+ scope: files,
11
+ kind: "analysis",
12
+ parser: "tsc-files",
13
+ reason: "Type-check tsconfig.json without emitting code or incremental state; require every inventoried TypeScript file in the compiler file list.",
14
+ commands: compiler
15
+ ? [
16
+ {
17
+ executable: process.execPath,
18
+ args: [
19
+ ...(vue
20
+ ? [
21
+ fileURLToPath(new URL("./vue-tsc-runner.js", import.meta.url)),
22
+ compiler,
23
+ source.root,
24
+ ]
25
+ : [compiler]),
26
+ "--project",
27
+ "./tsconfig.json",
28
+ "--noEmit",
29
+ "--noCheck",
30
+ "false",
31
+ "--pretty",
32
+ "false",
33
+ "--incremental",
34
+ "false",
35
+ "--listFiles",
36
+ ],
37
+ cwd: project.path,
38
+ },
39
+ ]
40
+ : [],
41
+ };
42
+ if (!project.files.includes("tsconfig.json"))
43
+ check.unavailableReason = "A project-local tsconfig.json is required.";
44
+ else if (!files.length)
45
+ check.unavailableReason =
46
+ "No supported TypeScript or Vue source files were inventoried.";
47
+ else if (files.some((file) => /[\r\n]/.test(file)))
48
+ check.unavailableReason =
49
+ "The compiler file-list format cannot account for filenames containing newlines.";
50
+ else if (!compiler)
51
+ check.unavailableReason =
52
+ "The selected compiler is not installed within the configured root.";
53
+ return check;
54
+ }
@@ -0,0 +1 @@
1
+ export {};