@zxyycom/vibe-check 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (950) hide show
  1. package/README.md +47 -74
  2. package/dist/esm/cache/cache-json-by-key.mjs +189 -0
  3. package/dist/esm/cache/cache-json-by-key.mjs.map +1 -0
  4. package/dist/esm/check/check.mjs.map +1 -1
  5. package/dist/esm/check/finding-presentation.mjs +40 -0
  6. package/dist/esm/check/finding-presentation.mjs.map +1 -0
  7. package/dist/esm/check/inherited-collection.mjs +1 -1
  8. package/dist/esm/check/inherited-collection.mjs.map +1 -1
  9. package/dist/esm/check-settlement/fact-validation.mjs +17 -23
  10. package/dist/esm/check-settlement/fact-validation.mjs.map +1 -1
  11. package/dist/esm/check-settlement/outcome-normalization.mjs +9 -19
  12. package/dist/esm/check-settlement/outcome-normalization.mjs.map +1 -1
  13. package/dist/esm/check-settlement/reason-shape.mjs +12 -0
  14. package/dist/esm/check-settlement/reason-shape.mjs.map +1 -0
  15. package/dist/esm/check-settlement/record-store.mjs +14 -17
  16. package/dist/esm/check-settlement/record-store.mjs.map +1 -1
  17. package/dist/esm/check-settlement/session.mjs +8 -2
  18. package/dist/esm/check-settlement/session.mjs.map +1 -1
  19. package/dist/esm/data-boundary/closed-values.mjs +16 -0
  20. package/dist/esm/data-boundary/closed-values.mjs.map +1 -1
  21. package/dist/esm/data-boundary/value-shapes.mjs +9 -0
  22. package/dist/esm/data-boundary/value-shapes.mjs.map +1 -1
  23. package/dist/esm/index.mjs +9 -2
  24. package/dist/esm/index.mjs.map +1 -1
  25. package/dist/esm/learned-critical-path/duration-model/bounded-history.mjs +56 -0
  26. package/dist/esm/learned-critical-path/duration-model/bounded-history.mjs.map +1 -0
  27. package/dist/esm/learned-critical-path/duration-model/prediction.mjs +122 -0
  28. package/dist/esm/learned-critical-path/duration-model/prediction.mjs.map +1 -0
  29. package/dist/esm/learned-critical-path/duration-model/preparation.mjs +41 -0
  30. package/dist/esm/learned-critical-path/duration-model/preparation.mjs.map +1 -0
  31. package/dist/esm/learned-critical-path/duration-model/recording.mjs +109 -0
  32. package/dist/esm/learned-critical-path/duration-model/recording.mjs.map +1 -0
  33. package/dist/esm/learned-critical-path/duration-model/storage.mjs +187 -0
  34. package/dist/esm/learned-critical-path/duration-model/storage.mjs.map +1 -0
  35. package/dist/esm/learned-critical-path/selection-layers.mjs +28 -0
  36. package/dist/esm/learned-critical-path/selection-layers.mjs.map +1 -0
  37. package/dist/esm/learned-critical-path/static-decision.mjs +55 -0
  38. package/dist/esm/learned-critical-path/static-decision.mjs.map +1 -0
  39. package/dist/esm/learned-critical-path/strategy.mjs +179 -0
  40. package/dist/esm/learned-critical-path/strategy.mjs.map +1 -0
  41. package/dist/esm/machine-output/v4/atomic-publication.mjs +1 -15
  42. package/dist/esm/machine-output/v4/atomic-publication.mjs.map +1 -1
  43. package/dist/esm/package-checks/code-quality-findings/finding-waiver-authoring.mjs +40 -0
  44. package/dist/esm/package-checks/code-quality-findings/finding-waiver-authoring.mjs.map +1 -0
  45. package/dist/esm/package-checks/code-quality-findings/finding-waiver-evidence.mjs +48 -0
  46. package/dist/esm/package-checks/code-quality-findings/finding-waiver-evidence.mjs.map +1 -0
  47. package/dist/esm/package-checks/code-quality-findings/policy.mjs +20 -0
  48. package/dist/esm/package-checks/code-quality-findings/policy.mjs.map +1 -1
  49. package/dist/esm/package-checks/duplicate-detection/area-policy.mjs +15 -7
  50. package/dist/esm/package-checks/duplicate-detection/area-policy.mjs.map +1 -1
  51. package/dist/esm/package-checks/duplicate-detection/cache/identity.mjs +1 -1
  52. package/dist/esm/package-checks/duplicate-detection/cache/identity.mjs.map +1 -1
  53. package/dist/esm/package-checks/duplicate-detection/default-check.mjs +1 -1
  54. package/dist/esm/package-checks/duplicate-detection/default-check.mjs.map +1 -1
  55. package/dist/esm/package-checks/duplicate-detection/execution.mjs +44 -18
  56. package/dist/esm/package-checks/duplicate-detection/execution.mjs.map +1 -1
  57. package/dist/esm/package-checks/duplicate-detection/finding-messages.mjs +59 -0
  58. package/dist/esm/package-checks/duplicate-detection/finding-messages.mjs.map +1 -0
  59. package/dist/esm/package-checks/duplicate-detection/finding-waiver-identity.mjs +55 -0
  60. package/dist/esm/package-checks/duplicate-detection/finding-waiver-identity.mjs.map +1 -0
  61. package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs +1 -1
  62. package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs.map +1 -1
  63. package/dist/esm/package-checks/duplicate-detection/jscpd/command-resolution.mjs +1 -1
  64. package/dist/esm/package-checks/duplicate-detection/jscpd/command-resolution.mjs.map +1 -1
  65. package/dist/esm/package-checks/duplicate-detection/jscpd/json-report.mjs +15 -5
  66. package/dist/esm/package-checks/duplicate-detection/jscpd/json-report.mjs.map +1 -1
  67. package/dist/esm/package-checks/duplicate-detection/jscpd/scanner.mjs +5 -4
  68. package/dist/esm/package-checks/duplicate-detection/jscpd/scanner.mjs.map +1 -1
  69. package/dist/esm/package-checks/duplicate-detection/options-resolution.mjs +22 -47
  70. package/dist/esm/package-checks/duplicate-detection/options-resolution.mjs.map +1 -1
  71. package/dist/esm/package-checks/duplicate-detection/options-validation.mjs +20 -25
  72. package/dist/esm/package-checks/duplicate-detection/options-validation.mjs.map +1 -1
  73. package/dist/esm/package-checks/duplicate-detection/options.mjs.map +1 -1
  74. package/dist/esm/package-checks/duplicate-detection/records.mjs +27 -6
  75. package/dist/esm/package-checks/duplicate-detection/records.mjs.map +1 -1
  76. package/dist/esm/package-checks/file-metrics/execution.mjs +10 -17
  77. package/dist/esm/package-checks/file-metrics/execution.mjs.map +1 -1
  78. package/dist/esm/package-checks/file-metrics/finding-messages.mjs +22 -0
  79. package/dist/esm/package-checks/file-metrics/finding-messages.mjs.map +1 -0
  80. package/dist/esm/package-checks/file-metrics/options-resolution.mjs +11 -43
  81. package/dist/esm/package-checks/file-metrics/options-resolution.mjs.map +1 -1
  82. package/dist/esm/package-checks/file-metrics/options-validation.mjs +15 -25
  83. package/dist/esm/package-checks/file-metrics/options-validation.mjs.map +1 -1
  84. package/dist/esm/package-checks/file-metrics/records.mjs +2 -9
  85. package/dist/esm/package-checks/file-metrics/records.mjs.map +1 -1
  86. package/dist/esm/package-checks/file-metrics/scc/availability.mjs +1 -1
  87. package/dist/esm/package-checks/file-metrics/scc/availability.mjs.map +1 -1
  88. package/dist/esm/package-checks/file-metrics/scc/parser.mjs +4 -4
  89. package/dist/esm/package-checks/file-metrics/scc/parser.mjs.map +1 -1
  90. package/dist/esm/package-checks/file-metrics/scc/scanner.mjs +2 -2
  91. package/dist/esm/package-checks/file-metrics/scc/scanner.mjs.map +1 -1
  92. package/dist/esm/package-checks/function-metrics/analysis.mjs +56 -15
  93. package/dist/esm/package-checks/function-metrics/analysis.mjs.map +1 -1
  94. package/dist/esm/package-checks/function-metrics/analyzer/analysis-context.mjs +550 -0
  95. package/dist/esm/package-checks/function-metrics/analyzer/analysis-context.mjs.map +1 -0
  96. package/dist/esm/package-checks/function-metrics/analyzer/analysis-model.mjs +332 -0
  97. package/dist/esm/package-checks/function-metrics/analyzer/analysis-model.mjs.map +1 -0
  98. package/dist/esm/package-checks/function-metrics/analyzer/contracts.mjs +7 -0
  99. package/dist/esm/package-checks/function-metrics/analyzer/contracts.mjs.map +1 -0
  100. package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.mjs +24 -0
  101. package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.mjs.map +1 -0
  102. package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardnd.mjs +113 -0
  103. package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardnd.mjs.map +1 -0
  104. package/dist/esm/package-checks/function-metrics/analyzer/extensions/protocol.mjs +180 -0
  105. package/dist/esm/package-checks/function-metrics/analyzer/extensions/protocol.mjs.map +1 -0
  106. package/dist/esm/package-checks/function-metrics/analyzer/extensions/registry.mjs +121 -0
  107. package/dist/esm/package-checks/function-metrics/analyzer/extensions/registry.mjs.map +1 -0
  108. package/dist/esm/package-checks/function-metrics/analyzer/pipeline.mjs +217 -0
  109. package/dist/esm/package-checks/function-metrics/analyzer/pipeline.mjs.map +1 -0
  110. package/dist/esm/package-checks/function-metrics/analyzer/port-facade.mjs +96 -0
  111. package/dist/esm/package-checks/function-metrics/analyzer/port-facade.mjs.map +1 -0
  112. package/dist/esm/package-checks/function-metrics/analyzer/reader-registry.mjs +76 -0
  113. package/dist/esm/package-checks/function-metrics/analyzer/reader-registry.mjs.map +1 -0
  114. package/dist/esm/package-checks/function-metrics/analyzer/readers/csharp.mjs +88 -0
  115. package/dist/esm/package-checks/function-metrics/analyzer/readers/csharp.mjs.map +1 -0
  116. package/dist/esm/package-checks/function-metrics/analyzer/readers/erlang.mjs +466 -0
  117. package/dist/esm/package-checks/function-metrics/analyzer/readers/erlang.mjs.map +1 -0
  118. package/dist/esm/package-checks/function-metrics/analyzer/readers/fortran.mjs +289 -0
  119. package/dist/esm/package-checks/function-metrics/analyzer/readers/fortran.mjs.map +1 -0
  120. package/dist/esm/package-checks/function-metrics/analyzer/readers/gdscript.mjs +38 -0
  121. package/dist/esm/package-checks/function-metrics/analyzer/readers/gdscript.mjs.map +1 -0
  122. package/dist/esm/package-checks/function-metrics/analyzer/readers/go.mjs +44 -0
  123. package/dist/esm/package-checks/function-metrics/analyzer/readers/go.mjs.map +1 -0
  124. package/dist/esm/package-checks/function-metrics/analyzer/readers/java-body-states.mjs +113 -0
  125. package/dist/esm/package-checks/function-metrics/analyzer/readers/java-body-states.mjs.map +1 -0
  126. package/dist/esm/package-checks/function-metrics/analyzer/readers/java.mjs +247 -0
  127. package/dist/esm/package-checks/function-metrics/analyzer/readers/java.mjs.map +1 -0
  128. package/dist/esm/package-checks/function-metrics/analyzer/readers/javascript.mjs +16 -0
  129. package/dist/esm/package-checks/function-metrics/analyzer/readers/javascript.mjs.map +1 -0
  130. package/dist/esm/package-checks/function-metrics/analyzer/readers/kotlin.mjs +103 -0
  131. package/dist/esm/package-checks/function-metrics/analyzer/readers/kotlin.mjs.map +1 -0
  132. package/dist/esm/package-checks/function-metrics/analyzer/readers/lua.mjs +55 -0
  133. package/dist/esm/package-checks/function-metrics/analyzer/readers/lua.mjs.map +1 -0
  134. package/dist/esm/package-checks/function-metrics/analyzer/readers/objc.mjs +100 -0
  135. package/dist/esm/package-checks/function-metrics/analyzer/readers/objc.mjs.map +1 -0
  136. package/dist/esm/package-checks/function-metrics/analyzer/readers/perl.mjs +367 -0
  137. package/dist/esm/package-checks/function-metrics/analyzer/readers/perl.mjs.map +1 -0
  138. package/dist/esm/package-checks/function-metrics/analyzer/readers/php-states.mjs +260 -0
  139. package/dist/esm/package-checks/function-metrics/analyzer/readers/php-states.mjs.map +1 -0
  140. package/dist/esm/package-checks/function-metrics/analyzer/readers/php.mjs +53 -0
  141. package/dist/esm/package-checks/function-metrics/analyzer/readers/php.mjs.map +1 -0
  142. package/dist/esm/package-checks/function-metrics/analyzer/readers/plsql.mjs +306 -0
  143. package/dist/esm/package-checks/function-metrics/analyzer/readers/plsql.mjs.map +1 -0
  144. package/dist/esm/package-checks/function-metrics/analyzer/readers/python.mjs +402 -0
  145. package/dist/esm/package-checks/function-metrics/analyzer/readers/python.mjs.map +1 -0
  146. package/dist/esm/package-checks/function-metrics/analyzer/readers/r.mjs +214 -0
  147. package/dist/esm/package-checks/function-metrics/analyzer/readers/r.mjs.map +1 -0
  148. package/dist/esm/package-checks/function-metrics/analyzer/readers/ruby.mjs +75 -0
  149. package/dist/esm/package-checks/function-metrics/analyzer/readers/ruby.mjs.map +1 -0
  150. package/dist/esm/package-checks/function-metrics/analyzer/readers/rust.mjs +32 -0
  151. package/dist/esm/package-checks/function-metrics/analyzer/readers/rust.mjs.map +1 -0
  152. package/dist/esm/package-checks/function-metrics/analyzer/readers/scala.mjs +47 -0
  153. package/dist/esm/package-checks/function-metrics/analyzer/readers/scala.mjs.map +1 -0
  154. package/dist/esm/package-checks/function-metrics/analyzer/readers/solidity.mjs +22 -0
  155. package/dist/esm/package-checks/function-metrics/analyzer/readers/solidity.mjs.map +1 -0
  156. package/dist/esm/package-checks/function-metrics/analyzer/readers/st.mjs +142 -0
  157. package/dist/esm/package-checks/function-metrics/analyzer/readers/st.mjs.map +1 -0
  158. package/dist/esm/package-checks/function-metrics/analyzer/readers/swift.mjs +94 -0
  159. package/dist/esm/package-checks/function-metrics/analyzer/readers/swift.mjs.map +1 -0
  160. package/dist/esm/package-checks/function-metrics/analyzer/readers/tsx.mjs +149 -0
  161. package/dist/esm/package-checks/function-metrics/analyzer/readers/tsx.mjs.map +1 -0
  162. package/dist/esm/package-checks/function-metrics/analyzer/readers/ttcn.mjs +79 -0
  163. package/dist/esm/package-checks/function-metrics/analyzer/readers/ttcn.mjs.map +1 -0
  164. package/dist/esm/package-checks/function-metrics/analyzer/readers/typescript.mjs +606 -0
  165. package/dist/esm/package-checks/function-metrics/analyzer/readers/typescript.mjs.map +1 -0
  166. package/dist/esm/package-checks/function-metrics/analyzer/readers/vue.mjs +31 -0
  167. package/dist/esm/package-checks/function-metrics/analyzer/readers/vue.mjs.map +1 -0
  168. package/dist/esm/package-checks/function-metrics/analyzer/readers/zig.mjs +23 -0
  169. package/dist/esm/package-checks/function-metrics/analyzer/readers/zig.mjs.map +1 -0
  170. package/dist/esm/package-checks/function-metrics/analyzer/shared/clike.mjs +492 -0
  171. package/dist/esm/package-checks/function-metrics/analyzer/shared/clike.mjs.map +1 -0
  172. package/dist/esm/package-checks/function-metrics/analyzer/shared/code-reader.mjs +542 -0
  173. package/dist/esm/package-checks/function-metrics/analyzer/shared/code-reader.mjs.map +1 -0
  174. package/dist/esm/package-checks/function-metrics/analyzer/shared/golike.mjs +141 -0
  175. package/dist/esm/package-checks/function-metrics/analyzer/shared/golike.mjs.map +1 -0
  176. package/dist/esm/package-checks/function-metrics/analyzer/shared/js-style-regex.mjs +62 -0
  177. package/dist/esm/package-checks/function-metrics/analyzer/shared/js-style-regex.mjs.map +1 -0
  178. package/dist/esm/package-checks/function-metrics/analyzer/shared/rubylike.mjs +154 -0
  179. package/dist/esm/package-checks/function-metrics/analyzer/shared/rubylike.mjs.map +1 -0
  180. package/dist/esm/package-checks/function-metrics/analyzer/shared/script-language.mjs +36 -0
  181. package/dist/esm/package-checks/function-metrics/analyzer/shared/script-language.mjs.map +1 -0
  182. package/dist/esm/package-checks/function-metrics/analyzer-adapter.mjs +56 -0
  183. package/dist/esm/package-checks/function-metrics/analyzer-adapter.mjs.map +1 -0
  184. package/dist/esm/package-checks/function-metrics/analyzer-worker-contract.mjs +2 -0
  185. package/dist/esm/package-checks/function-metrics/analyzer-worker-contract.mjs.map +1 -0
  186. package/dist/esm/package-checks/function-metrics/analyzer-worker-port.mjs +108 -0
  187. package/dist/esm/package-checks/function-metrics/analyzer-worker-port.mjs.map +1 -0
  188. package/dist/esm/package-checks/function-metrics/analyzer-worker.mjs +24 -0
  189. package/dist/esm/package-checks/function-metrics/analyzer-worker.mjs.map +1 -0
  190. package/dist/esm/package-checks/function-metrics/constructor.mjs +2 -2
  191. package/dist/esm/package-checks/function-metrics/constructor.mjs.map +1 -1
  192. package/dist/esm/package-checks/function-metrics/execution.mjs +51 -33
  193. package/dist/esm/package-checks/function-metrics/execution.mjs.map +1 -1
  194. package/dist/esm/package-checks/function-metrics/finding-messages.mjs +75 -0
  195. package/dist/esm/package-checks/function-metrics/finding-messages.mjs.map +1 -0
  196. package/dist/esm/package-checks/function-metrics/finding-waiver-identity.mjs +28 -0
  197. package/dist/esm/package-checks/function-metrics/finding-waiver-identity.mjs.map +1 -0
  198. package/dist/esm/package-checks/function-metrics/measurement-model.mjs.map +1 -1
  199. package/dist/esm/package-checks/function-metrics/measurement.mjs +161 -26
  200. package/dist/esm/package-checks/function-metrics/measurement.mjs.map +1 -1
  201. package/dist/esm/package-checks/function-metrics/options-resolution.mjs +30 -63
  202. package/dist/esm/package-checks/function-metrics/options-resolution.mjs.map +1 -1
  203. package/dist/esm/package-checks/function-metrics/options-validation.mjs +27 -32
  204. package/dist/esm/package-checks/function-metrics/options-validation.mjs.map +1 -1
  205. package/dist/esm/package-checks/function-metrics/options.mjs.map +1 -1
  206. package/dist/esm/package-checks/function-metrics/records.mjs +31 -1
  207. package/dist/esm/package-checks/function-metrics/records.mjs.map +1 -1
  208. package/dist/esm/package-checks/function-metrics/target-files.mjs +6 -67
  209. package/dist/esm/package-checks/function-metrics/target-files.mjs.map +1 -1
  210. package/dist/esm/package-checks/{file-metrics/scc → host-environment}/csv.mjs +1 -0
  211. package/dist/esm/package-checks/host-environment/csv.mjs.map +1 -0
  212. package/dist/esm/package-checks/host-environment/git.mjs +1 -1
  213. package/dist/esm/package-checks/host-environment/git.mjs.map +1 -1
  214. package/dist/esm/package-checks/host-environment/process.mjs +5 -0
  215. package/dist/esm/package-checks/host-environment/process.mjs.map +1 -0
  216. package/dist/esm/package-checks/json-schema-validation/final-data.mjs.map +1 -1
  217. package/dist/esm/package-checks/json-schema-validation/options-validation.mjs +15 -17
  218. package/dist/esm/package-checks/json-schema-validation/options-validation.mjs.map +1 -1
  219. package/dist/esm/package-checks/json-schema-validation/options.mjs.map +1 -1
  220. package/dist/esm/package-checks/json-validation/final-data.mjs.map +1 -1
  221. package/dist/esm/package-checks/json-validation/options-validation.mjs +4 -10
  222. package/dist/esm/package-checks/json-validation/options-validation.mjs.map +1 -1
  223. package/dist/esm/package-checks/maintenance-reminders/final-data.mjs.map +1 -1
  224. package/dist/esm/package-checks/markdown-link-validation/default-check.mjs +9 -3
  225. package/dist/esm/package-checks/markdown-link-validation/default-check.mjs.map +1 -1
  226. package/dist/esm/package-checks/markdown-link-validation/execution.mjs +27 -24
  227. package/dist/esm/package-checks/markdown-link-validation/execution.mjs.map +1 -1
  228. package/dist/esm/package-checks/markdown-link-validation/filesystem-probes.mjs +82 -53
  229. package/dist/esm/package-checks/markdown-link-validation/filesystem-probes.mjs.map +1 -1
  230. package/dist/esm/package-checks/markdown-link-validation/final-data.mjs.map +1 -1
  231. package/dist/esm/package-checks/markdown-link-validation/finding-messages.mjs +36 -0
  232. package/dist/esm/package-checks/markdown-link-validation/finding-messages.mjs.map +1 -0
  233. package/dist/esm/package-checks/markdown-link-validation/local-resolution.mjs.map +1 -1
  234. package/dist/esm/package-checks/markdown-link-validation/local-resolver.mjs +2 -2
  235. package/dist/esm/package-checks/markdown-link-validation/local-resolver.mjs.map +1 -1
  236. package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs +26 -4
  237. package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs.map +1 -1
  238. package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs +24 -11
  239. package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs.map +1 -1
  240. package/dist/esm/package-checks/markdown-link-validation/options.mjs.map +1 -1
  241. package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache-payload.mjs +185 -0
  242. package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache-payload.mjs.map +1 -0
  243. package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache.mjs +131 -0
  244. package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache.mjs.map +1 -0
  245. package/dist/esm/package-checks/markdown-link-validation/resolver-engine.mjs +58 -57
  246. package/dist/esm/package-checks/markdown-link-validation/resolver-engine.mjs.map +1 -1
  247. package/dist/esm/package-checks/markdown-link-validation/source-reader.mjs +54 -0
  248. package/dist/esm/package-checks/markdown-link-validation/source-reader.mjs.map +1 -0
  249. package/dist/esm/package-checks/markdown-link-validation/unavailable-reasons.mjs +16 -0
  250. package/dist/esm/package-checks/markdown-link-validation/unavailable-reasons.mjs.map +1 -0
  251. package/dist/esm/package-checks/project-files/collection.mjs +1 -1
  252. package/dist/esm/package-checks/project-files/collection.mjs.map +1 -1
  253. package/dist/esm/package-checks/project-files/configuration.mjs +2 -10
  254. package/dist/esm/package-checks/project-files/configuration.mjs.map +1 -1
  255. package/dist/esm/package-checks/project-files/gitlink-revision.mjs +1 -1
  256. package/dist/esm/package-checks/project-files/gitlink-revision.mjs.map +1 -1
  257. package/dist/esm/package-checks/project-files/gitlink-worktree.mjs +1 -1
  258. package/dist/esm/package-checks/project-files/gitlink-worktree.mjs.map +1 -1
  259. package/dist/esm/package-checks/project-files/public-collection.mjs +56 -0
  260. package/dist/esm/package-checks/project-files/public-collection.mjs.map +1 -0
  261. package/dist/esm/package-checks/project-files/revision-worktree-files.mjs +1 -1
  262. package/dist/esm/package-checks/project-files/revision-worktree-files.mjs.map +1 -1
  263. package/dist/esm/package-checks/secret-detection/classification.mjs +15 -0
  264. package/dist/esm/package-checks/secret-detection/classification.mjs.map +1 -0
  265. package/dist/esm/package-checks/secret-detection/default-check.mjs +39 -0
  266. package/dist/esm/package-checks/secret-detection/default-check.mjs.map +1 -0
  267. package/dist/esm/package-checks/secret-detection/execution.mjs +172 -0
  268. package/dist/esm/package-checks/secret-detection/execution.mjs.map +1 -0
  269. package/dist/esm/package-checks/secret-detection/final-data.mjs +33 -0
  270. package/dist/esm/package-checks/secret-detection/final-data.mjs.map +1 -0
  271. package/dist/esm/package-checks/secret-detection/finding-waiver-identity.mjs +30 -0
  272. package/dist/esm/package-checks/secret-detection/finding-waiver-identity.mjs.map +1 -0
  273. package/dist/esm/package-checks/secret-detection/input-preparation.mjs +153 -0
  274. package/dist/esm/package-checks/secret-detection/input-preparation.mjs.map +1 -0
  275. package/dist/esm/package-checks/secret-detection/options-resolution.mjs +40 -0
  276. package/dist/esm/package-checks/secret-detection/options-resolution.mjs.map +1 -0
  277. package/dist/esm/package-checks/secret-detection/options-validation.mjs +22 -0
  278. package/dist/esm/package-checks/secret-detection/options-validation.mjs.map +1 -0
  279. package/dist/esm/package-checks/secret-detection/options.mjs +2 -0
  280. package/dist/esm/package-checks/secret-detection/options.mjs.map +1 -0
  281. package/dist/esm/package-checks/secret-detection/records.mjs +31 -0
  282. package/dist/esm/package-checks/secret-detection/records.mjs.map +1 -0
  283. package/dist/esm/package-checks/secret-detection/secretlint/adapter.mjs +85 -0
  284. package/dist/esm/package-checks/secret-detection/secretlint/adapter.mjs.map +1 -0
  285. package/dist/esm/project-definition/check-tree/authoring.mjs +12 -172
  286. package/dist/esm/project-definition/check-tree/authoring.mjs.map +1 -1
  287. package/dist/esm/project-definition/check-tree/check-fields-authoring.mjs +171 -0
  288. package/dist/esm/project-definition/check-tree/check-fields-authoring.mjs.map +1 -0
  289. package/dist/esm/project-definition/check-tree/collection-authoring.mjs +16 -0
  290. package/dist/esm/project-definition/check-tree/collection-authoring.mjs.map +1 -0
  291. package/dist/esm/project-definition/check-tree/materialization.mjs +9 -1
  292. package/dist/esm/project-definition/check-tree/materialization.mjs.map +1 -1
  293. package/dist/esm/project-definition/check-tree/resolution.mjs +45 -13
  294. package/dist/esm/project-definition/check-tree/resolution.mjs.map +1 -1
  295. package/dist/esm/project-definition/check-tree/scheduling-authoring.mjs +73 -0
  296. package/dist/esm/project-definition/check-tree/scheduling-authoring.mjs.map +1 -0
  297. package/dist/esm/project-definition/declarative-snapshot.mjs +73 -0
  298. package/dist/esm/project-definition/declarative-snapshot.mjs.map +1 -0
  299. package/dist/esm/project-definition/output-defaults.mjs +18 -1
  300. package/dist/esm/project-definition/output-defaults.mjs.map +1 -1
  301. package/dist/esm/project-definition/output-validation.mjs +15 -15
  302. package/dist/esm/project-definition/output-validation.mjs.map +1 -1
  303. package/dist/esm/project-definition/progress-rendering-output.mjs +52 -0
  304. package/dist/esm/project-definition/progress-rendering-output.mjs.map +1 -0
  305. package/dist/esm/project-definition/project-definition-validation.mjs +100 -16
  306. package/dist/esm/project-definition/project-definition-validation.mjs.map +1 -1
  307. package/dist/esm/project-definition/project-definition.mjs +52 -47
  308. package/dist/esm/project-definition/project-definition.mjs.map +1 -1
  309. package/dist/esm/project-definition/resource-unit-mapping.mjs +21 -0
  310. package/dist/esm/project-definition/resource-unit-mapping.mjs.map +1 -0
  311. package/dist/esm/project-definition/scheduler-policy.mjs +2 -0
  312. package/dist/esm/project-definition/scheduler-policy.mjs.map +1 -0
  313. package/dist/esm/project-run/admission-strategy-provider/custom-strategy-preparation.mjs +54 -0
  314. package/dist/esm/project-run/admission-strategy-provider/custom-strategy-preparation.mjs.map +1 -0
  315. package/dist/esm/project-run/admission-strategy-provider/prepared-admission-strategy.mjs +2 -0
  316. package/dist/esm/project-run/admission-strategy-provider/prepared-admission-strategy.mjs.map +1 -0
  317. package/dist/esm/project-run/admission-strategy-provider/provider.mjs +23 -0
  318. package/dist/esm/project-run/admission-strategy-provider/provider.mjs.map +1 -0
  319. package/dist/esm/project-run/aggregation.mjs +7 -5
  320. package/dist/esm/project-run/aggregation.mjs.map +1 -1
  321. package/dist/esm/project-run/check-execution/callback.mjs +35 -8
  322. package/dist/esm/project-run/check-execution/callback.mjs.map +1 -1
  323. package/dist/esm/project-run/check-execution/console-capture.mjs +220 -0
  324. package/dist/esm/project-run/check-execution/console-capture.mjs.map +1 -0
  325. package/dist/esm/project-run/check-execution/dependencies.mjs +21 -3
  326. package/dist/esm/project-run/check-execution/dependencies.mjs.map +1 -1
  327. package/dist/esm/project-run/check-execution/execution-finalization.mjs +54 -13
  328. package/dist/esm/project-run/check-execution/execution-finalization.mjs.map +1 -1
  329. package/dist/esm/project-run/check-execution/execution-settlement.mjs +13 -9
  330. package/dist/esm/project-run/check-execution/execution-settlement.mjs.map +1 -1
  331. package/dist/esm/project-run/check-execution/flag-controls.mjs +87 -0
  332. package/dist/esm/project-run/check-execution/flag-controls.mjs.map +1 -0
  333. package/dist/esm/project-run/check-execution/lifecycle.mjs +2 -0
  334. package/dist/esm/project-run/check-execution/lifecycle.mjs.map +1 -0
  335. package/dist/esm/project-run/check-execution/messages.mjs +5 -0
  336. package/dist/esm/project-run/check-execution/messages.mjs.map +1 -1
  337. package/dist/esm/project-run/check-execution/plan.mjs +9 -5
  338. package/dist/esm/project-run/check-execution/plan.mjs.map +1 -1
  339. package/dist/esm/project-run/check-execution/preflight.mjs +18 -32
  340. package/dist/esm/project-run/check-execution/preflight.mjs.map +1 -1
  341. package/dist/esm/project-run/check-execution/resolved-checks.mjs +100 -58
  342. package/dist/esm/project-run/check-execution/resolved-checks.mjs.map +1 -1
  343. package/dist/esm/project-run/check-execution/resolved-execution-result.mjs +2 -0
  344. package/dist/esm/project-run/check-execution/resolved-execution-result.mjs.map +1 -0
  345. package/dist/esm/project-run/{completion.mjs → completion/completion.mjs} +16 -38
  346. package/dist/esm/project-run/completion/completion.mjs.map +1 -0
  347. package/dist/esm/project-run/{machine-publication.mjs → completion/machine-publication.mjs} +1 -1
  348. package/dist/esm/project-run/completion/machine-publication.mjs.map +1 -0
  349. package/dist/esm/project-run/completion/result-resolver.mjs +36 -0
  350. package/dist/esm/project-run/completion/result-resolver.mjs.map +1 -0
  351. package/dist/esm/project-run/controls/contract.mjs.map +1 -1
  352. package/dist/esm/project-run/controls/outputs-override-validation.mjs +67 -47
  353. package/dist/esm/project-run/controls/outputs-override-validation.mjs.map +1 -1
  354. package/dist/esm/project-run/controls/validation-result.mjs.map +1 -1
  355. package/dist/esm/project-run/controls/validation.mjs +75 -11
  356. package/dist/esm/project-run/controls/validation.mjs.map +1 -1
  357. package/dist/esm/project-run/diagnostic-logging/logger.mjs +100 -161
  358. package/dist/esm/project-run/diagnostic-logging/logger.mjs.map +1 -1
  359. package/dist/esm/project-run/diagnostic-logging/observation-rendering.mjs +159 -0
  360. package/dist/esm/project-run/diagnostic-logging/observation-rendering.mjs.map +1 -0
  361. package/dist/esm/project-run/invocation/candidate.mjs +61 -0
  362. package/dist/esm/project-run/invocation/candidate.mjs.map +1 -0
  363. package/dist/esm/project-run/invocation/creation.mjs +79 -0
  364. package/dist/esm/project-run/invocation/creation.mjs.map +1 -0
  365. package/dist/esm/project-run/invocation/paths.mjs +77 -0
  366. package/dist/esm/project-run/invocation/paths.mjs.map +1 -0
  367. package/dist/esm/project-run/invocation/progress.mjs +30 -0
  368. package/dist/esm/project-run/invocation/progress.mjs.map +1 -0
  369. package/dist/esm/project-run/{invocation.mjs → invocation/run.mjs} +78 -92
  370. package/dist/esm/project-run/invocation/run.mjs.map +1 -0
  371. package/dist/esm/project-run/invocation/scheduler.mjs +57 -0
  372. package/dist/esm/project-run/invocation/scheduler.mjs.map +1 -0
  373. package/dist/esm/project-run/{output-configuration.mjs → outputs/configuration.mjs} +3 -2
  374. package/dist/esm/project-run/outputs/configuration.mjs.map +1 -0
  375. package/dist/esm/project-run/outputs/status.mjs +105 -0
  376. package/dist/esm/project-run/outputs/status.mjs.map +1 -0
  377. package/dist/esm/project-run/progress-rendering/presentation.mjs +112 -18
  378. package/dist/esm/project-run/progress-rendering/presentation.mjs.map +1 -1
  379. package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs +108 -19
  380. package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs.map +1 -1
  381. package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs +30 -4
  382. package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs.map +1 -1
  383. package/dist/esm/project-run/progress-rendering/renderer.mjs +5 -2
  384. package/dist/esm/project-run/progress-rendering/renderer.mjs.map +1 -1
  385. package/dist/esm/project-run/project-context.mjs +1 -1
  386. package/dist/esm/project-run/project-context.mjs.map +1 -1
  387. package/dist/esm/project-run/result.mjs +2 -0
  388. package/dist/esm/project-run/result.mjs.map +1 -1
  389. package/dist/esm/project-run/run.mjs +1 -1
  390. package/dist/esm/project-run/run.mjs.map +1 -1
  391. package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph.mjs +166 -0
  392. package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph.mjs.map +1 -0
  393. package/dist/esm/project-run/task-scheduler/admission-core/core.mjs +163 -0
  394. package/dist/esm/project-run/task-scheduler/admission-core/core.mjs.map +1 -0
  395. package/dist/esm/project-run/task-scheduler/admission-core/input.mjs +119 -0
  396. package/dist/esm/project-run/task-scheduler/admission-core/input.mjs.map +1 -0
  397. package/dist/esm/project-run/task-scheduler/admission-core/projection.mjs +124 -0
  398. package/dist/esm/project-run/task-scheduler/admission-core/projection.mjs.map +1 -0
  399. package/dist/esm/project-run/task-scheduler/admission-core/selection-index.mjs +99 -0
  400. package/dist/esm/project-run/task-scheduler/admission-core/selection-index.mjs.map +1 -0
  401. package/dist/esm/project-run/task-scheduler/admission-core/selection-query.mjs +198 -0
  402. package/dist/esm/project-run/task-scheduler/admission-core/selection-query.mjs.map +1 -0
  403. package/dist/esm/project-run/task-scheduler/admission-core/selection-seed.mjs +151 -0
  404. package/dist/esm/project-run/task-scheduler/admission-core/selection-seed.mjs.map +1 -0
  405. package/dist/esm/project-run/task-scheduler/admission-core/selection-transition.mjs +121 -0
  406. package/dist/esm/project-run/task-scheduler/admission-core/selection-transition.mjs.map +1 -0
  407. package/dist/esm/project-run/task-scheduler/admission-core/selection.mjs +65 -0
  408. package/dist/esm/project-run/task-scheduler/admission-core/selection.mjs.map +1 -0
  409. package/dist/esm/project-run/task-scheduler/admission-scope-layers.mjs +25 -0
  410. package/dist/esm/project-run/task-scheduler/admission-scope-layers.mjs.map +1 -0
  411. package/dist/esm/project-run/task-scheduler/admission-selection-policy.mjs +55 -0
  412. package/dist/esm/project-run/task-scheduler/admission-selection-policy.mjs.map +1 -0
  413. package/dist/esm/project-run/task-scheduler/critical-path-ranking.mjs +46 -0
  414. package/dist/esm/project-run/task-scheduler/critical-path-ranking.mjs.map +1 -0
  415. package/dist/esm/project-run/task-scheduler/custom-admission-policy.mjs +110 -0
  416. package/dist/esm/project-run/task-scheduler/custom-admission-policy.mjs.map +1 -0
  417. package/dist/esm/project-run/task-scheduler/execution-state.mjs +34 -5
  418. package/dist/esm/project-run/task-scheduler/execution-state.mjs.map +1 -1
  419. package/dist/esm/project-run/task-scheduler/forced-block-effect-replay.mjs +46 -0
  420. package/dist/esm/project-run/task-scheduler/forced-block-effect-replay.mjs.map +1 -0
  421. package/dist/esm/project-run/task-scheduler/graph-validation.mjs +54 -26
  422. package/dist/esm/project-run/task-scheduler/graph-validation.mjs.map +1 -1
  423. package/dist/esm/project-run/task-scheduler/graph.mjs +79 -3
  424. package/dist/esm/project-run/task-scheduler/graph.mjs.map +1 -1
  425. package/dist/esm/project-run/task-scheduler/measurement/diagnostics.mjs +207 -0
  426. package/dist/esm/project-run/task-scheduler/measurement/diagnostics.mjs.map +1 -0
  427. package/dist/esm/project-run/task-scheduler/measurement/integrals.mjs +116 -0
  428. package/dist/esm/project-run/task-scheduler/measurement/integrals.mjs.map +1 -0
  429. package/dist/esm/project-run/task-scheduler/measurement/policy.mjs +67 -0
  430. package/dist/esm/project-run/task-scheduler/measurement/policy.mjs.map +1 -0
  431. package/dist/esm/project-run/task-scheduler/measurement/summary.mjs +123 -0
  432. package/dist/esm/project-run/task-scheduler/measurement/summary.mjs.map +1 -0
  433. package/dist/esm/project-run/task-scheduler/measurement/timing.mjs +158 -0
  434. package/dist/esm/project-run/task-scheduler/measurement/timing.mjs.map +1 -0
  435. package/dist/esm/project-run/task-scheduler/scheduler-admission-decision.mjs +90 -62
  436. package/dist/esm/project-run/task-scheduler/scheduler-admission-decision.mjs.map +1 -1
  437. package/dist/esm/project-run/task-scheduler/scheduler-blocker-summary.mjs +20 -6
  438. package/dist/esm/project-run/task-scheduler/scheduler-blocker-summary.mjs.map +1 -1
  439. package/dist/esm/project-run/task-scheduler/scheduler-decision-inspection.mjs +5 -105
  440. package/dist/esm/project-run/task-scheduler/scheduler-decision-inspection.mjs.map +1 -1
  441. package/dist/esm/project-run/task-scheduler/scheduler-decision-model.mjs +0 -9
  442. package/dist/esm/project-run/task-scheduler/scheduler-decision-model.mjs.map +1 -1
  443. package/dist/esm/project-run/task-scheduler/scheduler-decision.mjs +48 -28
  444. package/dist/esm/project-run/task-scheduler/scheduler-decision.mjs.map +1 -1
  445. package/dist/esm/project-run/task-scheduler/scheduler-observation.mjs +89 -0
  446. package/dist/esm/project-run/task-scheduler/scheduler-observation.mjs.map +1 -0
  447. package/dist/esm/project-run/task-scheduler/scheduler-task-lifecycle.mjs +94 -0
  448. package/dist/esm/project-run/task-scheduler/scheduler-task-lifecycle.mjs.map +1 -0
  449. package/dist/esm/project-run/task-scheduler/scheduler-terminal-measurement.mjs +66 -0
  450. package/dist/esm/project-run/task-scheduler/scheduler-terminal-measurement.mjs.map +1 -0
  451. package/dist/esm/project-run/task-scheduler/scheduler.mjs +171 -114
  452. package/dist/esm/project-run/task-scheduler/scheduler.mjs.map +1 -1
  453. package/docs/api-mechanics.md +64 -137
  454. package/docs/changelog.md +157 -0
  455. package/docs/checks/duplicate-detection.md +111 -59
  456. package/docs/checks/file-metrics.md +46 -43
  457. package/docs/checks/function-metrics.md +100 -163
  458. package/docs/checks/json-schema-validation.md +43 -36
  459. package/docs/checks/json-validation.md +38 -25
  460. package/docs/checks/maintenance-reminders.md +41 -29
  461. package/docs/checks/markdown-link-validation.md +82 -54
  462. package/docs/checks/secret-detection.md +129 -0
  463. package/docs/examples/artifacts/mixed-outcomes/definition.ts +5 -5
  464. package/docs/guides/cache-results.md +63 -0
  465. package/docs/guides/callbacks.md +34 -0
  466. package/docs/guides/check-dependencies.md +121 -0
  467. package/docs/guides/collecting-project-files.md +59 -0
  468. package/docs/guides/extending-check-lifecycle.md +112 -0
  469. package/docs/guides/finding-waivers.md +45 -0
  470. package/docs/guides/learned-scheduling.md +83 -0
  471. package/docs/guides/presenting-findings.md +54 -0
  472. package/docs/guides/run-outputs.md +145 -0
  473. package/docs/guides/scheduling.md +208 -0
  474. package/docs/guides/simulating-admission.md +55 -0
  475. package/docs/output.md +11 -20
  476. package/licenses/Lizard-1.24.0-MIT.txt +30 -0
  477. package/{third-party-licenses/momoa-3.3.12-LICENSE → licenses/Lizard-1.24.0-lizard.py-Apache-2.0.txt} +1 -0
  478. package/licenses/Pygments-2.18.0-BSD-2-Clause.txt +25 -0
  479. package/licenses/analyzer-translations-NOTICE.md +24 -0
  480. package/licenses/lizard-1.24.0-provenance.json +957 -0
  481. package/package.json +18 -6
  482. package/src/cache/cache-json-by-key.ts +304 -0
  483. package/src/check/check.ts +67 -17
  484. package/src/check/finding-presentation.ts +67 -0
  485. package/src/check/inherited-collection.ts +1 -1
  486. package/src/check-settlement/fact-validation.ts +29 -39
  487. package/src/check-settlement/outcome-normalization.ts +17 -35
  488. package/src/check-settlement/reason-shape.ts +20 -0
  489. package/src/check-settlement/record-store.ts +18 -15
  490. package/src/check-settlement/session.ts +12 -3
  491. package/src/data-boundary/closed-values.ts +29 -0
  492. package/src/data-boundary/value-shapes.ts +12 -0
  493. package/src/index.ts +70 -2
  494. package/src/learned-critical-path/duration-model/bounded-history.ts +108 -0
  495. package/src/learned-critical-path/duration-model/prediction.ts +181 -0
  496. package/src/learned-critical-path/duration-model/preparation.ts +77 -0
  497. package/src/learned-critical-path/duration-model/recording.ts +208 -0
  498. package/src/learned-critical-path/duration-model/storage.ts +252 -0
  499. package/src/learned-critical-path/selection-layers.ts +72 -0
  500. package/src/learned-critical-path/static-decision.ts +105 -0
  501. package/src/learned-critical-path/strategy.ts +299 -0
  502. package/src/machine-output/v4/atomic-publication.ts +1 -16
  503. package/src/package-checks/code-quality-findings/finding-waiver-authoring.ts +46 -0
  504. package/src/package-checks/code-quality-findings/finding-waiver-evidence.ts +95 -0
  505. package/src/package-checks/code-quality-findings/policy.ts +23 -0
  506. package/src/package-checks/duplicate-detection/area-policy.ts +24 -13
  507. package/src/package-checks/duplicate-detection/cache/identity.ts +1 -1
  508. package/src/package-checks/duplicate-detection/default-check.ts +1 -1
  509. package/src/package-checks/duplicate-detection/execution.ts +82 -22
  510. package/src/package-checks/duplicate-detection/finding-messages.ts +75 -0
  511. package/src/package-checks/duplicate-detection/finding-waiver-identity.ts +68 -0
  512. package/src/package-checks/duplicate-detection/jscpd/availability.ts +1 -1
  513. package/src/package-checks/duplicate-detection/jscpd/command-resolution.ts +1 -1
  514. package/src/package-checks/duplicate-detection/jscpd/json-report.ts +24 -5
  515. package/src/package-checks/duplicate-detection/jscpd/scanner.ts +6 -7
  516. package/src/package-checks/duplicate-detection/options-resolution.ts +32 -57
  517. package/src/package-checks/duplicate-detection/options-validation.ts +23 -31
  518. package/src/package-checks/duplicate-detection/options.ts +21 -1
  519. package/src/package-checks/duplicate-detection/records.ts +65 -12
  520. package/src/package-checks/file-metrics/execution.ts +16 -17
  521. package/src/package-checks/file-metrics/finding-messages.ts +29 -0
  522. package/src/package-checks/file-metrics/options-resolution.ts +19 -52
  523. package/src/package-checks/file-metrics/options-validation.ts +23 -32
  524. package/src/package-checks/file-metrics/records.ts +11 -23
  525. package/src/package-checks/file-metrics/scc/availability.ts +1 -1
  526. package/src/package-checks/file-metrics/scc/parser.ts +4 -4
  527. package/src/package-checks/file-metrics/scc/scanner.ts +2 -2
  528. package/src/package-checks/function-metrics/analysis.ts +76 -21
  529. package/src/package-checks/function-metrics/analyzer/analysis-context.ts +749 -0
  530. package/src/package-checks/function-metrics/analyzer/analysis-model.ts +421 -0
  531. package/src/package-checks/function-metrics/analyzer/contracts.ts +54 -0
  532. package/src/package-checks/function-metrics/analyzer/extension-output.ts +261 -0
  533. package/src/package-checks/function-metrics/analyzer/extensions/extension-base.ts +33 -0
  534. package/src/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.ts +27 -0
  535. package/src/package-checks/function-metrics/analyzer/extensions/lizardnd.ts +144 -0
  536. package/src/package-checks/function-metrics/analyzer/extensions/protocol.ts +345 -0
  537. package/src/package-checks/function-metrics/analyzer/extensions/registry.ts +157 -0
  538. package/src/package-checks/function-metrics/analyzer/pipeline.ts +311 -0
  539. package/src/package-checks/function-metrics/analyzer/port-facade.ts +142 -0
  540. package/src/package-checks/function-metrics/analyzer/reader-registry.ts +84 -0
  541. package/src/package-checks/function-metrics/analyzer/readers/csharp.ts +110 -0
  542. package/src/package-checks/function-metrics/analyzer/readers/erlang.ts +501 -0
  543. package/src/package-checks/function-metrics/analyzer/readers/fortran.ts +294 -0
  544. package/src/package-checks/function-metrics/analyzer/readers/gdscript.ts +42 -0
  545. package/src/package-checks/function-metrics/analyzer/readers/go.ts +53 -0
  546. package/src/package-checks/function-metrics/analyzer/readers/java-body-states.ts +141 -0
  547. package/src/package-checks/function-metrics/analyzer/readers/java.ts +270 -0
  548. package/src/package-checks/function-metrics/analyzer/readers/javascript.ts +19 -0
  549. package/src/package-checks/function-metrics/analyzer/readers/kotlin.ts +120 -0
  550. package/src/package-checks/function-metrics/analyzer/readers/lua.ts +68 -0
  551. package/src/package-checks/function-metrics/analyzer/readers/objc.ts +107 -0
  552. package/src/package-checks/function-metrics/analyzer/readers/perl.ts +340 -0
  553. package/src/package-checks/function-metrics/analyzer/readers/php-states.ts +246 -0
  554. package/src/package-checks/function-metrics/analyzer/readers/php.ts +63 -0
  555. package/src/package-checks/function-metrics/analyzer/readers/plsql.ts +306 -0
  556. package/src/package-checks/function-metrics/analyzer/readers/python.ts +431 -0
  557. package/src/package-checks/function-metrics/analyzer/readers/r.ts +234 -0
  558. package/src/package-checks/function-metrics/analyzer/readers/ruby.ts +88 -0
  559. package/src/package-checks/function-metrics/analyzer/readers/rust.ts +47 -0
  560. package/src/package-checks/function-metrics/analyzer/readers/scala.ts +60 -0
  561. package/src/package-checks/function-metrics/analyzer/readers/solidity.ts +32 -0
  562. package/src/package-checks/function-metrics/analyzer/readers/st.ts +161 -0
  563. package/src/package-checks/function-metrics/analyzer/readers/swift.ts +116 -0
  564. package/src/package-checks/function-metrics/analyzer/readers/tsx.ts +165 -0
  565. package/src/package-checks/function-metrics/analyzer/readers/ttcn.ts +90 -0
  566. package/src/package-checks/function-metrics/analyzer/readers/typescript.ts +593 -0
  567. package/src/package-checks/function-metrics/analyzer/readers/vue.ts +43 -0
  568. package/src/package-checks/function-metrics/analyzer/readers/zig.ts +35 -0
  569. package/src/package-checks/function-metrics/analyzer/shared/clike.ts +541 -0
  570. package/src/package-checks/function-metrics/analyzer/shared/code-reader.ts +682 -0
  571. package/src/package-checks/function-metrics/analyzer/shared/golike.ts +143 -0
  572. package/src/package-checks/function-metrics/analyzer/shared/js-style-regex.ts +75 -0
  573. package/src/package-checks/function-metrics/analyzer/shared/rubylike.ts +161 -0
  574. package/src/package-checks/function-metrics/analyzer/shared/script-language.ts +50 -0
  575. package/src/package-checks/function-metrics/analyzer-adapter.ts +84 -0
  576. package/src/package-checks/function-metrics/analyzer-worker-contract.ts +10 -0
  577. package/src/package-checks/function-metrics/analyzer-worker-port.ts +150 -0
  578. package/src/package-checks/function-metrics/analyzer-worker.ts +31 -0
  579. package/src/package-checks/function-metrics/constructor.ts +2 -2
  580. package/src/package-checks/function-metrics/execution.ts +94 -39
  581. package/src/package-checks/function-metrics/finding-messages.ts +95 -0
  582. package/src/package-checks/function-metrics/finding-waiver-identity.ts +36 -0
  583. package/src/package-checks/function-metrics/measurement-model.ts +15 -1
  584. package/src/package-checks/function-metrics/measurement.ts +221 -36
  585. package/src/package-checks/function-metrics/options-resolution.ts +39 -75
  586. package/src/package-checks/function-metrics/options-validation.ts +30 -39
  587. package/src/package-checks/function-metrics/options.ts +27 -11
  588. package/src/package-checks/function-metrics/records.ts +73 -7
  589. package/src/package-checks/function-metrics/target-files.ts +10 -70
  590. package/src/package-checks/{file-metrics/scc → host-environment}/csv.ts +1 -2
  591. package/src/package-checks/host-environment/git.ts +2 -2
  592. package/src/package-checks/host-environment/process.ts +10 -0
  593. package/src/package-checks/json-schema-validation/final-data.ts +8 -0
  594. package/src/package-checks/json-schema-validation/options-validation.ts +16 -23
  595. package/src/package-checks/json-schema-validation/options.ts +23 -0
  596. package/src/package-checks/json-validation/final-data.ts +5 -0
  597. package/src/package-checks/json-validation/options-validation.ts +4 -18
  598. package/src/package-checks/maintenance-reminders/final-data.ts +18 -0
  599. package/src/package-checks/markdown-link-validation/default-check.ts +9 -3
  600. package/src/package-checks/markdown-link-validation/execution.ts +51 -57
  601. package/src/package-checks/markdown-link-validation/filesystem-probes.ts +108 -51
  602. package/src/package-checks/markdown-link-validation/final-data.ts +5 -0
  603. package/src/package-checks/markdown-link-validation/finding-messages.ts +48 -0
  604. package/src/package-checks/markdown-link-validation/local-resolution.ts +17 -9
  605. package/src/package-checks/markdown-link-validation/local-resolver.ts +5 -2
  606. package/src/package-checks/markdown-link-validation/options-resolution.ts +31 -3
  607. package/src/package-checks/markdown-link-validation/options-validation.ts +27 -19
  608. package/src/package-checks/markdown-link-validation/options.ts +15 -0
  609. package/src/package-checks/markdown-link-validation/parse-facts-cache-payload.ts +246 -0
  610. package/src/package-checks/markdown-link-validation/parse-facts-cache.ts +154 -0
  611. package/src/package-checks/markdown-link-validation/resolver-engine.ts +75 -65
  612. package/src/package-checks/markdown-link-validation/source-reader.ts +86 -0
  613. package/src/package-checks/markdown-link-validation/unavailable-reasons.ts +42 -0
  614. package/src/package-checks/project-files/collection.ts +1 -1
  615. package/src/package-checks/project-files/configuration.ts +3 -14
  616. package/src/package-checks/project-files/gitlink-revision.ts +1 -1
  617. package/src/package-checks/project-files/gitlink-worktree.ts +1 -1
  618. package/src/package-checks/project-files/public-collection.ts +92 -0
  619. package/src/package-checks/project-files/revision-worktree-files.ts +1 -1
  620. package/src/package-checks/secret-detection/classification.ts +30 -0
  621. package/src/package-checks/secret-detection/default-check.ts +50 -0
  622. package/src/package-checks/secret-detection/execution.ts +247 -0
  623. package/src/package-checks/secret-detection/final-data.ts +57 -0
  624. package/src/package-checks/secret-detection/finding-waiver-identity.ts +37 -0
  625. package/src/package-checks/secret-detection/input-preparation.ts +233 -0
  626. package/src/package-checks/secret-detection/options-resolution.ts +65 -0
  627. package/src/package-checks/secret-detection/options-validation.ts +27 -0
  628. package/src/package-checks/secret-detection/options.ts +36 -0
  629. package/src/package-checks/secret-detection/records.ts +77 -0
  630. package/src/package-checks/secret-detection/secretlint/adapter.ts +123 -0
  631. package/src/project-definition/check-tree/authoring.ts +29 -230
  632. package/src/project-definition/check-tree/check-fields-authoring.ts +227 -0
  633. package/src/project-definition/check-tree/collection-authoring.ts +13 -0
  634. package/src/project-definition/check-tree/materialization.ts +9 -1
  635. package/src/project-definition/check-tree/resolution.ts +80 -22
  636. package/src/project-definition/check-tree/scheduling-authoring.ts +114 -0
  637. package/src/project-definition/declarative-snapshot.ts +87 -0
  638. package/src/project-definition/output-defaults.ts +32 -1
  639. package/src/project-definition/output-validation.ts +15 -15
  640. package/src/project-definition/progress-rendering-output.ts +121 -0
  641. package/src/project-definition/project-definition-validation.ts +117 -18
  642. package/src/project-definition/project-definition.ts +198 -61
  643. package/src/project-definition/resource-unit-mapping.ts +25 -0
  644. package/src/project-definition/scheduler-policy.ts +553 -0
  645. package/src/project-run/admission-strategy-provider/custom-strategy-preparation.ts +80 -0
  646. package/src/project-run/admission-strategy-provider/prepared-admission-strategy.ts +27 -0
  647. package/src/project-run/admission-strategy-provider/provider.ts +45 -0
  648. package/src/project-run/aggregation.ts +10 -5
  649. package/src/project-run/check-execution/callback.ts +50 -8
  650. package/src/project-run/check-execution/console-capture.ts +262 -0
  651. package/src/project-run/check-execution/dependencies.ts +43 -6
  652. package/src/project-run/check-execution/execution-finalization.ts +99 -25
  653. package/src/project-run/check-execution/execution-settlement.ts +19 -11
  654. package/src/project-run/check-execution/flag-controls.ts +132 -0
  655. package/src/project-run/check-execution/lifecycle.ts +21 -0
  656. package/src/project-run/check-execution/messages.ts +8 -0
  657. package/src/project-run/check-execution/plan.ts +12 -8
  658. package/src/project-run/check-execution/preflight.ts +23 -43
  659. package/src/project-run/check-execution/resolved-checks.ts +165 -126
  660. package/src/project-run/check-execution/resolved-execution-result.ts +22 -0
  661. package/src/project-run/{completion.ts → completion/completion.ts} +17 -57
  662. package/src/project-run/{machine-publication.ts → completion/machine-publication.ts} +4 -4
  663. package/src/project-run/completion/result-resolver.ts +60 -0
  664. package/src/project-run/controls/contract.ts +25 -2
  665. package/src/project-run/controls/outputs-override-validation.ts +83 -60
  666. package/src/project-run/controls/validation-result.ts +17 -6
  667. package/src/project-run/controls/validation.ts +107 -12
  668. package/src/project-run/diagnostic-logging/logger.ts +132 -207
  669. package/src/project-run/diagnostic-logging/observation-rendering.ts +203 -0
  670. package/src/project-run/invocation/candidate.ts +86 -0
  671. package/src/project-run/invocation/creation.ts +116 -0
  672. package/src/project-run/invocation/paths.ts +154 -0
  673. package/src/project-run/invocation/progress.ts +38 -0
  674. package/src/project-run/{invocation.ts → invocation/run.ts} +125 -120
  675. package/src/project-run/invocation/scheduler.ts +75 -0
  676. package/src/project-run/{output-configuration.ts → outputs/configuration.ts} +6 -5
  677. package/src/project-run/outputs/status.ts +161 -0
  678. package/src/project-run/progress-rendering/presentation.ts +118 -26
  679. package/src/project-run/progress-rendering/renderer-formatting.ts +166 -19
  680. package/src/project-run/progress-rendering/renderer-lifecycle.ts +38 -3
  681. package/src/project-run/progress-rendering/renderer.ts +13 -2
  682. package/src/project-run/project-context.ts +3 -2
  683. package/src/project-run/result.ts +49 -3
  684. package/src/project-run/run.ts +7 -6
  685. package/src/project-run/task-scheduler/admission-core/compiled-graph.ts +316 -0
  686. package/src/project-run/task-scheduler/admission-core/core.ts +278 -0
  687. package/src/project-run/task-scheduler/admission-core/input.ts +138 -0
  688. package/src/project-run/task-scheduler/admission-core/projection.ts +164 -0
  689. package/src/project-run/task-scheduler/admission-core/selection-index.ts +165 -0
  690. package/src/project-run/task-scheduler/admission-core/selection-query.ts +295 -0
  691. package/src/project-run/task-scheduler/admission-core/selection-seed.ts +252 -0
  692. package/src/project-run/task-scheduler/admission-core/selection-transition.ts +236 -0
  693. package/src/project-run/task-scheduler/admission-core/selection.ts +140 -0
  694. package/src/project-run/task-scheduler/admission-core/trace.ts +177 -0
  695. package/src/project-run/task-scheduler/admission-scope-layers.ts +44 -0
  696. package/src/project-run/task-scheduler/admission-selection-policy.ts +116 -0
  697. package/src/project-run/task-scheduler/critical-path-ranking.ts +76 -0
  698. package/src/project-run/task-scheduler/custom-admission-policy.ts +128 -0
  699. package/src/project-run/task-scheduler/execution-state.ts +97 -6
  700. package/src/project-run/task-scheduler/forced-block-effect-replay.ts +68 -0
  701. package/src/project-run/task-scheduler/graph-validation.ts +77 -31
  702. package/src/project-run/task-scheduler/graph.ts +111 -3
  703. package/src/project-run/task-scheduler/measurement/diagnostics.ts +261 -0
  704. package/src/project-run/task-scheduler/measurement/integrals.ts +177 -0
  705. package/src/project-run/task-scheduler/measurement/policy.ts +105 -0
  706. package/src/project-run/task-scheduler/measurement/summary.ts +175 -0
  707. package/src/project-run/task-scheduler/measurement/timing.ts +190 -0
  708. package/src/project-run/task-scheduler/scheduler-admission-decision.ts +143 -134
  709. package/src/project-run/task-scheduler/scheduler-blocker-summary.ts +34 -9
  710. package/src/project-run/task-scheduler/scheduler-decision-inspection.ts +28 -170
  711. package/src/project-run/task-scheduler/scheduler-decision-model.ts +36 -40
  712. package/src/project-run/task-scheduler/scheduler-decision.ts +68 -36
  713. package/src/project-run/task-scheduler/scheduler-observation.ts +124 -0
  714. package/src/project-run/task-scheduler/scheduler-task-lifecycle.ts +150 -0
  715. package/src/project-run/task-scheduler/scheduler-terminal-measurement.ts +95 -0
  716. package/src/project-run/task-scheduler/scheduler.ts +216 -171
  717. package/types/cache/cache-json-by-key.d.ts +53 -0
  718. package/types/check/check.d.ts +62 -17
  719. package/types/check/finding-presentation.d.ts +25 -0
  720. package/types/check/inherited-collection.d.ts +1 -1
  721. package/types/check-settlement/reason-shape.d.ts +5 -0
  722. package/types/check-settlement/record-store.d.ts +2 -2
  723. package/types/check-settlement/session.d.ts +3 -1
  724. package/types/data-boundary/closed-values.d.ts +8 -0
  725. package/types/data-boundary/value-shapes.d.ts +3 -0
  726. package/types/index.d.ts +22 -7
  727. package/types/learned-critical-path/duration-model/bounded-history.d.ts +34 -0
  728. package/types/learned-critical-path/duration-model/prediction.d.ts +32 -0
  729. package/types/learned-critical-path/duration-model/preparation.d.ts +28 -0
  730. package/types/learned-critical-path/duration-model/recording.d.ts +28 -0
  731. package/types/learned-critical-path/duration-model/storage.d.ts +12 -0
  732. package/types/learned-critical-path/selection-layers.d.ts +14 -0
  733. package/types/learned-critical-path/static-decision.d.ts +3 -0
  734. package/types/learned-critical-path/strategy.d.ts +35 -0
  735. package/types/package-checks/code-quality-findings/finding-waiver-authoring.d.ts +7 -0
  736. package/types/package-checks/code-quality-findings/finding-waiver-evidence.d.ts +34 -0
  737. package/types/package-checks/code-quality-findings/policy.d.ts +4 -0
  738. package/types/package-checks/duplicate-detection/area-policy.d.ts +1 -1
  739. package/types/package-checks/duplicate-detection/finding-messages.d.ts +7 -0
  740. package/types/package-checks/duplicate-detection/finding-waiver-identity.d.ts +3 -0
  741. package/types/package-checks/duplicate-detection/jscpd/command-resolution.d.ts +1 -1
  742. package/types/package-checks/duplicate-detection/options.d.ts +18 -1
  743. package/types/package-checks/duplicate-detection/records.d.ts +20 -3
  744. package/types/package-checks/file-metrics/finding-messages.d.ts +4 -0
  745. package/types/package-checks/file-metrics/records.d.ts +5 -10
  746. package/types/package-checks/file-metrics/scc/parser.d.ts +4 -4
  747. package/types/package-checks/function-metrics/analysis.d.ts +1 -1
  748. package/types/package-checks/function-metrics/analyzer/analysis-context.d.ts +174 -0
  749. package/types/package-checks/function-metrics/analyzer/analysis-model.d.ts +135 -0
  750. package/types/package-checks/function-metrics/analyzer/contracts.d.ts +48 -0
  751. package/types/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.d.ts +13 -0
  752. package/types/package-checks/function-metrics/analyzer/extensions/lizardnd.d.ts +28 -0
  753. package/types/package-checks/function-metrics/analyzer/extensions/protocol.d.ts +99 -0
  754. package/types/package-checks/function-metrics/analyzer/extensions/registry.d.ts +34 -0
  755. package/types/package-checks/function-metrics/analyzer/pipeline.d.ts +67 -0
  756. package/types/package-checks/function-metrics/analyzer/port-facade.d.ts +38 -0
  757. package/types/package-checks/function-metrics/analyzer/reader-registry.d.ts +18 -0
  758. package/types/package-checks/function-metrics/analyzer/readers/csharp.d.ts +22 -0
  759. package/types/package-checks/function-metrics/analyzer/readers/erlang.d.ts +22 -0
  760. package/types/package-checks/function-metrics/analyzer/readers/fortran.d.ts +29 -0
  761. package/types/package-checks/function-metrics/analyzer/readers/gdscript.d.ts +18 -0
  762. package/types/package-checks/function-metrics/analyzer/readers/go.d.ts +18 -0
  763. package/types/package-checks/function-metrics/analyzer/readers/java-body-states.d.ts +18 -0
  764. package/types/package-checks/function-metrics/analyzer/readers/java.d.ts +44 -0
  765. package/types/package-checks/function-metrics/analyzer/readers/javascript.d.ts +14 -0
  766. package/types/package-checks/function-metrics/analyzer/readers/kotlin.d.ts +23 -0
  767. package/types/package-checks/function-metrics/analyzer/readers/lua.d.ts +16 -0
  768. package/types/package-checks/function-metrics/analyzer/readers/objc.d.ts +18 -0
  769. package/types/package-checks/function-metrics/analyzer/readers/perl.d.ts +28 -0
  770. package/types/package-checks/function-metrics/analyzer/readers/php-states.d.ts +41 -0
  771. package/types/package-checks/function-metrics/analyzer/readers/php.d.ts +22 -0
  772. package/types/package-checks/function-metrics/analyzer/readers/plsql.d.ts +24 -0
  773. package/types/package-checks/function-metrics/analyzer/readers/python.d.ts +50 -0
  774. package/types/package-checks/function-metrics/analyzer/readers/r.d.ts +22 -0
  775. package/types/package-checks/function-metrics/analyzer/readers/ruby.d.ts +16 -0
  776. package/types/package-checks/function-metrics/analyzer/readers/rust.d.ts +20 -0
  777. package/types/package-checks/function-metrics/analyzer/readers/scala.d.ts +20 -0
  778. package/types/package-checks/function-metrics/analyzer/readers/solidity.d.ts +19 -0
  779. package/types/package-checks/function-metrics/analyzer/readers/st.d.ts +37 -0
  780. package/types/package-checks/function-metrics/analyzer/readers/swift.d.ts +30 -0
  781. package/types/package-checks/function-metrics/analyzer/readers/tsx.d.ts +15 -0
  782. package/types/package-checks/function-metrics/analyzer/readers/ttcn.d.ts +22 -0
  783. package/types/package-checks/function-metrics/analyzer/readers/typescript.d.ts +35 -0
  784. package/types/package-checks/function-metrics/analyzer/readers/vue.d.ts +18 -0
  785. package/types/package-checks/function-metrics/analyzer/readers/zig.d.ts +19 -0
  786. package/types/package-checks/function-metrics/analyzer/shared/clike.d.ts +101 -0
  787. package/types/package-checks/function-metrics/analyzer/shared/code-reader.d.ts +176 -0
  788. package/types/package-checks/function-metrics/analyzer/shared/golike.d.ts +39 -0
  789. package/types/package-checks/function-metrics/analyzer/shared/js-style-regex.d.ts +16 -0
  790. package/types/package-checks/function-metrics/analyzer/shared/rubylike.d.ts +40 -0
  791. package/types/package-checks/function-metrics/analyzer/shared/script-language.d.ts +17 -0
  792. package/types/package-checks/function-metrics/analyzer-adapter.d.ts +26 -0
  793. package/types/package-checks/function-metrics/analyzer-worker-contract.d.ts +5 -0
  794. package/types/package-checks/function-metrics/analyzer-worker-port.d.ts +24 -0
  795. package/types/package-checks/function-metrics/analyzer-worker.d.ts +1 -0
  796. package/types/package-checks/function-metrics/constructor.d.ts +1 -1
  797. package/types/package-checks/function-metrics/execution.d.ts +5 -2
  798. package/types/package-checks/function-metrics/finding-messages.d.ts +9 -0
  799. package/types/package-checks/function-metrics/finding-waiver-identity.d.ts +2 -0
  800. package/types/package-checks/function-metrics/measurement-model.d.ts +13 -1
  801. package/types/package-checks/function-metrics/measurement.d.ts +22 -7
  802. package/types/package-checks/function-metrics/options.d.ts +23 -10
  803. package/types/package-checks/function-metrics/records.d.ts +24 -5
  804. package/types/package-checks/function-metrics/target-files.d.ts +4 -3
  805. package/types/package-checks/host-environment/csv.d.ts +2 -0
  806. package/types/package-checks/host-environment/git.d.ts +1 -1
  807. package/types/package-checks/host-environment/process.d.ts +5 -0
  808. package/types/package-checks/json-schema-validation/final-data.d.ts +8 -0
  809. package/types/package-checks/json-schema-validation/options.d.ts +31 -3
  810. package/types/package-checks/json-validation/final-data.d.ts +5 -0
  811. package/types/package-checks/maintenance-reminders/final-data.d.ts +18 -0
  812. package/types/package-checks/markdown-link-validation/default-check.d.ts +9 -3
  813. package/types/package-checks/markdown-link-validation/execution.d.ts +1 -3
  814. package/types/package-checks/markdown-link-validation/final-data.d.ts +5 -0
  815. package/types/package-checks/markdown-link-validation/finding-messages.d.ts +4 -0
  816. package/types/package-checks/markdown-link-validation/local-resolution.d.ts +12 -6
  817. package/types/package-checks/markdown-link-validation/local-resolver.d.ts +2 -1
  818. package/types/package-checks/markdown-link-validation/options.d.ts +15 -0
  819. package/types/package-checks/markdown-link-validation/parse-facts-cache-payload.d.ts +24 -0
  820. package/types/package-checks/markdown-link-validation/parse-facts-cache.d.ts +13 -0
  821. package/types/package-checks/markdown-link-validation/resolver-engine.d.ts +6 -4
  822. package/types/package-checks/markdown-link-validation/source-reader.d.ts +11 -0
  823. package/types/package-checks/markdown-link-validation/unavailable-reasons.d.ts +4 -0
  824. package/types/package-checks/project-files/public-collection.d.ts +16 -0
  825. package/types/package-checks/secret-detection/classification.d.ts +12 -0
  826. package/types/package-checks/secret-detection/default-check.d.ts +11 -0
  827. package/types/package-checks/secret-detection/execution.d.ts +14 -0
  828. package/types/package-checks/secret-detection/final-data.d.ts +15 -0
  829. package/types/package-checks/secret-detection/finding-waiver-identity.d.ts +5 -0
  830. package/types/package-checks/secret-detection/input-preparation.d.ts +24 -0
  831. package/types/package-checks/secret-detection/options-resolution.d.ts +6 -0
  832. package/types/package-checks/secret-detection/options-validation.d.ts +3 -0
  833. package/types/package-checks/secret-detection/options.d.ts +32 -0
  834. package/types/package-checks/secret-detection/records.d.ts +35 -0
  835. package/types/package-checks/secret-detection/secretlint/adapter.d.ts +28 -0
  836. package/types/project-definition/check-tree/authoring.d.ts +11 -14
  837. package/types/project-definition/check-tree/check-fields-authoring.d.ts +25 -0
  838. package/types/project-definition/check-tree/collection-authoring.d.ts +2 -0
  839. package/types/project-definition/check-tree/resolution.d.ts +8 -3
  840. package/types/project-definition/check-tree/scheduling-authoring.d.ts +19 -0
  841. package/types/project-definition/declarative-snapshot.d.ts +7 -0
  842. package/types/project-definition/output-defaults.d.ts +7 -0
  843. package/types/project-definition/output-validation.d.ts +2 -1
  844. package/types/project-definition/progress-rendering-output.d.ts +41 -0
  845. package/types/project-definition/project-definition.d.ts +61 -16
  846. package/types/project-definition/resource-unit-mapping.d.ts +4 -0
  847. package/types/project-definition/scheduler-policy.d.ts +497 -0
  848. package/types/project-run/admission-strategy-provider/custom-strategy-preparation.d.ts +9 -0
  849. package/types/project-run/admission-strategy-provider/prepared-admission-strategy.d.ts +23 -0
  850. package/types/project-run/admission-strategy-provider/provider.d.ts +13 -0
  851. package/types/project-run/aggregation.d.ts +1 -1
  852. package/types/project-run/check-execution/callback.d.ts +5 -1
  853. package/types/project-run/check-execution/console-capture.d.ts +18 -0
  854. package/types/project-run/check-execution/dependencies.d.ts +1 -1
  855. package/types/project-run/check-execution/execution-finalization.d.ts +17 -7
  856. package/types/project-run/check-execution/execution-settlement.d.ts +5 -2
  857. package/types/project-run/check-execution/flag-controls.d.ts +27 -0
  858. package/types/project-run/check-execution/lifecycle.d.ts +20 -0
  859. package/types/project-run/check-execution/messages.d.ts +2 -0
  860. package/types/project-run/check-execution/plan.d.ts +2 -3
  861. package/types/project-run/check-execution/preflight.d.ts +6 -5
  862. package/types/project-run/check-execution/resolved-checks.d.ts +32 -38
  863. package/types/project-run/check-execution/resolved-execution-result.d.ts +21 -0
  864. package/types/project-run/{completion.d.ts → completion/completion.d.ts} +4 -4
  865. package/types/project-run/{machine-publication.d.ts → completion/machine-publication.d.ts} +3 -3
  866. package/types/project-run/completion/result-resolver.d.ts +4 -0
  867. package/types/project-run/controls/contract.d.ts +25 -2
  868. package/types/project-run/controls/outputs-override-validation.d.ts +2 -1
  869. package/types/project-run/controls/validation-result.d.ts +12 -4
  870. package/types/project-run/diagnostic-logging/logger.d.ts +34 -4
  871. package/types/project-run/diagnostic-logging/observation-rendering.d.ts +7 -0
  872. package/types/project-run/invocation/candidate.d.ts +12 -0
  873. package/types/project-run/{invocation-creation.d.ts → invocation/creation.d.ts} +3 -3
  874. package/types/project-run/invocation/paths.d.ts +40 -0
  875. package/types/project-run/invocation/progress.d.ts +11 -0
  876. package/types/project-run/invocation/run.d.ts +43 -0
  877. package/types/project-run/invocation/scheduler.d.ts +16 -0
  878. package/types/project-run/outputs/configuration.d.ts +3 -0
  879. package/types/project-run/outputs/status.d.ts +48 -0
  880. package/types/project-run/progress-rendering/presentation.d.ts +9 -5
  881. package/types/project-run/progress-rendering/renderer-formatting.d.ts +8 -0
  882. package/types/project-run/progress-rendering/renderer-lifecycle.d.ts +6 -1
  883. package/types/project-run/progress-rendering/renderer.d.ts +7 -1
  884. package/types/project-run/project-context.d.ts +2 -1
  885. package/types/project-run/result.d.ts +37 -3
  886. package/types/project-run/run.d.ts +6 -5
  887. package/types/project-run/task-scheduler/admission-core/compiled-graph.d.ts +31 -0
  888. package/types/project-run/task-scheduler/admission-core/core.d.ts +57 -0
  889. package/types/project-run/task-scheduler/admission-core/input.d.ts +4 -0
  890. package/types/project-run/task-scheduler/admission-core/projection.d.ts +22 -0
  891. package/types/project-run/task-scheduler/admission-core/selection-index.d.ts +61 -0
  892. package/types/project-run/task-scheduler/admission-core/selection-query.d.ts +28 -0
  893. package/types/project-run/task-scheduler/admission-core/selection-seed.d.ts +9 -0
  894. package/types/project-run/task-scheduler/admission-core/selection-transition.d.ts +4 -0
  895. package/types/project-run/task-scheduler/admission-core/selection.d.ts +20 -0
  896. package/types/project-run/task-scheduler/admission-scope-layers.d.ts +8 -0
  897. package/types/project-run/task-scheduler/admission-selection-policy.d.ts +31 -0
  898. package/types/project-run/task-scheduler/critical-path-ranking.d.ts +19 -0
  899. package/types/project-run/task-scheduler/custom-admission-policy.d.ts +6 -0
  900. package/types/project-run/task-scheduler/execution-state.d.ts +43 -1
  901. package/types/project-run/task-scheduler/forced-block-effect-replay.d.ts +9 -0
  902. package/types/project-run/task-scheduler/graph-validation.d.ts +3 -2
  903. package/types/project-run/task-scheduler/graph.d.ts +15 -0
  904. package/types/project-run/task-scheduler/measurement/diagnostics.d.ts +47 -0
  905. package/types/project-run/task-scheduler/measurement/integrals.d.ts +27 -0
  906. package/types/project-run/task-scheduler/measurement/policy.d.ts +10 -0
  907. package/types/project-run/task-scheduler/measurement/summary.d.ts +3 -0
  908. package/types/project-run/task-scheduler/measurement/timing.d.ts +33 -0
  909. package/types/project-run/task-scheduler/scheduler-admission-decision.d.ts +13 -1
  910. package/types/project-run/task-scheduler/scheduler-decision-inspection.d.ts +20 -19
  911. package/types/project-run/task-scheduler/scheduler-decision-model.d.ts +38 -22
  912. package/types/project-run/task-scheduler/scheduler-decision.d.ts +4 -1
  913. package/types/project-run/task-scheduler/scheduler-observation.d.ts +14 -0
  914. package/types/project-run/task-scheduler/scheduler-task-lifecycle.d.ts +18 -0
  915. package/types/project-run/task-scheduler/scheduler-terminal-measurement.d.ts +9 -0
  916. package/dist/esm/package-checks/file-metrics/scc/csv.mjs.map +0 -1
  917. package/dist/esm/package-checks/function-metrics/lizard/availability.mjs +0 -64
  918. package/dist/esm/package-checks/function-metrics/lizard/availability.mjs.map +0 -1
  919. package/dist/esm/package-checks/function-metrics/lizard/csv.mjs +0 -17
  920. package/dist/esm/package-checks/function-metrics/lizard/csv.mjs.map +0 -1
  921. package/dist/esm/package-checks/function-metrics/lizard/parser.mjs +0 -138
  922. package/dist/esm/package-checks/function-metrics/lizard/parser.mjs.map +0 -1
  923. package/dist/esm/package-checks/function-metrics/lizard/scanner.mjs +0 -35
  924. package/dist/esm/package-checks/function-metrics/lizard/scanner.mjs.map +0 -1
  925. package/dist/esm/package-checks/host-environment/process/command.mjs +0 -13
  926. package/dist/esm/package-checks/host-environment/process/command.mjs.map +0 -1
  927. package/dist/esm/project-run/completion.mjs.map +0 -1
  928. package/dist/esm/project-run/invocation-creation.mjs +0 -111
  929. package/dist/esm/project-run/invocation-creation.mjs.map +0 -1
  930. package/dist/esm/project-run/invocation.mjs.map +0 -1
  931. package/dist/esm/project-run/machine-publication.mjs.map +0 -1
  932. package/dist/esm/project-run/output-configuration.mjs.map +0 -1
  933. package/dist/esm/project-run/output-status.mjs +0 -43
  934. package/dist/esm/project-run/output-status.mjs.map +0 -1
  935. package/src/package-checks/function-metrics/lizard/availability.ts +0 -90
  936. package/src/package-checks/function-metrics/lizard/csv.ts +0 -20
  937. package/src/package-checks/function-metrics/lizard/parser.ts +0 -179
  938. package/src/package-checks/function-metrics/lizard/scanner.ts +0 -62
  939. package/src/package-checks/host-environment/process/command.ts +0 -21
  940. package/src/project-run/invocation-creation.ts +0 -160
  941. package/src/project-run/output-status.ts +0 -69
  942. package/types/package-checks/file-metrics/scc/csv.d.ts +0 -1
  943. package/types/package-checks/function-metrics/lizard/availability.d.ts +0 -11
  944. package/types/package-checks/function-metrics/lizard/csv.d.ts +0 -1
  945. package/types/package-checks/function-metrics/lizard/parser.d.ts +0 -17
  946. package/types/package-checks/function-metrics/lizard/scanner.d.ts +0 -15
  947. package/types/package-checks/host-environment/process/command.d.ts +0 -7
  948. package/types/project-run/invocation.d.ts +0 -34
  949. package/types/project-run/output-configuration.d.ts +0 -3
  950. package/types/project-run/output-status.d.ts +0 -21
