@greyworld/code-check-core 1.0.0

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 (309) hide show
  1. package/dist/facade/code-checker.d.ts +14 -0
  2. package/dist/facade/code-checker.d.ts.map +1 -0
  3. package/dist/facade/code-checker.js +63 -0
  4. package/dist/facade/code-checker.js.map +1 -0
  5. package/dist/facade/index.d.ts +3 -0
  6. package/dist/facade/index.d.ts.map +1 -0
  7. package/dist/facade/index.js +6 -0
  8. package/dist/facade/index.js.map +1 -0
  9. package/dist/facade/types.d.ts +24 -0
  10. package/dist/facade/types.d.ts.map +1 -0
  11. package/dist/facade/types.js +3 -0
  12. package/dist/facade/types.js.map +1 -0
  13. package/dist/index.d.ts +3 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +7 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/tools/ast-parser/go/index.d.ts +3 -0
  18. package/dist/tools/ast-parser/go/index.d.ts.map +1 -0
  19. package/dist/tools/ast-parser/go/index.js +6 -0
  20. package/dist/tools/ast-parser/go/index.js.map +1 -0
  21. package/dist/tools/ast-parser/go/parser.d.ts +56 -0
  22. package/dist/tools/ast-parser/go/parser.d.ts.map +1 -0
  23. package/dist/tools/ast-parser/go/parser.js +147 -0
  24. package/dist/tools/ast-parser/go/parser.js.map +1 -0
  25. package/dist/tools/ast-parser/go/schema-extractor.d.ts +103 -0
  26. package/dist/tools/ast-parser/go/schema-extractor.d.ts.map +1 -0
  27. package/dist/tools/ast-parser/go/schema-extractor.js +487 -0
  28. package/dist/tools/ast-parser/go/schema-extractor.js.map +1 -0
  29. package/dist/tools/ast-parser/go/semantic-normalizer.d.ts +51 -0
  30. package/dist/tools/ast-parser/go/semantic-normalizer.d.ts.map +1 -0
  31. package/dist/tools/ast-parser/go/semantic-normalizer.js +263 -0
  32. package/dist/tools/ast-parser/go/semantic-normalizer.js.map +1 -0
  33. package/dist/tools/ast-parser/go/types.d.ts +131 -0
  34. package/dist/tools/ast-parser/go/types.d.ts.map +1 -0
  35. package/dist/tools/ast-parser/go/types.js +3 -0
  36. package/dist/tools/ast-parser/go/types.js.map +1 -0
  37. package/dist/tools/ast-parser/markdown/index.d.ts +28 -0
  38. package/dist/tools/ast-parser/markdown/index.d.ts.map +1 -0
  39. package/dist/tools/ast-parser/markdown/index.js +31 -0
  40. package/dist/tools/ast-parser/markdown/index.js.map +1 -0
  41. package/dist/tools/ast-parser/markdown/parser.d.ts +271 -0
  42. package/dist/tools/ast-parser/markdown/parser.d.ts.map +1 -0
  43. package/dist/tools/ast-parser/markdown/parser.js +613 -0
  44. package/dist/tools/ast-parser/markdown/parser.js.map +1 -0
  45. package/dist/tools/ast-parser/markdown/types.d.ts +131 -0
  46. package/dist/tools/ast-parser/markdown/types.d.ts.map +1 -0
  47. package/dist/tools/ast-parser/markdown/types.js +3 -0
  48. package/dist/tools/ast-parser/markdown/types.js.map +1 -0
  49. package/dist/tools/env/index.d.ts +2 -0
  50. package/dist/tools/env/index.d.ts.map +1 -0
  51. package/dist/tools/env/index.js +6 -0
  52. package/dist/tools/env/index.js.map +1 -0
  53. package/dist/tools/env/load-env.d.ts +9 -0
  54. package/dist/tools/env/load-env.d.ts.map +1 -0
  55. package/dist/tools/env/load-env.js +39 -0
  56. package/dist/tools/env/load-env.js.map +1 -0
  57. package/dist/tools/line-pattern/index.d.ts +15 -0
  58. package/dist/tools/line-pattern/index.d.ts.map +1 -0
  59. package/dist/tools/line-pattern/index.js +25 -0
  60. package/dist/tools/line-pattern/index.js.map +1 -0
  61. package/dist/tools/line-pattern/line-pattern.d.ts +53 -0
  62. package/dist/tools/line-pattern/line-pattern.d.ts.map +1 -0
  63. package/dist/tools/line-pattern/line-pattern.js +88 -0
  64. package/dist/tools/line-pattern/line-pattern.js.map +1 -0
  65. package/dist/tools/line-pattern/segment.d.ts +24 -0
  66. package/dist/tools/line-pattern/segment.d.ts.map +1 -0
  67. package/dist/tools/line-pattern/segment.js +15 -0
  68. package/dist/tools/line-pattern/segment.js.map +1 -0
  69. package/dist/tools/line-pattern/segments.d.ts +43 -0
  70. package/dist/tools/line-pattern/segments.d.ts.map +1 -0
  71. package/dist/tools/line-pattern/segments.js +91 -0
  72. package/dist/tools/line-pattern/segments.js.map +1 -0
  73. package/dist/tools/llm/description-intent/format-spec.d.ts +3 -0
  74. package/dist/tools/llm/description-intent/format-spec.d.ts.map +1 -0
  75. package/dist/tools/llm/description-intent/format-spec.js +167 -0
  76. package/dist/tools/llm/description-intent/format-spec.js.map +1 -0
  77. package/dist/tools/llm/description-intent/index.d.ts +7 -0
  78. package/dist/tools/llm/description-intent/index.d.ts.map +1 -0
  79. package/dist/tools/llm/description-intent/index.js +15 -0
  80. package/dist/tools/llm/description-intent/index.js.map +1 -0
  81. package/dist/tools/llm/description-intent/intent-detector.d.ts +8 -0
  82. package/dist/tools/llm/description-intent/intent-detector.d.ts.map +1 -0
  83. package/dist/tools/llm/description-intent/intent-detector.js +103 -0
  84. package/dist/tools/llm/description-intent/intent-detector.js.map +1 -0
  85. package/dist/tools/llm/description-intent/normalizer.d.ts +12 -0
  86. package/dist/tools/llm/description-intent/normalizer.d.ts.map +1 -0
  87. package/dist/tools/llm/description-intent/normalizer.js +73 -0
  88. package/dist/tools/llm/description-intent/normalizer.js.map +1 -0
  89. package/dist/tools/llm/description-intent/slot-extractor.d.ts +3 -0
  90. package/dist/tools/llm/description-intent/slot-extractor.d.ts.map +1 -0
  91. package/dist/tools/llm/description-intent/slot-extractor.js +66 -0
  92. package/dist/tools/llm/description-intent/slot-extractor.js.map +1 -0
  93. package/dist/tools/llm/description-intent/types.d.ts +28 -0
  94. package/dist/tools/llm/description-intent/types.d.ts.map +1 -0
  95. package/dist/tools/llm/description-intent/types.js +19 -0
  96. package/dist/tools/llm/description-intent/types.js.map +1 -0
  97. package/dist/tools/llm/index.d.ts +16 -0
  98. package/dist/tools/llm/index.d.ts.map +1 -0
  99. package/dist/tools/llm/index.js +26 -0
  100. package/dist/tools/llm/index.js.map +1 -0
  101. package/dist/tools/llm/model.d.ts +3 -0
  102. package/dist/tools/llm/model.d.ts.map +1 -0
  103. package/dist/tools/llm/model.js +18 -0
  104. package/dist/tools/llm/model.js.map +1 -0
  105. package/dist/tools/llm/structured-caller.d.ts +86 -0
  106. package/dist/tools/llm/structured-caller.d.ts.map +1 -0
  107. package/dist/tools/llm/structured-caller.js +181 -0
  108. package/dist/tools/llm/structured-caller.js.map +1 -0
  109. package/dist/tools/node-pattern/index.d.ts +17 -0
  110. package/dist/tools/node-pattern/index.d.ts.map +1 -0
  111. package/dist/tools/node-pattern/index.js +36 -0
  112. package/dist/tools/node-pattern/index.js.map +1 -0
  113. package/dist/tools/node-pattern/matchers.d.ts +61 -0
  114. package/dist/tools/node-pattern/matchers.d.ts.map +1 -0
  115. package/dist/tools/node-pattern/matchers.js +154 -0
  116. package/dist/tools/node-pattern/matchers.js.map +1 -0
  117. package/dist/tools/node-pattern/node-matcher.d.ts +69 -0
  118. package/dist/tools/node-pattern/node-matcher.d.ts.map +1 -0
  119. package/dist/tools/node-pattern/node-matcher.js +122 -0
  120. package/dist/tools/node-pattern/node-matcher.js.map +1 -0
  121. package/dist/tools/node-pattern/node-pattern.d.ts +65 -0
  122. package/dist/tools/node-pattern/node-pattern.d.ts.map +1 -0
  123. package/dist/tools/node-pattern/node-pattern.js +129 -0
  124. package/dist/tools/node-pattern/node-pattern.js.map +1 -0
  125. package/dist/tools/section-check/index.d.ts +4 -0
  126. package/dist/tools/section-check/index.d.ts.map +1 -0
  127. package/dist/tools/section-check/index.js +10 -0
  128. package/dist/tools/section-check/index.js.map +1 -0
  129. package/dist/tools/section-check/section-check.d.ts +46 -0
  130. package/dist/tools/section-check/section-check.d.ts.map +1 -0
  131. package/dist/tools/section-check/section-check.js +264 -0
  132. package/dist/tools/section-check/section-check.js.map +1 -0
  133. package/dist/tools/section-check/types.d.ts +35 -0
  134. package/dist/tools/section-check/types.d.ts.map +1 -0
  135. package/dist/tools/section-check/types.js +23 -0
  136. package/dist/tools/section-check/types.js.map +1 -0
  137. package/dist/tools/text-grep/index.d.ts +10 -0
  138. package/dist/tools/text-grep/index.d.ts.map +1 -0
  139. package/dist/tools/text-grep/index.js +13 -0
  140. package/dist/tools/text-grep/index.js.map +1 -0
  141. package/dist/tools/text-grep/regex-grep.d.ts +92 -0
  142. package/dist/tools/text-grep/regex-grep.d.ts.map +1 -0
  143. package/dist/tools/text-grep/regex-grep.js +141 -0
  144. package/dist/tools/text-grep/regex-grep.js.map +1 -0
  145. package/dist/workflow/context/context.d.ts +13 -0
  146. package/dist/workflow/context/context.d.ts.map +1 -0
  147. package/dist/workflow/context/context.js +29 -0
  148. package/dist/workflow/context/context.js.map +1 -0
  149. package/dist/workflow/implement/resource-check/context-keys.d.ts +30 -0
  150. package/dist/workflow/implement/resource-check/context-keys.d.ts.map +1 -0
  151. package/dist/workflow/implement/resource-check/context-keys.js +33 -0
  152. package/dist/workflow/implement/resource-check/context-keys.js.map +1 -0
  153. package/dist/workflow/implement/resource-check/resource-check-workflow.d.ts +20 -0
  154. package/dist/workflow/implement/resource-check/resource-check-workflow.d.ts.map +1 -0
  155. package/dist/workflow/implement/resource-check/resource-check-workflow.js +325 -0
  156. package/dist/workflow/implement/resource-check/resource-check-workflow.js.map +1 -0
  157. package/dist/workflow/implement/resource-check/rules/index.d.ts +5 -0
  158. package/dist/workflow/implement/resource-check/rules/index.d.ts.map +1 -0
  159. package/dist/workflow/implement/resource-check/rules/index.js +21 -0
  160. package/dist/workflow/implement/resource-check/rules/index.js.map +1 -0
  161. package/dist/workflow/implement/resource-check/rules/markdown-format/arguments/argument-section-format-rule.d.ts +8 -0
  162. package/dist/workflow/implement/resource-check/rules/markdown-format/arguments/argument-section-format-rule.d.ts.map +1 -0
  163. package/dist/workflow/implement/resource-check/rules/markdown-format/arguments/argument-section-format-rule.js +51 -0
  164. package/dist/workflow/implement/resource-check/rules/markdown-format/arguments/argument-section-format-rule.js.map +1 -0
  165. package/dist/workflow/implement/resource-check/rules/markdown-format/attributes/attribute-section-format-rule.d.ts +8 -0
  166. package/dist/workflow/implement/resource-check/rules/markdown-format/attributes/attribute-section-format-rule.d.ts.map +1 -0
  167. package/dist/workflow/implement/resource-check/rules/markdown-format/attributes/attribute-section-format-rule.js +60 -0
  168. package/dist/workflow/implement/resource-check/rules/markdown-format/attributes/attribute-section-format-rule.js.map +1 -0
  169. package/dist/workflow/implement/resource-check/rules/markdown-format/blank-line-between-blocks-rule.d.ts +9 -0
  170. package/dist/workflow/implement/resource-check/rules/markdown-format/blank-line-between-blocks-rule.d.ts.map +1 -0
  171. package/dist/workflow/implement/resource-check/rules/markdown-format/blank-line-between-blocks-rule.js +80 -0
  172. package/dist/workflow/implement/resource-check/rules/markdown-format/blank-line-between-blocks-rule.js.map +1 -0
  173. package/dist/workflow/implement/resource-check/rules/markdown-format/example/example-section-exists-rule.d.ts +8 -0
  174. package/dist/workflow/implement/resource-check/rules/markdown-format/example/example-section-exists-rule.d.ts.map +1 -0
  175. package/dist/workflow/implement/resource-check/rules/markdown-format/example/example-section-exists-rule.js +42 -0
  176. package/dist/workflow/implement/resource-check/rules/markdown-format/example/example-section-exists-rule.js.map +1 -0
  177. package/dist/workflow/implement/resource-check/rules/markdown-format/example-section-exists-rule.d.ts +8 -0
  178. package/dist/workflow/implement/resource-check/rules/markdown-format/example-section-exists-rule.d.ts.map +1 -0
  179. package/dist/workflow/implement/resource-check/rules/markdown-format/example-section-exists-rule.js +34 -0
  180. package/dist/workflow/implement/resource-check/rules/markdown-format/example-section-exists-rule.js.map +1 -0
  181. package/dist/workflow/implement/resource-check/rules/markdown-format/frontmatter/frontmatter-check-rule.d.ts +8 -0
  182. package/dist/workflow/implement/resource-check/rules/markdown-format/frontmatter/frontmatter-check-rule.d.ts.map +1 -0
  183. package/dist/workflow/implement/resource-check/rules/markdown-format/frontmatter/frontmatter-check-rule.js +33 -0
  184. package/dist/workflow/implement/resource-check/rules/markdown-format/frontmatter/frontmatter-check-rule.js.map +1 -0
  185. package/dist/workflow/implement/resource-check/rules/markdown-format/frontmatter-check-rule.d.ts +8 -0
  186. package/dist/workflow/implement/resource-check/rules/markdown-format/frontmatter-check-rule.d.ts.map +1 -0
  187. package/dist/workflow/implement/resource-check/rules/markdown-format/frontmatter-check-rule.js +33 -0
  188. package/dist/workflow/implement/resource-check/rules/markdown-format/frontmatter-check-rule.js.map +1 -0
  189. package/dist/workflow/implement/resource-check/rules/markdown-format/h1-exists-rule.d.ts +8 -0
  190. package/dist/workflow/implement/resource-check/rules/markdown-format/h1-exists-rule.d.ts.map +1 -0
  191. package/dist/workflow/implement/resource-check/rules/markdown-format/h1-exists-rule.js +34 -0
  192. package/dist/workflow/implement/resource-check/rules/markdown-format/h1-exists-rule.js.map +1 -0
  193. package/dist/workflow/implement/resource-check/rules/markdown-format/index.d.ts +11 -0
  194. package/dist/workflow/implement/resource-check/rules/markdown-format/index.d.ts.map +1 -0
  195. package/dist/workflow/implement/resource-check/rules/markdown-format/index.js +38 -0
  196. package/dist/workflow/implement/resource-check/rules/markdown-format/index.js.map +1 -0
  197. package/dist/workflow/implement/resource-check/rules/markdown-format/line-length-rule.d.ts +15 -0
  198. package/dist/workflow/implement/resource-check/rules/markdown-format/line-length-rule.d.ts.map +1 -0
  199. package/dist/workflow/implement/resource-check/rules/markdown-format/line-length-rule.js +77 -0
  200. package/dist/workflow/implement/resource-check/rules/markdown-format/line-length-rule.js.map +1 -0
  201. package/dist/workflow/implement/resource-check/rules/markdown-format/number-format-rule.d.ts +23 -0
  202. package/dist/workflow/implement/resource-check/rules/markdown-format/number-format-rule.d.ts.map +1 -0
  203. package/dist/workflow/implement/resource-check/rules/markdown-format/number-format-rule.js +128 -0
  204. package/dist/workflow/implement/resource-check/rules/markdown-format/number-format-rule.js.map +1 -0
  205. package/dist/workflow/implement/resource-check/rules/markdown-format/shared/section-check-result.d.ts +9 -0
  206. package/dist/workflow/implement/resource-check/rules/markdown-format/shared/section-check-result.d.ts.map +1 -0
  207. package/dist/workflow/implement/resource-check/rules/markdown-format/shared/section-check-result.js +19 -0
  208. package/dist/workflow/implement/resource-check/rules/markdown-format/shared/section-check-result.js.map +1 -0
  209. package/dist/workflow/implement/resource-check/rules/markdown-format/title/h1-exists-rule.d.ts +8 -0
  210. package/dist/workflow/implement/resource-check/rules/markdown-format/title/h1-exists-rule.d.ts.map +1 -0
  211. package/dist/workflow/implement/resource-check/rules/markdown-format/title/h1-exists-rule.js +44 -0
  212. package/dist/workflow/implement/resource-check/rules/markdown-format/title/h1-exists-rule.js.map +1 -0
  213. package/dist/workflow/implement/resource-check/rules/markdown-format/total/blank-line-between-blocks-rule.d.ts +9 -0
  214. package/dist/workflow/implement/resource-check/rules/markdown-format/total/blank-line-between-blocks-rule.d.ts.map +1 -0
  215. package/dist/workflow/implement/resource-check/rules/markdown-format/total/blank-line-between-blocks-rule.js +80 -0
  216. package/dist/workflow/implement/resource-check/rules/markdown-format/total/blank-line-between-blocks-rule.js.map +1 -0
  217. package/dist/workflow/implement/resource-check/rules/markdown-format/total/line-length-rule.d.ts +15 -0
  218. package/dist/workflow/implement/resource-check/rules/markdown-format/total/line-length-rule.d.ts.map +1 -0
  219. package/dist/workflow/implement/resource-check/rules/markdown-format/total/line-length-rule.js +77 -0
  220. package/dist/workflow/implement/resource-check/rules/markdown-format/total/line-length-rule.js.map +1 -0
  221. package/dist/workflow/implement/resource-check/rules/markdown-format/total/number-format-rule.d.ts +23 -0
  222. package/dist/workflow/implement/resource-check/rules/markdown-format/total/number-format-rule.d.ts.map +1 -0
  223. package/dist/workflow/implement/resource-check/rules/markdown-format/total/number-format-rule.js +128 -0
  224. package/dist/workflow/implement/resource-check/rules/markdown-format/total/number-format-rule.js.map +1 -0
  225. package/dist/workflow/implement/resource-check/rules/markdown-semantic/argument-section-semantic-rule.d.ts +11 -0
  226. package/dist/workflow/implement/resource-check/rules/markdown-semantic/argument-section-semantic-rule.d.ts.map +1 -0
  227. package/dist/workflow/implement/resource-check/rules/markdown-semantic/argument-section-semantic-rule.js +145 -0
  228. package/dist/workflow/implement/resource-check/rules/markdown-semantic/argument-section-semantic-rule.js.map +1 -0
  229. package/dist/workflow/implement/resource-check/rules/markdown-semantic/arguments/argument-section-semantic-rule.d.ts +11 -0
  230. package/dist/workflow/implement/resource-check/rules/markdown-semantic/arguments/argument-section-semantic-rule.d.ts.map +1 -0
  231. package/dist/workflow/implement/resource-check/rules/markdown-semantic/arguments/argument-section-semantic-rule.js +145 -0
  232. package/dist/workflow/implement/resource-check/rules/markdown-semantic/arguments/argument-section-semantic-rule.js.map +1 -0
  233. package/dist/workflow/implement/resource-check/rules/markdown-semantic/attribute-section-semantic-rule.d.ts +9 -0
  234. package/dist/workflow/implement/resource-check/rules/markdown-semantic/attribute-section-semantic-rule.d.ts.map +1 -0
  235. package/dist/workflow/implement/resource-check/rules/markdown-semantic/attribute-section-semantic-rule.js +83 -0
  236. package/dist/workflow/implement/resource-check/rules/markdown-semantic/attribute-section-semantic-rule.js.map +1 -0
  237. package/dist/workflow/implement/resource-check/rules/markdown-semantic/attributes/attribute-section-semantic-rule.d.ts +9 -0
  238. package/dist/workflow/implement/resource-check/rules/markdown-semantic/attributes/attribute-section-semantic-rule.d.ts.map +1 -0
  239. package/dist/workflow/implement/resource-check/rules/markdown-semantic/attributes/attribute-section-semantic-rule.js +83 -0
  240. package/dist/workflow/implement/resource-check/rules/markdown-semantic/attributes/attribute-section-semantic-rule.js.map +1 -0
  241. package/dist/workflow/implement/resource-check/rules/markdown-semantic/index.d.ts +7 -0
  242. package/dist/workflow/implement/resource-check/rules/markdown-semantic/index.d.ts.map +1 -0
  243. package/dist/workflow/implement/resource-check/rules/markdown-semantic/index.js +15 -0
  244. package/dist/workflow/implement/resource-check/rules/markdown-semantic/index.js.map +1 -0
  245. package/dist/workflow/implement/resource-check/rules/markdown-semantic/section-existence-rule.d.ts +9 -0
  246. package/dist/workflow/implement/resource-check/rules/markdown-semantic/section-existence-rule.d.ts.map +1 -0
  247. package/dist/workflow/implement/resource-check/rules/markdown-semantic/section-existence-rule.js +96 -0
  248. package/dist/workflow/implement/resource-check/rules/markdown-semantic/section-existence-rule.js.map +1 -0
  249. package/dist/workflow/implement/resource-check/rules/markdown-semantic/total/section-existence-rule.d.ts +9 -0
  250. package/dist/workflow/implement/resource-check/rules/markdown-semantic/total/section-existence-rule.d.ts.map +1 -0
  251. package/dist/workflow/implement/resource-check/rules/markdown-semantic/total/section-existence-rule.js +109 -0
  252. package/dist/workflow/implement/resource-check/rules/markdown-semantic/total/section-existence-rule.js.map +1 -0
  253. package/dist/workflow/implement/resource-check/rules/stage-placeholder-rule.d.ts +19 -0
  254. package/dist/workflow/implement/resource-check/rules/stage-placeholder-rule.d.ts.map +1 -0
  255. package/dist/workflow/implement/resource-check/rules/stage-placeholder-rule.js +31 -0
  256. package/dist/workflow/implement/resource-check/rules/stage-placeholder-rule.js.map +1 -0
  257. package/dist/workflow/implement/resource-check/tools/doc-semantic/builder.d.ts +15 -0
  258. package/dist/workflow/implement/resource-check/tools/doc-semantic/builder.d.ts.map +1 -0
  259. package/dist/workflow/implement/resource-check/tools/doc-semantic/builder.js +554 -0
  260. package/dist/workflow/implement/resource-check/tools/doc-semantic/builder.js.map +1 -0
  261. package/dist/workflow/implement/resource-check/tools/doc-semantic/index.d.ts +5 -0
  262. package/dist/workflow/implement/resource-check/tools/doc-semantic/index.d.ts.map +1 -0
  263. package/dist/workflow/implement/resource-check/tools/doc-semantic/index.js +16 -0
  264. package/dist/workflow/implement/resource-check/tools/doc-semantic/index.js.map +1 -0
  265. package/dist/workflow/implement/resource-check/tools/doc-semantic/types.d.ts +94 -0
  266. package/dist/workflow/implement/resource-check/tools/doc-semantic/types.d.ts.map +1 -0
  267. package/dist/workflow/implement/resource-check/tools/doc-semantic/types.js +42 -0
  268. package/dist/workflow/implement/resource-check/tools/doc-semantic/types.js.map +1 -0
  269. package/dist/workflow/implement/resource-check/tools/schema-semantic/builder.d.ts +4 -0
  270. package/dist/workflow/implement/resource-check/tools/schema-semantic/builder.d.ts.map +1 -0
  271. package/dist/workflow/implement/resource-check/tools/schema-semantic/builder.js +103 -0
  272. package/dist/workflow/implement/resource-check/tools/schema-semantic/builder.js.map +1 -0
  273. package/dist/workflow/implement/resource-check/tools/schema-semantic/index.d.ts +3 -0
  274. package/dist/workflow/implement/resource-check/tools/schema-semantic/index.d.ts.map +1 -0
  275. package/dist/workflow/implement/resource-check/tools/schema-semantic/index.js +6 -0
  276. package/dist/workflow/implement/resource-check/tools/schema-semantic/index.js.map +1 -0
  277. package/dist/workflow/implement/resource-check/tools/schema-semantic/types.d.ts +47 -0
  278. package/dist/workflow/implement/resource-check/tools/schema-semantic/types.d.ts.map +1 -0
  279. package/dist/workflow/implement/resource-check/tools/schema-semantic/types.js +3 -0
  280. package/dist/workflow/implement/resource-check/tools/schema-semantic/types.js.map +1 -0
  281. package/dist/workflow/implement/resource-check/tools/terraform-schema/index.d.ts +4 -0
  282. package/dist/workflow/implement/resource-check/tools/terraform-schema/index.d.ts.map +1 -0
  283. package/dist/workflow/implement/resource-check/tools/terraform-schema/index.js +8 -0
  284. package/dist/workflow/implement/resource-check/tools/terraform-schema/index.js.map +1 -0
  285. package/dist/workflow/implement/resource-check/tools/terraform-schema/schema-extractor.d.ts +108 -0
  286. package/dist/workflow/implement/resource-check/tools/terraform-schema/schema-extractor.d.ts.map +1 -0
  287. package/dist/workflow/implement/resource-check/tools/terraform-schema/schema-extractor.js +498 -0
  288. package/dist/workflow/implement/resource-check/tools/terraform-schema/schema-extractor.js.map +1 -0
  289. package/dist/workflow/implement/resource-check/tools/terraform-schema/semantic-normalizer.d.ts +51 -0
  290. package/dist/workflow/implement/resource-check/tools/terraform-schema/semantic-normalizer.d.ts.map +1 -0
  291. package/dist/workflow/implement/resource-check/tools/terraform-schema/semantic-normalizer.js +271 -0
  292. package/dist/workflow/implement/resource-check/tools/terraform-schema/semantic-normalizer.js.map +1 -0
  293. package/dist/workflow/implement/resource-check/tools/terraform-schema/types.d.ts +133 -0
  294. package/dist/workflow/implement/resource-check/tools/terraform-schema/types.d.ts.map +1 -0
  295. package/dist/workflow/implement/resource-check/tools/terraform-schema/types.js +3 -0
  296. package/dist/workflow/implement/resource-check/tools/terraform-schema/types.js.map +1 -0
  297. package/dist/workflow/implement/resource-check/types.d.ts +18 -0
  298. package/dist/workflow/implement/resource-check/types.d.ts.map +1 -0
  299. package/dist/workflow/implement/resource-check/types.js +107 -0
  300. package/dist/workflow/implement/resource-check/types.js.map +1 -0
  301. package/dist/workflow/types/rule/rule.d.ts +72 -0
  302. package/dist/workflow/types/rule/rule.d.ts.map +1 -0
  303. package/dist/workflow/types/rule/rule.js +110 -0
  304. package/dist/workflow/types/rule/rule.js.map +1 -0
  305. package/dist/workflow/workflow.d.ts +52 -0
  306. package/dist/workflow/workflow.d.ts.map +1 -0
  307. package/dist/workflow/workflow.js +121 -0
  308. package/dist/workflow/workflow.js.map +1 -0
  309. package/package.json +36 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-existence-rule.d.ts","sourceRoot":"","sources":["../../../../../../src/workflow/implement/resource-check/rules/markdown-semantic/section-existence-rule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAiB,MAAM,6BAA6B,CAAC;AACnF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAyD3D,qBAAa,oBAAqB,SAAQ,IAAI;IAC1C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwB;;IAMlC,IAAI,CACb,KAAK,EAAE,MAAM,EACb,GAAG,CAAC,EAAE,OAAO,EACb,SAAS,CAAC,EAAE,OAAO,GACpB,OAAO,CAAC,eAAe,EAAE,CAAC;IA0D7B,OAAO,CAAC,cAAc;CAmCzB"}
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SectionExistenceRule = void 0;
4
+ const markdown_1 = require("../../../../../tools/ast-parser/markdown");
5
+ const rule_1 = require("../../../../types/rule/rule");
6
+ const context_keys_1 = require("../../context-keys");
7
+ const SECTION_EXPECTATIONS = [
8
+ {
9
+ title: "Argument Reference",
10
+ level: 2,
11
+ shouldExist: (v) => v.arguments.size > 0,
12
+ reason: (v) => `schema has ${v.arguments.size} argument(s)`,
13
+ introLine: "The following arguments are supported:",
14
+ },
15
+ {
16
+ title: "Attribute Reference",
17
+ level: 2,
18
+ shouldExist: (v) => v.attributes.size > 0,
19
+ reason: (v) => `schema has ${v.attributes.size} attribute(s)`,
20
+ introLine: "In addition to all arguments above, the following attributes are exported:",
21
+ },
22
+ {
23
+ title: "Timeouts",
24
+ level: 2,
25
+ shouldExist: (v) => v.timeouts !== null,
26
+ reason: () => "schema defines timeouts",
27
+ },
28
+ {
29
+ title: "Import",
30
+ level: 2,
31
+ shouldExist: (v) => v.importInfo.importable,
32
+ reason: () => "schema is importable",
33
+ },
34
+ ];
35
+ const META = {
36
+ name: "section-existence",
37
+ description: "Markdown sections must exist if and only if the schema has corresponding data",
38
+ messages: {
39
+ missing: (title, reason) => `Section "## ${title}" is missing but expected: ${reason}.`,
40
+ unexpected: (title) => `Section "## ${title}" exists but has no corresponding schema data.`,
41
+ introMismatch: (title, expected, actual) => `Section "## ${title}" intro line should be "${expected}" but found "${actual}".`,
42
+ introMissing: (title, expected) => `Section "## ${title}" is missing the required intro line: "${expected}".`,
43
+ },
44
+ };
45
+ class SectionExistenceRule extends rule_1.Rule {
46
+ constructor() {
47
+ super(META, "markdown");
48
+ this.parser = new markdown_1.MarkdownParser();
49
+ }
50
+ async test(_code, ast, parentCtx) {
51
+ if (!ast || !parentCtx) {
52
+ return [rule_1.RuleCheckResult.pass("AST or context unavailable, rule skipped")];
53
+ }
54
+ const view = parentCtx.get(context_keys_1.CTX_SCHEMA_SEMANTIC_VIEW);
55
+ if (!view) {
56
+ return [rule_1.RuleCheckResult.pass("Schema semantic view unavailable, rule skipped")];
57
+ }
58
+ const doc = ast;
59
+ const results = [];
60
+ for (const expectation of SECTION_EXPECTATIONS) {
61
+ const section = this.parser.getSection(doc, expectation.level, expectation.title);
62
+ const exists = section !== null && section !== undefined;
63
+ const expected = expectation.shouldExist(view);
64
+ if (expected && !exists) {
65
+ results.push(this.fail("missing", "", undefined, undefined, expectation.title, expectation.reason(view)));
66
+ }
67
+ else if (!expected && exists) {
68
+ const startLine = section?.[0]?.sourceRange?.start.line;
69
+ results.push(this.fail("unexpected", "", undefined, rule_1.RuleCheckResult.fromLine(startLine), expectation.title));
70
+ }
71
+ else if (expected && exists && expectation.introLine) {
72
+ const introResult = this.checkIntroLine(section, expectation.title, expectation.introLine);
73
+ results.push(introResult);
74
+ }
75
+ else {
76
+ const label = expected ? "present as expected" : "absent as expected";
77
+ results.push(rule_1.RuleCheckResult.pass(`Section "## ${expectation.title}" is ${label}`));
78
+ }
79
+ }
80
+ return results;
81
+ }
82
+ checkIntroLine(sectionNodes, title, expectedIntro) {
83
+ const firstParagraph = sectionNodes.find((n) => n.type === "paragraph");
84
+ if (!firstParagraph) {
85
+ return this.fail("introMissing", "", undefined, undefined, title, expectedIntro);
86
+ }
87
+ const actualText = this.parser.getTextContent(firstParagraph).trim();
88
+ if (actualText === expectedIntro) {
89
+ return rule_1.RuleCheckResult.pass(`Section "## ${title}" is present with correct intro line`);
90
+ }
91
+ const startLine = firstParagraph.sourceRange?.start.line;
92
+ return this.fail("introMismatch", "", undefined, rule_1.RuleCheckResult.fromLine(startLine), title, expectedIntro, actualText);
93
+ }
94
+ }
95
+ exports.SectionExistenceRule = SectionExistenceRule;
96
+ //# sourceMappingURL=section-existence-rule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-existence-rule.js","sourceRoot":"","sources":["../../../../../../src/workflow/implement/resource-check/rules/markdown-semantic/section-existence-rule.ts"],"names":[],"mappings":";;;AACA,uEAA0E;AAC1E,sDAAmF;AAGnF,qDAA8D;AAU9D,MAAM,oBAAoB,GAAyB;IAC/C;QACI,KAAK,EAAE,oBAAoB;QAC3B,KAAK,E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,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,IAAI,EAAE,CAAC;QACrE,IAAI,UAAU,KAAK,aAAa,EAAE,CAAC;YAC/B,OAAO,sBAAe,CAAC,IAAI,CACvB,eAAe,KAAK,sCAAsC,CAC7D,CAAC;QACN,CAAC;QAED,MAAM,SAAS,GAAG,cAAc,CAAC,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC;QACzD,OAAO,IAAI,CAAC,IAAI,CACZ,eAAe,EACf,EAAE,EACF,SAAS,EACT,sBAAe,CAAC,QAAQ,CAAC,SAAS,CAAC,EACnC,KAAK,EACL,aAAa,EACb,UAAU,CACb,CAAC;IACN,CAAC;CACJ;AAxGD,oDAwGC"}
@@ -0,0 +1,9 @@
1
+ import { Rule, RuleCheckResult } from "../../../../../types/rule/rule";
2
+ import type { Context } from "../../../../../context/context";
3
+ export declare class SectionExistenceRule extends Rule {
4
+ private readonly parser;
5
+ constructor();
6
+ test(_code: string, ast?: unknown, parentCtx?: Context): Promise<RuleCheckResult[]>;
7
+ private checkIntroLine;
8
+ }
9
+ //# sourceMappingURL=section-existence-rule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-existence-rule.d.ts","sourceRoot":"","sources":["../../../../../../../src/workflow/implement/resource-check/rules/markdown-semantic/total/section-existence-rule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAiB,MAAM,gCAAgC,CAAC;AACtF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAkE9D,qBAAa,oBAAqB,SAAQ,IAAI;IAC1C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwB;;IAMlC,IAAI,CACb,KAAK,EAAE,MAAM,EACb,GAAG,CAAC,EAAE,OAAO,EACb,SAAS,CAAC,EAAE,OAAO,GACpB,OAAO,CAAC,eAAe,EAAE,CAAC;IAmE7B,OAAO,CAAC,cAAc;CAmCzB"}
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SectionExistenceRule = void 0;
4
+ const markdown_1 = require("../../../../../../tools/ast-parser/markdown");
5
+ const rule_1 = require("../../../../../types/rule/rule");
6
+ const context_keys_1 = require("../../../context-keys");
7
+ const SECTION_EXPECTATIONS = [
8
+ {
9
+ title: "Argument Reference",
10
+ level: 2,
11
+ shouldExist: (v) => v.arguments.size > 0,
12
+ reason: (v) => `schema has ${v.arguments.size} argument(s)`,
13
+ schemaFields: (v) => [...v.arguments.keys()],
14
+ docFields: (d) => d.argumentLists.flatMap((l) => l.arguments.map((a) => a.name)),
15
+ introLine: "The following arguments are supported:",
16
+ },
17
+ {
18
+ title: "Attribute Reference",
19
+ level: 2,
20
+ shouldExist: (v) => v.attributes.size > 0,
21
+ reason: (v) => `schema has ${v.attributes.size} attribute(s)`,
22
+ schemaFields: (v) => [...v.attributes.keys()],
23
+ docFields: (d) => d.attributeLists.flatMap((l) => l.attributes.map((a) => a.name)),
24
+ introLine: "In addition to all arguments above, the following attributes are exported:",
25
+ },
26
+ {
27
+ title: "Timeouts",
28
+ level: 2,
29
+ shouldExist: (v) => v.timeouts !== null,
30
+ reason: () => "schema defines timeouts",
31
+ },
32
+ {
33
+ title: "Import",
34
+ level: 2,
35
+ shouldExist: (v) => v.importInfo.importable,
36
+ reason: () => "schema is importable",
37
+ },
38
+ ];
39
+ const META = {
40
+ name: "section-existence",
41
+ description: "Markdown sections must exist if and only if the schema has corresponding data",
42
+ messages: {
43
+ missing: (title, reason, fields) => `Section "## ${title}" is missing but expected: ${reason}.` +
44
+ (fields ? ` Schema fields: [${fields}]` : ""),
45
+ unexpected: (title, fields) => `Section "## ${title}" exists but has no corresponding schema data.` +
46
+ (fields ? ` Doc fields to remove: [${fields}]` : ""),
47
+ introMismatch: (title, expected, actual) => `Section "## ${title}" intro line should be "${expected}" but found "${actual}".`,
48
+ introMissing: (title, expected) => `Section "## ${title}" is missing the required intro line: "${expected}".`,
49
+ },
50
+ };
51
+ class SectionExistenceRule extends rule_1.Rule {
52
+ constructor() {
53
+ super(META, "markdown");
54
+ this.parser = new markdown_1.MarkdownParser();
55
+ }
56
+ async test(_code, ast, parentCtx) {
57
+ if (!ast || !parentCtx) {
58
+ return [rule_1.RuleCheckResult.pass("AST or context unavailable, rule skipped")];
59
+ }
60
+ const view = parentCtx.get(context_keys_1.CTX_SCHEMA_SEMANTIC_VIEW);
61
+ if (!view) {
62
+ return [rule_1.RuleCheckResult.pass("Schema semantic view unavailable, rule skipped")];
63
+ }
64
+ const docView = parentCtx.get(context_keys_1.CTX_DOC_SEMANTIC_VIEW);
65
+ const doc = ast;
66
+ const results = [];
67
+ for (const expectation of SECTION_EXPECTATIONS) {
68
+ const section = this.parser.getSection(doc, expectation.level, expectation.title);
69
+ const exists = section !== null && section !== undefined;
70
+ const expected = expectation.shouldExist(view);
71
+ if (expected && !exists) {
72
+ const schemaFieldList = expectation.schemaFields
73
+ ? expectation.schemaFields(view).join(", ")
74
+ : "";
75
+ results.push(this.fail("missing", "", undefined, undefined, expectation.title, expectation.reason(view), schemaFieldList));
76
+ }
77
+ else if (!expected && exists) {
78
+ const startLine = section?.[0]?.sourceRange?.start.line;
79
+ const docFieldList = (expectation.docFields && docView)
80
+ ? expectation.docFields(docView).join(", ")
81
+ : "";
82
+ results.push(this.fail("unexpected", "", undefined, rule_1.RuleCheckResult.fromLine(startLine), expectation.title, docFieldList));
83
+ }
84
+ else if (expected && exists && expectation.introLine) {
85
+ const introResult = this.checkIntroLine(section, expectation.title, expectation.introLine);
86
+ results.push(introResult);
87
+ }
88
+ else {
89
+ const label = expected ? "present as expected" : "absent as expected";
90
+ results.push(rule_1.RuleCheckResult.pass(`Section "## ${expectation.title}" is ${label}`));
91
+ }
92
+ }
93
+ return results;
94
+ }
95
+ checkIntroLine(sectionNodes, title, expectedIntro) {
96
+ const firstParagraph = sectionNodes.find((n) => n.type === "paragraph");
97
+ if (!firstParagraph) {
98
+ return this.fail("introMissing", "", undefined, undefined, title, expectedIntro);
99
+ }
100
+ const actualText = this.parser.getTextContent(firstParagraph).trim();
101
+ if (actualText === expectedIntro) {
102
+ return rule_1.RuleCheckResult.pass(`Section "## ${title}" is present with correct intro line`);
103
+ }
104
+ const startLine = firstParagraph.sourceRange?.start.line;
105
+ return this.fail("introMismatch", "", undefined, rule_1.RuleCheckResult.fromLine(startLine), title, expectedIntro, actualText);
106
+ }
107
+ }
108
+ exports.SectionExistenceRule = SectionExistenceRule;
109
+ //# sourceMappingURL=section-existence-rule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-existence-rule.js","sourceRoot":"","sources":["../../../../../../../src/workflow/implement/resource-check/rules/markdown-semantic/total/section-existence-rule.ts"],"names":[],"mappings":";;;AACA,0EAA6E;AAC7E,yDAAsF;AAItF,wDAAwF;AAYxF,MAAM,oBAAoB,GAAyB;IAC/C;QACI,KAAK,EAAE,oBAAoB;QAC3B,KAAK,EAAE,CAAC;QACR,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC;QACxC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,SAAS,CAAC,IAAI,cAAc;QAC3D,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QAC5C,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAChF,SAAS,EAAE,wCAAwC;KACtD;IACD;QACI,KAAK,EAAE,qBAAqB;QAC5B,KAAK,EAAE,CAAC;QACR,WAAW,EAAE,CAAC,CAA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AAC,WAAW,CAAC,CAAC;YAC9B,CAAC;iBAAM,CAAC;gBACJ,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,oBAAoB,CAAC;gBACtE,OAAO,CAAC,IAAI,CACR,sBAAe,CAAC,IAAI,CAChB,eAAe,WAAW,CAAC,KAAK,QAAQ,KAAK,EAAE,CAClD,CACJ,CAAC;YACN,CAAC;QACL,CAAC;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;IAEO,cAAc,CAClB,YAA4B,EAC5B,KAAa,EACb,aAAqB;QAErB,MAAM,cAAc,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC;QACxE,IAAI,CAAC,cAAc,EAAE,CAAC;YAClB,OAAO,IAAI,CAAC,IAAI,CACZ,cAAc,EACd,EAAE,EACF,SAAS,EACT,SAAS,EACT,KAAK,EACL,aAAa,CAChB,CAAC;QACN,CAAC;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,IAAI,EAAE,CAAC;QACrE,IAAI,UAAU,KAAK,aAAa,EAAE,CAAC;YAC/B,OAAO,sBAAe,CAAC,IAAI,CACvB,eAAe,KAAK,sCAAsC,CAC7D,CAAC;QACN,CAAC;QAED,MAAM,SAAS,GAAG,cAAc,CAAC,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC;QACzD,OAAO,IAAI,CAAC,IAAI,CACZ,eAAe,EACf,EAAE,EACF,SAAS,EACT,sBAAe,CAAC,QAAQ,CAAC,SAAS,CAAC,EACnC,KAAK,EACL,aAAa,EACb,UAAU,CACb,CAAC;IACN,CAAC;CACJ;AAjHD,oDAiHC"}
@@ -0,0 +1,19 @@
1
+ import { Rule, RuleCheckResult } from "../../../types/rule/rule";
2
+ import type { Context } from "../../../context/context";
3
+ export interface StagePlaceholderOptions {
4
+ name: string;
5
+ description: string;
6
+ message: string;
7
+ success?: boolean;
8
+ rangeLine?: number;
9
+ }
10
+ /**
11
+ * Placeholder rule used during staged resource-check flow.
12
+ * Keeps the report contract stable while real checks are pending.
13
+ */
14
+ export declare class StagePlaceholderRule extends Rule {
15
+ private readonly opts;
16
+ constructor(opts: StagePlaceholderOptions);
17
+ test(_code: string, _ast?: unknown, _parentCtx?: Context): Promise<RuleCheckResult[]>;
18
+ }
19
+ //# sourceMappingURL=stage-placeholder-rule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stage-placeholder-rule.d.ts","sourceRoot":"","sources":["../../../../../src/workflow/implement/resource-check/rules/stage-placeholder-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAY,MAAM,0BAA0B,CAAC;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAExD,MAAM,WAAW,uBAAuB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAUD;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,IAAI;IAC1C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA0B;gBAEnC,IAAI,EAAE,uBAAuB;IAK5B,IAAI,CACb,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,OAAO,EACd,UAAU,CAAC,EAAE,OAAO,GACrB,OAAO,CAAC,eAAe,EAAE,CAAC;CAShC"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StagePlaceholderRule = void 0;
4
+ const rule_1 = require("../../../types/rule/rule");
5
+ function createMeta(opts) {
6
+ return {
7
+ name: opts.name,
8
+ description: opts.description,
9
+ messages: { result: opts.message },
10
+ };
11
+ }
12
+ /**
13
+ * Placeholder rule used during staged resource-check flow.
14
+ * Keeps the report contract stable while real checks are pending.
15
+ */
16
+ class StagePlaceholderRule extends rule_1.Rule {
17
+ constructor(opts) {
18
+ super(createMeta(opts), "code");
19
+ this.opts = opts;
20
+ }
21
+ async test(_code, _ast, _parentCtx) {
22
+ const success = this.opts.success ?? true;
23
+ const range = rule_1.RuleCheckResult.fromLine(this.opts.rangeLine ?? 1);
24
+ if (success) {
25
+ return [rule_1.RuleCheckResult.pass(this.msg("result"), range)];
26
+ }
27
+ return [this.fail("result", "", undefined, range)];
28
+ }
29
+ }
30
+ exports.StagePlaceholderRule = StagePlaceholderRule;
31
+ //# sourceMappingURL=stage-placeholder-rule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stage-placeholder-rule.js","sourceRoot":"","sources":["../../../../../src/workflow/implement/resource-check/rules/stage-placeholder-rule.ts"],"names":[],"mappings":";;;AAAA,mDAA2E;AAW3E,SAAS,UAAU,CAAC,IAA6B;IAC7C,OAAO;QACH,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,QAAQ,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE;KACrC,CAAC;AACN,CAAC;AAED;;;GAGG;AACH,MAAa,oBAAqB,SAAQ,WAAI;IAG1C,YAAY,IAA6B;QACrC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IAEM,KAAK,CAAC,IAAI,CACb,KAAa,EACb,IAAc,EACd,UAAoB;QAEpB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC;QAC1C,MAAM,KAAK,GAAG,sBAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC;QAEjE,IAAI,OAAO,EAAE,CAAC;YACV,OAAO,CAAC,sBAAe,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;QAC7D,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;IACvD,CAAC;CACJ;AArBD,oDAqBC"}
@@ -0,0 +1,15 @@
1
+ import { MarkdownParser, type MarkdownNode } from "../../../../../tools/ast-parser/markdown";
2
+ import { LinePattern } from "../../../../../tools/line-pattern";
3
+ import type { ArgumentList, AttributeList, BuildDiagnostic, DocBlockView, ExampleList, FrontMatter, Import, TimeOut, Title } from "./types";
4
+ import { DocSemanticView } from "./types";
5
+ export declare const ARG_BULLET_PATTERN: LinePattern;
6
+ export declare const ATTR_BULLET_PATTERN: LinePattern;
7
+ export declare function buildDocSemanticView(ast: MarkdownNode, source: string, parser?: MarkdownParser): DocSemanticView;
8
+ export declare function buildFrontMatter(parser: MarkdownParser, ast: MarkdownNode, diagnostics: BuildDiagnostic[]): DocBlockView<FrontMatter> | null;
9
+ export declare function buildTitle(parser: MarkdownParser, ast: MarkdownNode, diagnostics: BuildDiagnostic[]): DocBlockView<Title> | null;
10
+ export declare function buildExampleList(parser: MarkdownParser, ast: MarkdownNode, diagnostics: BuildDiagnostic[]): DocBlockView<ExampleList> | null;
11
+ export declare function buildArgumentList(parser: MarkdownParser, ast: MarkdownNode, source: string, diagnostics: BuildDiagnostic[]): DocBlockView<ArgumentList> | null;
12
+ export declare function buildAttributeList(parser: MarkdownParser, ast: MarkdownNode, source: string, diagnostics: BuildDiagnostic[]): DocBlockView<AttributeList> | null;
13
+ export declare function buildImport(parser: MarkdownParser, ast: MarkdownNode, diagnostics: BuildDiagnostic[]): DocBlockView<Import>;
14
+ export declare function buildTimeOut(parser: MarkdownParser, ast: MarkdownNode, source: string, diagnostics: BuildDiagnostic[]): DocBlockView<TimeOut> | null;
15
+ //# sourceMappingURL=builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../../../../src/workflow/implement/resource-check/tools/doc-semantic/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,EACd,KAAK,YAAY,EAEpB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACH,WAAW,EAMd,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAER,YAAY,EAEZ,aAAa,EACb,eAAe,EAGf,YAAY,EAEZ,WAAW,EACX,WAAW,EACX,MAAM,EAEN,OAAO,EACP,KAAK,EACR,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAM1C,eAAO,MAAM,kBAAkB,aAa7B,CAAC;AAEH,eAAO,MAAM,mBAAmB,aAO9B,CAAC;AAEH,wBAAgB,oBAAoB,CAChC,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,cAAqC,GAC9C,eAAe,CAyBjB;AAED,wBAAgB,gBAAgB,CAC5B,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,YAAY,EACjB,WAAW,EAAE,eAAe,EAAE,GAC/B,YAAY,CAAC,WAAW,CAAC,GAAG,IAAI,CAuBlC;AAED,wBAAgB,UAAU,CACtB,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,YAAY,EACjB,WAAW,EAAE,eAAe,EAAE,GAC/B,YAAY,CAAC,KAAK,CAAC,GAAG,IAAI,CAoC5B;AAED,wBAAgB,gBAAgB,CAC5B,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,YAAY,EACjB,WAAW,EAAE,eAAe,EAAE,GAC/B,YAAY,CAAC,WAAW,CAAC,GAAG,IAAI,CA0ClC;AAED,wBAAgB,iBAAiB,CAC7B,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,eAAe,EAAE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