@@ -0,0 +1,431 @@
1
+ /**
2
+ * Derived from terryyin/lizard 1.24.0.
3
+ * Source: lizard_languages/python.py.
4
+ * Upstream revision: 308b1c3efd8c1c69bcc3eb82deeaec64fd3662ec.
5
+ * SPDX-License-Identifier: MIT
6
+ * Modified: translated to TypeScript for the product-owned analyzer.
7
+ */
8
+
9
+ import type { FileInfoBuilder } from "../analysis-context.ts";
10
+ import type { TokenStream } from "../contracts.ts";
11
+ import {
12
+ CodeReader,
13
+ CodeStateMachine,
14
+ isPythonWhitespace,
15
+ type TokenFactory
16
+ } from "../shared/code-reader.ts";
17
+ import { ScriptLanguageMixIn } from "../shared/script-language.ts";
18
+
19
+ const SOURCE_SOFT_KEYWORD_VARIABLE_NEXT = new Set([
20
+ "=",
21
+ ".",
22
+ ":",
23
+ ",",
24
+ "+=",
25
+ "-=",
26
+ "*=",
27
+ "/=",
28
+ "%=",
29
+ "//=",
30
+ "**=",
31
+ "&=",
32
+ "|=",
33
+ "^=",
34
+ "<<=",
35
+ ">>=",
36
+ ":="
37
+ ]);
38
+ const TRIPLE_QUOTE_EXPRESSION_PREDECESSORS = new Set([
39
+ "=",
40
+ "+=",
41
+ "-=",
42
+ "*=",
43
+ "/=",
44
+ "%=",
45
+ "//=",
46
+ "**=",
47
+ "&=",
48
+ "|=",
49
+ "^=",
50
+ "<<=",
51
+ ">>=",
52
+ "(",
53
+ "return",
54
+ ",",
55
+ "[",
56
+ "+",
57
+ "-",
58
+ "*",
59
+ "/",
60
+ "%"
61
+ ]);
62
+
63
+ function count_spaces(token: string): number {
64
+ return token.replaceAll("\t", " ").length;
65
+ }
66
+
67
+ class PythonIndents {
68
+ private readonly indents = [0];
69
+ private readonly context: FileInfoBuilder;
70
+
71
+ public constructor(context: FileInfoBuilder) {
72
+ this.context = context;
73
+ }
74
+
75
+ public set_nesting(spaces: number, token = ""): void {
76
+ while (this.indents.at(-1)! > spaces && !token.startsWith(")")) {
77
+ this.indents.pop();
78
+ this.context.popNesting();
79
+ }
80
+ if (this.indents.at(-1)! < spaces) {
81
+ this.indents.push(spaces);
82
+ this.context.addBareNesting();
83
+ }
84
+ }
85
+
86
+ public reset(): void {
87
+ this.set_nesting(0);
88
+ }
89
+ }
90
+
91
+ export class PythonReader extends CodeReader {
92
+ public static override ext: readonly string[] = ["py"];
93
+ public static override languageNames: readonly string[] = ["python"];
94
+ public static override controlFlowKeywords = new Set([
95
+ "if",
96
+ "elif",
97
+ "for",
98
+ "while",
99
+ "except",
100
+ "finally"
101
+ ]);
102
+ public static override logicalOperators = new Set(["and", "or"]);
103
+ public static override caseKeywords = new Set<string>();
104
+ public static override ternaryOperators = new Set<string>();
105
+
106
+ public static readonly _SOFT_KW_VARIABLE_NEXT = SOURCE_SOFT_KEYWORD_VARIABLE_NEXT;
107
+
108
+ private _last_meaningful_token: string | undefined;
109
+ private _keyword_case = false;
110
+ private _keyword_match = false;
111
+
112
+ public constructor(context: FileInfoBuilder, definition: typeof CodeReader = PythonReader) {
113
+ super(context, definition);
114
+ this.parallelStates = [new PythonStates(context, this)];
115
+ }
116
+
117
+ /** str/bytes f-string prefixes, excluding bare bytes/raw strings. */
118
+ public static readonly _FSTRING_PREFIXES = new Set(["f", "rf", "fr", "bf", "fb"]);
119
+
120
+ public static override generateTokens(
121
+ sourceCode: string,
122
+ addition = "",
123
+ tokenFactory?: TokenFactory
124
+ ): Generator<string> {
125
+ const tokens = CodeReader.generateTokens(
126
+ sourceCode,
127
+ String.raw`|#[^\n]*|(?:"""(?:\.|[^"]|"(?!"")|""(?!"))*""")|(?:'''(?:\.|[^']|'(?!'')|''(?!'))*''')` +
128
+ addition,
129
+ tokenFactory
130
+ );
131
+ return PythonReader._expand_fstring_interpolations(tokens, tokenFactory);
132
+ }
133
+
134
+ /** Re-tokenize f-string expressions so their control flow reaches the reader. */
135
+ private static *_expand_fstring_interpolations(
136
+ tokens: TokenStream,
137
+ tokenFactory?: TokenFactory
138
+ ): Generator<string> {
139
+ let prefix: string | undefined;
140
+ for (const token of tokens) {
141
+ if (prefix !== undefined) {
142
+ const held = prefix;
143
+ prefix = undefined;
144
+ if (token.startsWith('"') || token.startsWith("'")) {
145
+ yield held;
146
+ yield* PythonReader._tokenize_fstring_body(token, tokenFactory);
147
+ continue;
148
+ }
149
+ yield held;
150
+ }
151
+ if (PythonReader._FSTRING_PREFIXES.has(token.toLowerCase())) {
152
+ prefix = token;
153
+ continue;
154
+ }
155
+ yield token;
156
+ }
157
+ if (prefix !== undefined) yield prefix;
158
+ }
159
+
160
+ /** Advance beyond one quoted literal while scanning an f-string expression. */
161
+ private static _skip_quoted_literal(body: string, position: number): number {
162
+ const length = body.length;
163
+ let currentPosition = position;
164
+ const tripleQuote = body.slice(currentPosition, currentPosition + 3);
165
+ if (currentPosition + 2 < length && (tripleQuote === '"""' || tripleQuote === "'''")) {
166
+ currentPosition += 3;
167
+ while (currentPosition < length) {
168
+ if (body.slice(currentPosition, currentPosition + 3) === tripleQuote) {
169
+ return currentPosition + 3;
170
+ }
171
+ if (body[currentPosition] === "\\") {
172
+ currentPosition += 2;
173
+ continue;
174
+ }
175
+ currentPosition += 1;
176
+ }
177
+ return length;
178
+ }
179
+ if (body[currentPosition] === '"' || body[currentPosition] === "'") {
180
+ const quote = body[currentPosition];
181
+ currentPosition += 1;
182
+ while (currentPosition < length) {
183
+ if (body[currentPosition] === "\\") {
184
+ currentPosition += 2;
185
+ continue;
186
+ }
187
+ if (body[currentPosition] === quote) return currentPosition + 1;
188
+ currentPosition += 1;
189
+ }
190
+ return length;
191
+ }
192
+ return currentPosition;
193
+ }
194
+
195
+ /** Find the matching brace of an interpolation while honoring quoted literals. */
196
+ private static _find_interpolation_end(body: string, start: number): number {
197
+ let depth = 1;
198
+ let position = start + 1;
199
+ while (position < body.length && depth > 0) {
200
+ if (body[position] === '"' || body[position] === "'") {
201
+ position = PythonReader._skip_quoted_literal(body, position);
202
+ continue;
203
+ }
204
+ if (body[position] === "{") depth += 1;
205
+ else if (body[position] === "}") depth -= 1;
206
+ position += 1;
207
+ }
208
+ return position;
209
+ }
210
+
211
+ /** Preserve literal chunks and recursively tokenize each f-string expression. */
212
+ private static *_tokenize_fstring_body(
213
+ token: string,
214
+ tokenFactory?: TokenFactory
215
+ ): Generator<string> {
216
+ const quote = token.startsWith('"""') || token.startsWith("'''") ? token.slice(0, 3) : token[0];
217
+ const body = token.slice(quote.length, -quote.length);
218
+ let literal = "";
219
+ let produced = false;
220
+ let position = 0;
221
+ while (position < body.length) {
222
+ const doubledBrace = body.slice(position, position + 2);
223
+ if (doubledBrace === "{{" || doubledBrace === "}}") {
224
+ literal += body[position];
225
+ position += 2;
226
+ continue;
227
+ }
228
+ if (body[position] === "{") {
229
+ const end = PythonReader._find_interpolation_end(body, position);
230
+ if (literal) {
231
+ yield `${quote}${literal}${quote}`;
232
+ literal = "";
233
+ }
234
+ yield* PythonReader.generateTokens(body.slice(position + 1, end - 1), "", tokenFactory);
235
+ produced = true;
236
+ position = end;
237
+ continue;
238
+ }
239
+ literal += body[position];
240
+ position += 1;
241
+ }
242
+ if (!produced) {
243
+ yield token;
244
+ return;
245
+ }
246
+ if (literal) yield `${quote}${literal}${quote}`;
247
+ }
248
+
249
+ public *preprocess(tokens: TokenStream): Generator<string> {
250
+ const indents = new PythonIndents(this.context);
251
+ let currentLeadingSpaces = 0;
252
+ let readingLeadingSpace = true;
253
+
254
+ for (const token of this._soft_keyword_lookahead(tokens)) {
255
+ if (token !== "\n") {
256
+ if (readingLeadingSpace) {
257
+ if (isPythonWhitespace(token)) {
258
+ currentLeadingSpaces += count_spaces(token);
259
+ } else {
260
+ if (!token.startsWith("#")) {
261
+ const currentFunction = this.context.currentFunction;
262
+ if (currentFunction.name === "*global*" || currentFunction.longName.endsWith(")")) {
263
+ indents.set_nesting(currentLeadingSpaces, token);
264
+ }
265
+ }
266
+ readingLeadingSpace = false;
267
+ }
268
+ }
269
+ } else {
270
+ readingLeadingSpace = true;
271
+ currentLeadingSpaces = 0;
272
+ }
273
+ if (!isPythonWhitespace(token) || token === "\n") yield token;
274
+ }
275
+ indents.reset();
276
+ }
277
+
278
+ public override get_comment_from_token(token: string): string | undefined {
279
+ return ScriptLanguageMixIn.get_comment_from_token(token);
280
+ }
281
+
282
+ public override process_token(token: string): boolean {
283
+ if (token === "case" && this._keyword_case) this.context.addCondition();
284
+
285
+ if (isTripleQuotedString(token) && token.length >= 6) {
286
+ const state = this.parallelStates[0];
287
+ if (state instanceof PythonStates && !state.isFirstLine) {
288
+ if (!TRIPLE_QUOTE_EXPRESSION_PREDECESSORS.has(this._last_meaningful_token ?? "")) {
289
+ this.context.addNloc(-token.split("\n").length);
290
+ }
291
+ }
292
+ }
293
+
294
+ if (token !== "\n" && !isPythonWhitespace(token)) this._last_meaningful_token = token;
295
+ return false;
296
+ }
297
+
298
+ private *_soft_keyword_lookahead(tokens: TokenStream): Generator<string> {
299
+ let atLineStart = true;
300
+ const iterator = tokens[Symbol.iterator]();
301
+ let next = iterator.next();
302
+
303
+ while (!next.done) {
304
+ const token = next.value;
305
+ if (token === "\n") {
306
+ atLineStart = true;
307
+ yield token;
308
+ next = iterator.next();
309
+ } else if (isPythonWhitespace(token)) {
310
+ yield token;
311
+ next = iterator.next();
312
+ } else if (atLineStart && (token === "case" || token === "match")) {
313
+ const lookahead: string[] = [];
314
+ let nextReal: string | undefined;
315
+ next = iterator.next();
316
+ while (!next.done) {
317
+ lookahead.push(next.value);
318
+ if (next.value !== "\n" && !isPythonWhitespace(next.value)) {
319
+ nextReal = next.value;
320
+ next = iterator.next();
321
+ break;
322
+ }
323
+ next = iterator.next();
324
+ }
325
+
326
+ let isKeyword: boolean;
327
+ if (nextReal !== undefined && PythonReader._SOFT_KW_VARIABLE_NEXT.has(nextReal)) {
328
+ isKeyword = false;
329
+ } else if (nextReal === "(" || nextReal === "[") {
330
+ isKeyword = false;
331
+ let depth = 1;
332
+ while (!next.done) {
333
+ const lookaheadToken = next.value;
334
+ lookahead.push(lookaheadToken);
335
+ if (["(", "[", "{"].includes(lookaheadToken)) depth += 1;
336
+ else if ([")", "]", "}"].includes(lookaheadToken)) depth -= 1;
337
+ else if (lookaheadToken === ":" && depth === 0) {
338
+ isKeyword = true;
339
+ next = iterator.next();
340
+ break;
341
+ } else if (lookaheadToken === "\n" && depth === 0) {
342
+ next = iterator.next();
343
+ break;
344
+ }
345
+ next = iterator.next();
346
+ }
347
+ } else {
348
+ isKeyword = true;
349
+ }
350
+
351
+ if (token === "case") this._keyword_case = isKeyword;
352
+ else this._keyword_match = isKeyword;
353
+ atLineStart = false;
354
+ yield token;
355
+ yield* lookahead;
356
+ } else {
357
+ if (token === "case") this._keyword_case = false;
358
+ else if (token === "match") this._keyword_match = false;
359
+ atLineStart = false;
360
+ yield token;
361
+ next = iterator.next();
362
+ }
363
+ }
364
+ }
365
+ }
366
+
367
+ export class PythonStates extends CodeStateMachine {
368
+ private _awaiting_first_line = false;
369
+
370
+ public get isFirstLine(): boolean {
371
+ return this._awaiting_first_line;
372
+ }
373
+
374
+ public readonly reader: PythonReader | undefined;
375
+
376
+ public constructor(context: FileInfoBuilder, reader?: PythonReader) {
377
+ super(context);
378
+ this.reader = reader;
379
+ this.next(this._state_global);
380
+ }
381
+
382
+ public override readonly _state_global = (token: string): void => {
383
+ if (token === "def") this.next(this._function);
384
+ };
385
+
386
+ protected readonly _function = (token: string): void => {
387
+ if (token !== "(") {
388
+ this.context.restartNewFunction(token);
389
+ this.context.addToLongFunctionName("(");
390
+ } else {
391
+ this.next(this._dec);
392
+ }
393
+ };
394
+
395
+ private readonly _dec = (token: string): void => {
396
+ if (token === ")") {
397
+ this.next(this._state_colon);
398
+ } else if (token === "[") {
399
+ this.next(this._state_parameterized_type_annotation);
400
+ } else {
401
+ this.context.parameter(token);
402
+ return;
403
+ }
404
+ this.context.addToLongFunctionName(` ${token}`);
405
+ };
406
+
407
+ private readonly _state_colon = (token: string): void => {
408
+ if (token === ":") {
409
+ this._awaiting_first_line = true;
410
+ this.next(this._state_first_line);
411
+ } else {
412
+ this.next(this._state_global);
413
+ }
414
+ };
415
+
416
+ private readonly _state_first_line = (token: string): void => {
417
+ this._awaiting_first_line = false;
418
+ this.next(this._state_global);
419
+ if (isTripleQuotedString(token)) this.context.addNloc(-token.split("\n").length);
420
+ this._state_global(token);
421
+ };
422
+
423
+ private readonly _state_parameterized_type_annotation = (token: string): void => {
424
+ this.context.addToLongFunctionName(` ${token}`);
425
+ if (token === "]") this.next(this._dec);
426
+ };
427
+ }
428
+
429
+ function isTripleQuotedString(token: string): boolean {
430
+ return token.startsWith('"""') || token.startsWith("'''");
431
+ }
@@ -0,0 +1,234 @@
1
+ /**
2
+ * Derived from terryyin/lizard 1.24.0.
3
+ * Source: lizard_languages/r.py.
4
+ * Upstream revision: 308b1c3efd8c1c69bcc3eb82deeaec64fd3662ec.
5
+ * SPDX-License-Identifier: MIT
6
+ * Modified: translated to TypeScript for the product-owned analyzer.
7
+ */
8
+
9
+ import type { FileInfoBuilder } from "../analysis-context.ts";
10
+ import type { TokenStream } from "../contracts.ts";
11
+ import { CodeReader, CodeStateMachine, isPythonWhitespace } from "../shared/code-reader.ts";
12
+ import { ScriptLanguageMixIn } from "../shared/script-language.ts";
13
+
14
+ export class RReader extends CodeReader {
15
+ public static override ext: readonly string[] = ["r", "R"];
16
+ public static override languageNames: readonly string[] = ["r", "R"];
17
+ public static override controlFlowKeywords = new Set([
18
+ "if",
19
+ "else if",
20
+ "for",
21
+ "while",
22
+ "repeat",
23
+ "switch",
24
+ "tryCatch",
25
+ "try",
26
+ "ifelse"
27
+ ]);
28
+ public static override logicalOperators = new Set(["&&", "||", "&", "|"]);
29
+ public static override caseKeywords = new Set<string>();
30
+ public static override ternaryOperators = new Set<string>();
31
+
32
+ public constructor(context: FileInfoBuilder) {
33
+ super(context, RReader);
34
+ this.parallelStates = [new RStates(context)];
35
+ }
36
+
37
+ public *preprocess(tokens: TokenStream): Generator<string> {
38
+ yield* tokens;
39
+ }
40
+
41
+ public static override generateTokens(sourceCode: string): Generator<string> {
42
+ return ScriptLanguageMixIn.generate_common_tokens(
43
+ sourceCode,
44
+ String.raw`|<-|->|%[a-zA-Z_*/>]+%|\.\.\.|:::|::`
45
+ );
46
+ }
47
+
48
+ public override get_comment_from_token(token: string): string | undefined {
49
+ return ScriptLanguageMixIn.get_comment_from_token(token);
50
+ }
51
+ }
52
+
53
+ class RStates extends CodeStateMachine {
54
+ private recent_tokens: string[] = [];
55
+ private brace_count = 0;
56
+ private in_braced_function = false;
57
+ private additional_function_names: string[] = [];
58
+
59
+ public constructor(context: FileInfoBuilder) {
60
+ super(context);
61
+ }
62
+
63
+ public override _state_global(token: string): void {
64
+ if (!isPythonWhitespace(token) && token !== "\n") {
65
+ this.recent_tokens.push(token);
66
+ if (this.recent_tokens.length > 10) this.recent_tokens.shift();
67
+ }
68
+
69
+ if (token !== "function") return;
70
+ if (this.recent_tokens.length >= 2) {
71
+ const assignmentOperator = this.recent_tokens.at(-2);
72
+ if (assignmentOperator === "<-" || assignmentOperator === "=") {
73
+ const functionNames = this._extract_function_names();
74
+ this._start_function(functionNames[0] ?? "(anonymous)");
75
+ this.next(this._function_params);
76
+ this.additional_function_names = functionNames.length > 1 ? functionNames.slice(1) : [];
77
+ return;
78
+ }
79
+ }
80
+
81
+ this._start_function("(anonymous)");
82
+ this.next(this._function_params);
83
+ }
84
+
85
+ public override statemachine_before_return(): void {
86
+ if (
87
+ this.state === this._function_body ||
88
+ this.state === this._check_right_assignment ||
89
+ this.state === this._read_right_assignment_name
90
+ ) {
91
+ this._finalize_function_with_multiple_assignments();
92
+ }
93
+ }
94
+
95
+ private readonly _function_params = (token: string): void => {
96
+ if (token === "(") {
97
+ this.context.addToLongFunctionName("(");
98
+ this.next(this._read_params);
99
+ } else {
100
+ this.next(this._function_body, token);
101
+ }
102
+ };
103
+
104
+ private readonly _read_params = (token: string): void => {
105
+ if (token === ")") {
106
+ this.context.addToLongFunctionName(")");
107
+ this.next(this._function_body);
108
+ } else if (token !== "\n" && !isPythonWhitespace(token)) {
109
+ this.context.parameter(token);
110
+ if (token !== "(") this.context.addToLongFunctionName(` ${token}`);
111
+ }
112
+ };
113
+
114
+ private readonly _function_body = (token: string): void => {
115
+ if (!isPythonWhitespace(token) && token !== "\n") {
116
+ this.recent_tokens.push(token);
117
+ if (this.recent_tokens.length > 10) this.recent_tokens.shift();
118
+ }
119
+
120
+ if (token === "{") {
121
+ if (this.brace_count === 0) this.in_braced_function = true;
122
+ this.brace_count += 1;
123
+ } else if (token === "}") {
124
+ this.brace_count -= 1;
125
+ if (this.brace_count === 0 && this.in_braced_function) {
126
+ this._end_current_function();
127
+ return;
128
+ }
129
+ }
130
+
131
+ if (token === "function" && this.recent_tokens.length >= 2) {
132
+ const assignmentOperator = this.recent_tokens.at(-2);
133
+ if (assignmentOperator === "<-" || assignmentOperator === "=") {
134
+ this.context.endOfFunction();
135
+ const functionNames = this._extract_function_names();
136
+ this._start_function(functionNames[0] ?? "(anonymous)");
137
+ this.next(this._function_params);
138
+ this.brace_count = 0;
139
+ this.in_braced_function = false;
140
+ this.additional_function_names = functionNames.length > 1 ? functionNames.slice(1) : [];
141
+ }
142
+ } else if (token === "\n" && !this.in_braced_function) {
143
+ this._end_current_function();
144
+ }
145
+ };
146
+
147
+ private readonly _check_right_assignment = (token: string): void => {
148
+ if (isPythonWhitespace(token) || token === "\n" || token.startsWith("#")) return;
149
+ if (token === "->") {
150
+ this.next(this._read_right_assignment_name);
151
+ return;
152
+ }
153
+ this._finalize_function_with_multiple_assignments();
154
+ this.next(this.globalState, token);
155
+ };
156
+
157
+ private readonly _read_right_assignment_name = (token: string): void => {
158
+ if (isPythonWhitespace(token) || token === "\n") return;
159
+ if (isRNameFragment(token)) {
160
+ this.context.currentFunction.name = token;
161
+ this._finalize_function_with_multiple_assignments();
162
+ this.next(this.globalState);
163
+ return;
164
+ }
165
+ this._finalize_function_with_multiple_assignments();
166
+ this.next(this.globalState, token);
167
+ };
168
+
169
+ private _extract_function_names(): string[] {
170
+ if (this.recent_tokens.length < 3) return ["(anonymous)"];
171
+
172
+ const functionNames: string[] = [];
173
+ let index = this.recent_tokens.length - 3;
174
+ let currentNameTokens: string[] = [];
175
+ while (index >= 0) {
176
+ const token = this.recent_tokens[index];
177
+ if (token === "<-" || token === "=") {
178
+ if (currentNameTokens.length > 0) {
179
+ functionNames.push(currentNameTokens.reverse().join(""));
180
+ currentNameTokens = [];
181
+ }
182
+ index -= 1;
183
+ continue;
184
+ }
185
+ if (["function", "(", ")", "{", "}", "\n"].includes(token)) break;
186
+ if (isRNameFragment(token)) {
187
+ currentNameTokens.push(token);
188
+ index -= 1;
189
+ } else {
190
+ break;
191
+ }
192
+ }
193
+ if (currentNameTokens.length > 0) functionNames.push(currentNameTokens.reverse().join(""));
194
+ const ordered = functionNames.reverse();
195
+ return ordered.length > 0 ? ordered : ["(anonymous)"];
196
+ }
197
+
198
+ private _extract_function_name(): string {
199
+ return this._extract_function_names()[0] ?? "(anonymous)";
200
+ }
201
+
202
+ private _start_function(name: string): void {
203
+ this.context.restartNewFunction(name);
204
+ }
205
+
206
+ private _end_current_function(): void {
207
+ this.next(this._check_right_assignment);
208
+ this.brace_count = 0;
209
+ this.in_braced_function = false;
210
+ }
211
+
212
+ private _finalize_function_with_multiple_assignments(): void {
213
+ const currentFunction = this.context.currentFunction;
214
+ this.context.endOfFunction();
215
+
216
+ for (const functionName of this.additional_function_names) {
217
+ this.context.restartNewFunction(functionName);
218
+ this.context.currentFunction.cyclomaticComplexity = currentFunction.cyclomaticComplexity;
219
+ this.context.currentFunction.startLine = currentFunction.startLine;
220
+ this.context.currentFunction.endLine = currentFunction.endLine;
221
+ this.context.endOfFunction();
222
+ }
223
+ this.additional_function_names = [];
224
+ }
225
+ }
226
+
227
+ function isRNameFragment(token: string): boolean {
228
+ return (
229
+ token
230
+ .replaceAll("_", "a")
231
+ .replaceAll(".", "a")
232
+ .match(/^[\p{L}\p{N}]+$/u) !== null || token === "."
233
+ );
234
+ }