@zxyycom/vibe-check 0.0.2 → 0.0.3

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 (670) hide show
  1. package/README.md +36 -5
  2. package/dist/esm/check/check.mjs +4 -0
  3. package/dist/esm/check/check.mjs.map +1 -1
  4. package/dist/esm/check/flag-enablement.mjs +32 -0
  5. package/dist/esm/check/flag-enablement.mjs.map +1 -0
  6. package/dist/esm/check/handoff-provider-identity.mjs +18 -0
  7. package/dist/esm/check/handoff-provider-identity.mjs.map +1 -0
  8. package/dist/esm/check/inherited-collection.mjs +1 -1
  9. package/dist/esm/check/inherited-collection.mjs.map +1 -1
  10. package/dist/esm/check/project-changes.mjs +2 -0
  11. package/dist/esm/check/project-changes.mjs.map +1 -0
  12. package/dist/esm/check/project-context.mjs +2 -0
  13. package/dist/esm/check/project-context.mjs.map +1 -0
  14. package/dist/esm/check-settlement/facts.mjs.map +1 -1
  15. package/dist/esm/check-settlement/record-store.mjs +1 -1
  16. package/dist/esm/check-settlement/record-store.mjs.map +1 -1
  17. package/dist/esm/data-boundary/canonical-data.mjs +36 -7
  18. package/dist/esm/data-boundary/canonical-data.mjs.map +1 -1
  19. package/dist/esm/data-boundary/canonical-json.mjs.map +1 -1
  20. package/dist/esm/data-boundary/closed-values.mjs +28 -4
  21. package/dist/esm/data-boundary/closed-values.mjs.map +1 -1
  22. package/dist/esm/{package-checks/project-files → data-boundary}/config-glob.mjs +3 -3
  23. package/dist/esm/data-boundary/config-glob.mjs.map +1 -0
  24. package/dist/esm/data-boundary/project-path.mjs +19 -0
  25. package/dist/esm/data-boundary/project-path.mjs.map +1 -0
  26. package/dist/esm/index.mjs +12 -5
  27. package/dist/esm/index.mjs.map +1 -1
  28. package/dist/esm/machine-output/v4/atomic-publication.mjs +4 -1
  29. package/dist/esm/machine-output/v4/atomic-publication.mjs.map +1 -1
  30. package/dist/esm/package-checks/check-authoring.mjs +69 -0
  31. package/dist/esm/package-checks/check-authoring.mjs.map +1 -0
  32. package/dist/esm/package-checks/code-quality-findings/finding-waiver-authoring.mjs.map +1 -1
  33. package/dist/esm/package-checks/code-quality-findings/finding-waiver-evidence.mjs.map +1 -1
  34. package/dist/esm/package-checks/command-check/command-check.mjs +55 -0
  35. package/dist/esm/package-checks/command-check/command-check.mjs.map +1 -0
  36. package/dist/esm/package-checks/command-check/contract.mjs +2 -0
  37. package/dist/esm/package-checks/command-check/contract.mjs.map +1 -0
  38. package/dist/esm/package-checks/command-check/execution.mjs +134 -0
  39. package/dist/esm/package-checks/command-check/execution.mjs.map +1 -0
  40. package/dist/esm/package-checks/command-check/options.mjs +284 -0
  41. package/dist/esm/package-checks/command-check/options.mjs.map +1 -0
  42. package/dist/esm/package-checks/command-check/transcript.mjs +26 -0
  43. package/dist/esm/package-checks/command-check/transcript.mjs.map +1 -0
  44. package/dist/esm/package-checks/duplicate-detection/default-check.mjs +9 -11
  45. package/dist/esm/package-checks/duplicate-detection/default-check.mjs.map +1 -1
  46. package/dist/esm/package-checks/duplicate-detection/execution.mjs +2 -4
  47. package/dist/esm/package-checks/duplicate-detection/execution.mjs.map +1 -1
  48. package/dist/esm/package-checks/duplicate-detection/finding-messages.mjs +1 -1
  49. package/dist/esm/package-checks/duplicate-detection/finding-messages.mjs.map +1 -1
  50. package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs +1 -1
  51. package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs.map +1 -1
  52. package/dist/esm/package-checks/duplicate-detection/options.mjs.map +1 -1
  53. package/dist/esm/package-checks/duplicate-detection/records.mjs.map +1 -1
  54. package/dist/esm/package-checks/file-metrics/constructor.mjs +9 -11
  55. package/dist/esm/package-checks/file-metrics/constructor.mjs.map +1 -1
  56. package/dist/esm/package-checks/file-metrics/execution.mjs +2 -4
  57. package/dist/esm/package-checks/file-metrics/execution.mjs.map +1 -1
  58. package/dist/esm/package-checks/file-metrics/finding-messages.mjs +1 -1
  59. package/dist/esm/package-checks/file-metrics/finding-messages.mjs.map +1 -1
  60. package/dist/esm/package-checks/file-metrics/options.mjs.map +1 -1
  61. package/dist/esm/package-checks/file-metrics/records.mjs.map +1 -1
  62. package/dist/esm/package-checks/file-metrics/scc/availability.mjs +1 -1
  63. package/dist/esm/package-checks/file-metrics/scc/availability.mjs.map +1 -1
  64. package/dist/esm/package-checks/file-metrics/scc/batch-planner.mjs +38 -0
  65. package/dist/esm/package-checks/file-metrics/scc/batch-planner.mjs.map +1 -0
  66. package/dist/esm/package-checks/file-metrics/scc/logical-scan-resources.mjs +35 -0
  67. package/dist/esm/package-checks/file-metrics/scc/logical-scan-resources.mjs.map +1 -0
  68. package/dist/esm/package-checks/file-metrics/scc/scanner.mjs +102 -29
  69. package/dist/esm/package-checks/file-metrics/scc/scanner.mjs.map +1 -1
  70. package/dist/esm/package-checks/function-metrics/analysis.mjs +7 -2
  71. package/dist/esm/package-checks/function-metrics/analysis.mjs.map +1 -1
  72. package/dist/esm/package-checks/function-metrics/analyzer/analysis-model.mjs +1 -1
  73. package/dist/esm/package-checks/function-metrics/analyzer/analysis-model.mjs.map +1 -1
  74. package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.mjs +1 -3
  75. package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.mjs.map +1 -1
  76. package/dist/esm/package-checks/function-metrics/analyzer/extensions/protocol.mjs.map +1 -1
  77. package/dist/esm/package-checks/function-metrics/analyzer/pipeline.mjs +3 -2
  78. package/dist/esm/package-checks/function-metrics/analyzer/pipeline.mjs.map +1 -1
  79. package/dist/esm/package-checks/function-metrics/analyzer/readers/erlang.mjs +6 -6
  80. package/dist/esm/package-checks/function-metrics/analyzer/readers/erlang.mjs.map +1 -1
  81. package/dist/esm/package-checks/function-metrics/analyzer/readers/fortran.mjs +1 -1
  82. package/dist/esm/package-checks/function-metrics/analyzer/readers/fortran.mjs.map +1 -1
  83. package/dist/esm/package-checks/function-metrics/analyzer/readers/objc.mjs +9 -3
  84. package/dist/esm/package-checks/function-metrics/analyzer/readers/objc.mjs.map +1 -1
  85. package/dist/esm/package-checks/function-metrics/analyzer/readers/php-states.mjs +12 -7
  86. package/dist/esm/package-checks/function-metrics/analyzer/readers/php-states.mjs.map +1 -1
  87. package/dist/esm/package-checks/function-metrics/analyzer/readers/plsql.mjs +6 -6
  88. package/dist/esm/package-checks/function-metrics/analyzer/readers/plsql.mjs.map +1 -1
  89. package/dist/esm/package-checks/function-metrics/analyzer/readers/python.mjs +5 -3
  90. package/dist/esm/package-checks/function-metrics/analyzer/readers/python.mjs.map +1 -1
  91. package/dist/esm/package-checks/function-metrics/analyzer/readers/r.mjs +2 -0
  92. package/dist/esm/package-checks/function-metrics/analyzer/readers/r.mjs.map +1 -1
  93. package/dist/esm/package-checks/function-metrics/analyzer/readers/ttcn.mjs +9 -3
  94. package/dist/esm/package-checks/function-metrics/analyzer/readers/ttcn.mjs.map +1 -1
  95. package/dist/esm/package-checks/function-metrics/analyzer/readers/typescript.mjs +9 -3
  96. package/dist/esm/package-checks/function-metrics/analyzer/readers/typescript.mjs.map +1 -1
  97. package/dist/esm/package-checks/function-metrics/analyzer/readers/zig.mjs +3 -1
  98. package/dist/esm/package-checks/function-metrics/analyzer/readers/zig.mjs.map +1 -1
  99. package/dist/esm/package-checks/function-metrics/analyzer/shared/code-reader.mjs +3 -1
  100. package/dist/esm/package-checks/function-metrics/analyzer/shared/code-reader.mjs.map +1 -1
  101. package/dist/esm/package-checks/function-metrics/analyzer/shared/js-style-regex.mjs +12 -5
  102. package/dist/esm/package-checks/function-metrics/analyzer/shared/js-style-regex.mjs.map +1 -1
  103. package/dist/esm/package-checks/function-metrics/analyzer-worker-port.mjs +20 -8
  104. package/dist/esm/package-checks/function-metrics/analyzer-worker-port.mjs.map +1 -1
  105. package/dist/esm/package-checks/function-metrics/constructor.mjs +9 -11
  106. package/dist/esm/package-checks/function-metrics/constructor.mjs.map +1 -1
  107. package/dist/esm/package-checks/function-metrics/execution.mjs +2 -4
  108. package/dist/esm/package-checks/function-metrics/execution.mjs.map +1 -1
  109. package/dist/esm/package-checks/function-metrics/finding-messages.mjs +1 -1
  110. package/dist/esm/package-checks/function-metrics/finding-messages.mjs.map +1 -1
  111. package/dist/esm/package-checks/function-metrics/measurement.mjs +3 -1
  112. package/dist/esm/package-checks/function-metrics/measurement.mjs.map +1 -1
  113. package/dist/esm/package-checks/function-metrics/options.mjs.map +1 -1
  114. package/dist/esm/package-checks/function-metrics/records.mjs.map +1 -1
  115. package/dist/esm/package-checks/host-environment/git.mjs +11 -0
  116. package/dist/esm/package-checks/host-environment/git.mjs.map +1 -1
  117. package/dist/esm/package-checks/host-environment/path.mjs +1 -17
  118. package/dist/esm/package-checks/host-environment/path.mjs.map +1 -1
  119. package/dist/esm/package-checks/host-environment/process/contract.mjs.map +1 -1
  120. package/dist/esm/package-checks/host-environment/process/result.mjs +43 -17
  121. package/dist/esm/package-checks/host-environment/process/result.mjs.map +1 -1
  122. package/dist/esm/package-checks/host-environment/process/runner.mjs +7 -5
  123. package/dist/esm/package-checks/host-environment/process/runner.mjs.map +1 -1
  124. package/dist/esm/package-checks/json-schema-validation/default-check.mjs +9 -11
  125. package/dist/esm/package-checks/json-schema-validation/default-check.mjs.map +1 -1
  126. package/dist/esm/package-checks/json-schema-validation/options.mjs.map +1 -1
  127. package/dist/esm/package-checks/json-schema-validation/reference-resolver.mjs +6 -2
  128. package/dist/esm/package-checks/json-schema-validation/reference-resolver.mjs.map +1 -1
  129. package/dist/esm/package-checks/json-schema-validation/schema-policy.mjs +11 -3
  130. package/dist/esm/package-checks/json-schema-validation/schema-policy.mjs.map +1 -1
  131. package/dist/esm/package-checks/json-validation/default-check.mjs +9 -11
  132. package/dist/esm/package-checks/json-validation/default-check.mjs.map +1 -1
  133. package/dist/esm/package-checks/json-validation/options.mjs.map +1 -1
  134. package/dist/esm/package-checks/local-cache-options.mjs +28 -0
  135. package/dist/esm/package-checks/local-cache-options.mjs.map +1 -0
  136. package/dist/esm/package-checks/maintenance-reminders/maintenance-reminders.mjs +37 -45
  137. package/dist/esm/package-checks/maintenance-reminders/maintenance-reminders.mjs.map +1 -1
  138. package/dist/esm/package-checks/maintenance-reminders/maintenance-support.mjs +3 -1
  139. package/dist/esm/package-checks/maintenance-reminders/maintenance-support.mjs.map +1 -1
  140. package/dist/esm/package-checks/markdown-link-validation/default-check.mjs +19 -33
  141. package/dist/esm/package-checks/markdown-link-validation/default-check.mjs.map +1 -1
  142. package/dist/esm/package-checks/markdown-link-validation/execution.mjs +1 -1
  143. package/dist/esm/package-checks/markdown-link-validation/execution.mjs.map +1 -1
  144. package/dist/esm/package-checks/markdown-link-validation/finding-messages.mjs +1 -1
  145. package/dist/esm/package-checks/markdown-link-validation/finding-messages.mjs.map +1 -1
  146. package/dist/esm/package-checks/markdown-link-validation/markdown-parser.mjs +1 -3
  147. package/dist/esm/package-checks/markdown-link-validation/markdown-parser.mjs.map +1 -1
  148. package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs +3 -18
  149. package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs.map +1 -1
  150. package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs +2 -14
  151. package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs.map +1 -1
  152. package/dist/esm/package-checks/markdown-link-validation/options.mjs.map +1 -1
  153. package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache-payload.mjs +4 -5
  154. package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache-payload.mjs.map +1 -1
  155. package/dist/esm/package-checks/markdown-lint/adapter.mjs +125 -0
  156. package/dist/esm/package-checks/markdown-lint/adapter.mjs.map +1 -0
  157. package/dist/esm/package-checks/markdown-lint/default-check.mjs +37 -0
  158. package/dist/esm/package-checks/markdown-lint/default-check.mjs.map +1 -0
  159. package/dist/esm/package-checks/markdown-lint/execution.mjs +202 -0
  160. package/dist/esm/package-checks/markdown-lint/execution.mjs.map +1 -0
  161. package/dist/esm/package-checks/markdown-lint/final-data.mjs +16 -0
  162. package/dist/esm/package-checks/markdown-lint/final-data.mjs.map +1 -0
  163. package/dist/esm/package-checks/markdown-lint/finding-messages.mjs +72 -0
  164. package/dist/esm/package-checks/markdown-lint/finding-messages.mjs.map +1 -0
  165. package/dist/esm/package-checks/markdown-lint/finding-waiver-identity.mjs +41 -0
  166. package/dist/esm/package-checks/markdown-lint/finding-waiver-identity.mjs.map +1 -0
  167. package/dist/esm/package-checks/markdown-lint/findings-cache.mjs +110 -0
  168. package/dist/esm/package-checks/markdown-lint/findings-cache.mjs.map +1 -0
  169. package/dist/esm/package-checks/markdown-lint/options-resolution.mjs +74 -0
  170. package/dist/esm/package-checks/markdown-lint/options-resolution.mjs.map +1 -0
  171. package/dist/esm/package-checks/markdown-lint/options-validation.mjs +41 -0
  172. package/dist/esm/package-checks/markdown-lint/options-validation.mjs.map +1 -0
  173. package/dist/esm/package-checks/markdown-lint/options.mjs +13 -0
  174. package/dist/esm/package-checks/markdown-lint/options.mjs.map +1 -0
  175. package/dist/esm/package-checks/markdown-lint/records.mjs +65 -0
  176. package/dist/esm/package-checks/markdown-lint/records.mjs.map +1 -0
  177. package/dist/esm/package-checks/markdown-lint/unavailable-reasons.mjs +14 -0
  178. package/dist/esm/package-checks/markdown-lint/unavailable-reasons.mjs.map +1 -0
  179. package/dist/esm/package-checks/project-files/collection.mjs +23 -19
  180. package/dist/esm/package-checks/project-files/collection.mjs.map +1 -1
  181. package/dist/esm/package-checks/project-files/configuration.mjs +1 -1
  182. package/dist/esm/package-checks/project-files/configuration.mjs.map +1 -1
  183. package/dist/esm/package-checks/project-files/gitlink-revision.mjs +2 -5
  184. package/dist/esm/package-checks/project-files/gitlink-revision.mjs.map +1 -1
  185. package/dist/esm/package-checks/project-files/gitlink-worktree.mjs +22 -6
  186. package/dist/esm/package-checks/project-files/gitlink-worktree.mjs.map +1 -1
  187. package/dist/esm/package-checks/project-files/public-collection.mjs +1 -1
  188. package/dist/esm/package-checks/project-files/public-collection.mjs.map +1 -1
  189. package/dist/esm/package-checks/project-files/revision-paths.mjs +3 -3
  190. package/dist/esm/package-checks/project-files/revision-paths.mjs.map +1 -1
  191. package/dist/esm/package-checks/project-files/revision-worktree-files.mjs +11 -15
  192. package/dist/esm/package-checks/project-files/revision-worktree-files.mjs.map +1 -1
  193. package/dist/esm/package-checks/secret-detection/default-check.mjs +9 -11
  194. package/dist/esm/package-checks/secret-detection/default-check.mjs.map +1 -1
  195. package/dist/esm/package-checks/secret-detection/execution.mjs +2 -2
  196. package/dist/esm/package-checks/secret-detection/execution.mjs.map +1 -1
  197. package/dist/esm/package-checks/secret-detection/input-preparation.mjs +46 -7
  198. package/dist/esm/package-checks/secret-detection/input-preparation.mjs.map +1 -1
  199. package/dist/esm/package-checks/secret-detection/options.mjs.map +1 -1
  200. package/dist/esm/package-checks/secret-detection/records.mjs.map +1 -1
  201. package/dist/esm/package-checks/secret-detection/secretlint/adapter.mjs +3 -4
  202. package/dist/esm/package-checks/secret-detection/secretlint/adapter.mjs.map +1 -1
  203. package/dist/esm/package-tools/admission-policy/define-admission-policy.mjs +10 -0
  204. package/dist/esm/package-tools/admission-policy/define-admission-policy.mjs.map +1 -0
  205. package/dist/esm/{cache → package-tools/cache}/cache-json-by-key.mjs +13 -14
  206. package/dist/esm/package-tools/cache/cache-json-by-key.mjs.map +1 -0
  207. package/dist/esm/package-tools/finding-presentation/finding-presentation.mjs.map +1 -0
  208. package/dist/esm/{finding-waivers → package-tools/finding-waivers}/reconciliation.mjs +14 -5
  209. package/dist/esm/package-tools/finding-waivers/reconciliation.mjs.map +1 -0
  210. package/dist/esm/package-tools/learned-critical-path/critical-path-ranking.mjs.map +1 -0
  211. package/dist/esm/package-tools/learned-critical-path/duration-model/bounded-history.mjs.map +1 -0
  212. package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/prediction.mjs +2 -2
  213. package/dist/esm/package-tools/learned-critical-path/duration-model/prediction.mjs.map +1 -0
  214. package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/preparation.mjs +4 -2
  215. package/dist/esm/package-tools/learned-critical-path/duration-model/preparation.mjs.map +1 -0
  216. package/dist/esm/package-tools/learned-critical-path/duration-model/recording.mjs.map +1 -0
  217. package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.mjs +8 -8
  218. package/dist/esm/package-tools/learned-critical-path/duration-model/storage.mjs.map +1 -0
  219. package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.mjs +1 -2
  220. package/dist/esm/package-tools/learned-critical-path/selection-layers.mjs.map +1 -0
  221. package/dist/esm/package-tools/learned-critical-path/static-decision.mjs.map +1 -0
  222. package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/strategy.mjs +3 -3
  223. package/dist/esm/package-tools/learned-critical-path/strategy.mjs.map +1 -0
  224. package/dist/esm/project-definition/check-tree/authoring.mjs +8 -5
  225. package/dist/esm/project-definition/check-tree/authoring.mjs.map +1 -1
  226. package/dist/esm/project-definition/check-tree/check-fields-authoring.mjs +79 -66
  227. package/dist/esm/project-definition/check-tree/check-fields-authoring.mjs.map +1 -1
  228. package/dist/esm/project-definition/check-tree/flag-conditions.mjs +71 -0
  229. package/dist/esm/project-definition/check-tree/flag-conditions.mjs.map +1 -0
  230. package/dist/esm/project-definition/check-tree/materialization.mjs +13 -8
  231. package/dist/esm/project-definition/check-tree/materialization.mjs.map +1 -1
  232. package/dist/esm/project-definition/check-tree/resolution.mjs +7 -6
  233. package/dist/esm/project-definition/check-tree/resolution.mjs.map +1 -1
  234. package/dist/esm/project-definition/declarative-snapshot.mjs +2 -1
  235. package/dist/esm/project-definition/declarative-snapshot.mjs.map +1 -1
  236. package/dist/esm/project-definition/project-changes.mjs +70 -0
  237. package/dist/esm/project-definition/project-changes.mjs.map +1 -0
  238. package/dist/esm/project-definition/project-definition-validation.mjs +40 -8
  239. package/dist/esm/project-definition/project-definition-validation.mjs.map +1 -1
  240. package/dist/esm/project-definition/project-definition.mjs +22 -15
  241. package/dist/esm/project-definition/project-definition.mjs.map +1 -1
  242. package/dist/esm/project-definition/scheduler-policy.mjs.map +1 -1
  243. package/dist/esm/project-run/admission-strategy-provider/custom-strategy-preparation.mjs +9 -6
  244. package/dist/esm/project-run/admission-strategy-provider/custom-strategy-preparation.mjs.map +1 -1
  245. package/dist/esm/project-run/admission-strategy-provider/prepared-admission-strategy.mjs.map +1 -1
  246. package/dist/esm/project-run/aggregation.mjs +42 -59
  247. package/dist/esm/project-run/aggregation.mjs.map +1 -1
  248. package/dist/esm/project-run/changes/git.mjs +161 -0
  249. package/dist/esm/project-run/changes/git.mjs.map +1 -0
  250. package/dist/esm/project-run/check-execution/admitted-check-execution.mjs +41 -0
  251. package/dist/esm/project-run/check-execution/admitted-check-execution.mjs.map +1 -0
  252. package/dist/esm/project-run/check-execution/callback.mjs +3 -2
  253. package/dist/esm/project-run/check-execution/callback.mjs.map +1 -1
  254. package/dist/esm/project-run/check-execution/dependencies.mjs +80 -5
  255. package/dist/esm/project-run/check-execution/dependencies.mjs.map +1 -1
  256. package/dist/esm/project-run/check-execution/execution-finalization.mjs +5 -3
  257. package/dist/esm/project-run/check-execution/execution-finalization.mjs.map +1 -1
  258. package/dist/esm/project-run/check-execution/execution-settlement.mjs +37 -16
  259. package/dist/esm/project-run/check-execution/execution-settlement.mjs.map +1 -1
  260. package/dist/esm/project-run/check-execution/flag-controls.mjs +15 -7
  261. package/dist/esm/project-run/check-execution/flag-controls.mjs.map +1 -1
  262. package/dist/esm/project-run/check-execution/lifecycle.mjs.map +1 -1
  263. package/dist/esm/project-run/check-execution/{preflight-result.mjs → preparation-result.mjs} +24 -24
  264. package/dist/esm/project-run/check-execution/preparation-result.mjs.map +1 -0
  265. package/dist/esm/project-run/check-execution/{preflight.mjs → preparation.mjs} +52 -52
  266. package/dist/esm/project-run/check-execution/preparation.mjs.map +1 -0
  267. package/dist/esm/project-run/check-execution/ready-check-execution.mjs +71 -0
  268. package/dist/esm/project-run/check-execution/ready-check-execution.mjs.map +1 -0
  269. package/dist/esm/project-run/check-execution/resolved-checks.mjs +27 -164
  270. package/dist/esm/project-run/check-execution/resolved-checks.mjs.map +1 -1
  271. package/dist/esm/project-run/check-execution/scheduled-check-run.mjs +79 -0
  272. package/dist/esm/project-run/check-execution/scheduled-check-run.mjs.map +1 -0
  273. package/dist/esm/project-run/check-execution/terminal-result.mjs +70 -25
  274. package/dist/esm/project-run/check-execution/terminal-result.mjs.map +1 -1
  275. package/dist/esm/project-run/completion/completion.mjs +18 -1
  276. package/dist/esm/project-run/completion/completion.mjs.map +1 -1
  277. package/dist/esm/project-run/controls/contract.mjs.map +1 -1
  278. package/dist/esm/project-run/controls/validation.mjs +7 -54
  279. package/dist/esm/project-run/controls/validation.mjs.map +1 -1
  280. package/dist/esm/project-run/diagnostic-logging/diagnostic-detail-rendering.mjs +3 -3
  281. package/dist/esm/project-run/diagnostic-logging/diagnostic-detail-rendering.mjs.map +1 -1
  282. package/dist/esm/project-run/diagnostic-logging/observation-rendering.mjs +1 -1
  283. package/dist/esm/project-run/diagnostic-logging/observation-rendering.mjs.map +1 -1
  284. package/dist/esm/project-run/invocation/candidate.mjs +17 -13
  285. package/dist/esm/project-run/invocation/candidate.mjs.map +1 -1
  286. package/dist/esm/project-run/invocation/candidates.mjs +26 -0
  287. package/dist/esm/project-run/invocation/candidates.mjs.map +1 -0
  288. package/dist/esm/project-run/invocation/creation.mjs +7 -3
  289. package/dist/esm/project-run/invocation/creation.mjs.map +1 -1
  290. package/dist/esm/project-run/invocation/execution.mjs +98 -0
  291. package/dist/esm/project-run/invocation/execution.mjs.map +1 -0
  292. package/dist/esm/project-run/invocation/run.mjs +13 -112
  293. package/dist/esm/project-run/invocation/run.mjs.map +1 -1
  294. package/dist/esm/project-run/invocation/scheduler.mjs +13 -6
  295. package/dist/esm/project-run/invocation/scheduler.mjs.map +1 -1
  296. package/dist/esm/project-run/outputs/status.mjs +12 -12
  297. package/dist/esm/project-run/outputs/status.mjs.map +1 -1
  298. package/dist/esm/project-run/progress-rendering/presentation.mjs +31 -11
  299. package/dist/esm/project-run/progress-rendering/presentation.mjs.map +1 -1
  300. package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs +11 -4
  301. package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs.map +1 -1
  302. package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs +20 -6
  303. package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs.map +1 -1
  304. package/dist/esm/project-run/progress-rendering/renderer.mjs +6 -2
  305. package/dist/esm/project-run/progress-rendering/renderer.mjs.map +1 -1
  306. package/dist/esm/project-run/project-context.mjs +2 -1
  307. package/dist/esm/project-run/project-context.mjs.map +1 -1
  308. package/dist/esm/project-run/result.mjs +2 -2
  309. package/dist/esm/project-run/result.mjs.map +1 -1
  310. package/dist/esm/project-run/run.mjs.map +1 -1
  311. package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph-lookup.mjs +45 -0
  312. package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph-lookup.mjs.map +1 -0
  313. package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph.mjs +9 -4
  314. package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph.mjs.map +1 -1
  315. package/dist/esm/project-run/task-scheduler/admission-core/selection-query.mjs +3 -5
  316. package/dist/esm/project-run/task-scheduler/admission-core/selection-query.mjs.map +1 -1
  317. package/dist/esm/project-run/task-scheduler/admission-core/selection-seed.mjs +25 -8
  318. package/dist/esm/project-run/task-scheduler/admission-core/selection-seed.mjs.map +1 -1
  319. package/dist/esm/project-run/task-scheduler/admission-core/selection-transition.mjs +8 -8
  320. package/dist/esm/project-run/task-scheduler/admission-core/selection-transition.mjs.map +1 -1
  321. package/dist/esm/project-run/task-scheduler/execution-state.mjs.map +1 -1
  322. package/dist/esm/project-run/task-scheduler/measurement/diagnostics.mjs +8 -4
  323. package/dist/esm/project-run/task-scheduler/measurement/diagnostics.mjs.map +1 -1
  324. package/dist/esm/project-run/task-scheduler/measurement/timing.mjs +12 -6
  325. package/dist/esm/project-run/task-scheduler/measurement/timing.mjs.map +1 -1
  326. package/dist/esm/project-run/task-scheduler/scheduler-observation.mjs +3 -1
  327. package/dist/esm/project-run/task-scheduler/scheduler-observation.mjs.map +1 -1
  328. package/dist/esm/project-run/task-scheduler/scheduler-terminal-measurement.mjs +17 -17
  329. package/dist/esm/project-run/task-scheduler/scheduler-terminal-measurement.mjs.map +1 -1
  330. package/dist/esm/project-run/task-scheduler/scheduler.mjs +18 -6
  331. package/dist/esm/project-run/task-scheduler/scheduler.mjs.map +1 -1
  332. package/docs/api-mechanics.md +147 -28
  333. package/docs/changelog.md +145 -2
  334. package/docs/checks/duplicate-detection.md +22 -3
  335. package/docs/checks/file-metrics.md +25 -6
  336. package/docs/checks/function-metrics.md +21 -2
  337. package/docs/checks/json-schema-validation.md +25 -4
  338. package/docs/checks/json-validation.md +24 -5
  339. package/docs/checks/maintenance-reminders.md +30 -6
  340. package/docs/checks/markdown-link-validation.md +24 -4
  341. package/docs/checks/markdown-lint.md +167 -0
  342. package/docs/checks/secret-detection.md +31 -7
  343. package/docs/examples/artifacts/mixed-outcomes/definition.ts +10 -10
  344. package/docs/guides/building-project-gate.md +706 -0
  345. package/docs/guides/callbacks.md +81 -22
  346. package/docs/guides/check-dependencies.md +41 -10
  347. package/docs/guides/collecting-project-files.md +7 -7
  348. package/docs/guides/command-check.md +155 -0
  349. package/docs/guides/data-boundaries.md +140 -0
  350. package/docs/guides/extending-check-lifecycle.md +77 -25
  351. package/docs/guides/finding-waivers.md +43 -1
  352. package/docs/guides/learned-scheduling.md +1 -1
  353. package/docs/guides/run-outputs.md +35 -9
  354. package/docs/guides/scheduling.md +15 -15
  355. package/docs/output.md +6 -5
  356. package/package.json +2 -1
  357. package/src/check/check.ts +332 -92
  358. package/src/check/flag-enablement.ts +76 -0
  359. package/src/check/handoff-provider-identity.ts +34 -0
  360. package/src/check/inherited-collection.ts +1 -1
  361. package/src/check/project-changes.ts +14 -0
  362. package/src/check/project-context.ts +11 -0
  363. package/src/check-settlement/facts.ts +1 -1
  364. package/src/check-settlement/record-store.ts +1 -1
  365. package/src/data-boundary/canonical-data.ts +36 -9
  366. package/src/data-boundary/canonical-json.ts +18 -1
  367. package/src/data-boundary/closed-values.ts +26 -6
  368. package/src/data-boundary/config-glob.ts +17 -0
  369. package/src/data-boundary/project-path.ts +21 -0
  370. package/src/index.ts +72 -11
  371. package/src/machine-output/v4/atomic-publication.ts +3 -1
  372. package/src/package-checks/check-authoring.ts +136 -0
  373. package/src/package-checks/code-quality-findings/finding-waiver-authoring.ts +1 -1
  374. package/src/package-checks/code-quality-findings/finding-waiver-evidence.ts +1 -1
  375. package/src/package-checks/command-check/command-check.ts +152 -0
  376. package/src/package-checks/command-check/contract.ts +168 -0
  377. package/src/package-checks/command-check/execution.ts +211 -0
  378. package/src/package-checks/command-check/options.ts +331 -0
  379. package/src/package-checks/command-check/transcript.ts +35 -0
  380. package/src/package-checks/duplicate-detection/default-check.ts +37 -6
  381. package/src/package-checks/duplicate-detection/execution.ts +2 -4
  382. package/src/package-checks/duplicate-detection/finding-messages.ts +2 -2
  383. package/src/package-checks/duplicate-detection/jscpd/availability.ts +1 -1
  384. package/src/package-checks/duplicate-detection/options.ts +6 -3
  385. package/src/package-checks/duplicate-detection/records.ts +1 -1
  386. package/src/package-checks/file-metrics/constructor.ts +29 -6
  387. package/src/package-checks/file-metrics/execution.ts +2 -4
  388. package/src/package-checks/file-metrics/finding-messages.ts +1 -1
  389. package/src/package-checks/file-metrics/options.ts +6 -3
  390. package/src/package-checks/file-metrics/records.ts +1 -1
  391. package/src/package-checks/file-metrics/scc/availability.ts +1 -1
  392. package/src/package-checks/file-metrics/scc/batch-planner.ts +56 -0
  393. package/src/package-checks/file-metrics/scc/logical-scan-resources.ts +59 -0
  394. package/src/package-checks/file-metrics/scc/scanner.ts +134 -32
  395. package/src/package-checks/function-metrics/analysis.ts +7 -2
  396. package/src/package-checks/function-metrics/analyzer/analysis-model.ts +1 -1
  397. package/src/package-checks/function-metrics/analyzer/extension-output.ts +14 -6
  398. package/src/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.ts +1 -3
  399. package/src/package-checks/function-metrics/analyzer/extensions/protocol.ts +3 -3
  400. package/src/package-checks/function-metrics/analyzer/pipeline.ts +4 -2
  401. package/src/package-checks/function-metrics/analyzer/readers/erlang.ts +6 -6
  402. package/src/package-checks/function-metrics/analyzer/readers/fortran.ts +1 -1
  403. package/src/package-checks/function-metrics/analyzer/readers/objc.ts +9 -3
  404. package/src/package-checks/function-metrics/analyzer/readers/php-states.ts +14 -7
  405. package/src/package-checks/function-metrics/analyzer/readers/plsql.ts +8 -4
  406. package/src/package-checks/function-metrics/analyzer/readers/python.ts +4 -3
  407. package/src/package-checks/function-metrics/analyzer/readers/r.ts +2 -1
  408. package/src/package-checks/function-metrics/analyzer/readers/ttcn.ts +9 -3
  409. package/src/package-checks/function-metrics/analyzer/readers/typescript.ts +9 -3
  410. package/src/package-checks/function-metrics/analyzer/readers/zig.ts +2 -1
  411. package/src/package-checks/function-metrics/analyzer/shared/code-reader.ts +3 -1
  412. package/src/package-checks/function-metrics/analyzer/shared/js-style-regex.ts +10 -5
  413. package/src/package-checks/function-metrics/analyzer-worker-port.ts +20 -6
  414. package/src/package-checks/function-metrics/constructor.ts +30 -7
  415. package/src/package-checks/function-metrics/execution.ts +2 -4
  416. package/src/package-checks/function-metrics/finding-messages.ts +2 -2
  417. package/src/package-checks/function-metrics/measurement.ts +3 -1
  418. package/src/package-checks/function-metrics/options.ts +6 -3
  419. package/src/package-checks/function-metrics/records.ts +1 -1
  420. package/src/package-checks/host-environment/git.ts +11 -0
  421. package/src/package-checks/host-environment/path.ts +1 -20
  422. package/src/package-checks/host-environment/process/contract.ts +17 -9
  423. package/src/package-checks/host-environment/process/result.ts +48 -20
  424. package/src/package-checks/host-environment/process/runner.ts +8 -4
  425. package/src/package-checks/json-schema-validation/default-check.ts +38 -5
  426. package/src/package-checks/json-schema-validation/options.ts +4 -1
  427. package/src/package-checks/json-schema-validation/reference-resolver.ts +6 -2
  428. package/src/package-checks/json-schema-validation/schema-policy.ts +10 -5
  429. package/src/package-checks/json-validation/default-check.ts +27 -6
  430. package/src/package-checks/json-validation/options.ts +4 -1
  431. package/src/package-checks/local-cache-options.ts +40 -0
  432. package/src/package-checks/maintenance-reminders/maintenance-reminders.ts +89 -9
  433. package/src/package-checks/maintenance-reminders/maintenance-support.ts +3 -3
  434. package/src/package-checks/markdown-link-validation/default-check.ts +48 -5
  435. package/src/package-checks/markdown-link-validation/execution.ts +1 -1
  436. package/src/package-checks/markdown-link-validation/finding-messages.ts +1 -1
  437. package/src/package-checks/markdown-link-validation/markdown-parser.ts +1 -5
  438. package/src/package-checks/markdown-link-validation/options-resolution.ts +2 -19
  439. package/src/package-checks/markdown-link-validation/options-validation.ts +2 -17
  440. package/src/package-checks/markdown-link-validation/options.ts +6 -7
  441. package/src/package-checks/markdown-link-validation/parse-facts-cache-payload.ts +4 -5
  442. package/src/package-checks/markdown-lint/adapter.ts +167 -0
  443. package/src/package-checks/markdown-lint/default-check.ts +92 -0
  444. package/src/package-checks/markdown-lint/execution.ts +266 -0
  445. package/src/package-checks/markdown-lint/final-data.ts +33 -0
  446. package/src/package-checks/markdown-lint/finding-messages.ts +87 -0
  447. package/src/package-checks/markdown-lint/finding-waiver-identity.ts +54 -0
  448. package/src/package-checks/markdown-lint/findings-cache.ts +141 -0
  449. package/src/package-checks/markdown-lint/options-resolution.ts +102 -0
  450. package/src/package-checks/markdown-lint/options-validation.ts +50 -0
  451. package/src/package-checks/markdown-lint/options.ts +82 -0
  452. package/src/package-checks/markdown-lint/records.ts +132 -0
  453. package/src/package-checks/markdown-lint/unavailable-reasons.ts +33 -0
  454. package/src/package-checks/project-files/collection.ts +38 -22
  455. package/src/package-checks/project-files/config-glob.ts +1 -17
  456. package/src/package-checks/project-files/configuration.ts +1 -1
  457. package/src/package-checks/project-files/gitlink-revision.ts +4 -6
  458. package/src/package-checks/project-files/gitlink-worktree.ts +35 -7
  459. package/src/package-checks/project-files/public-collection.ts +1 -1
  460. package/src/package-checks/project-files/revision-paths.ts +3 -3
  461. package/src/package-checks/project-files/revision-worktree-files.ts +16 -16
  462. package/src/package-checks/secret-detection/default-check.ts +29 -6
  463. package/src/package-checks/secret-detection/execution.ts +2 -2
  464. package/src/package-checks/secret-detection/input-preparation.ts +64 -7
  465. package/src/package-checks/secret-detection/options.ts +5 -2
  466. package/src/package-checks/secret-detection/records.ts +1 -1
  467. package/src/package-checks/secret-detection/secretlint/adapter.ts +3 -4
  468. package/src/package-tools/admission-policy/define-admission-policy.ts +54 -0
  469. package/src/{cache → package-tools/cache}/cache-json-by-key.ts +13 -17
  470. package/src/{check → package-tools/finding-presentation}/finding-presentation.ts +3 -1
  471. package/src/{finding-waivers → package-tools/finding-waivers}/reconciliation.ts +16 -8
  472. package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/prediction.ts +5 -2
  473. package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/preparation.ts +5 -3
  474. package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/recording.ts +5 -4
  475. package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.ts +9 -10
  476. package/src/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.ts +2 -3
  477. package/src/{learned-critical-path → package-tools/learned-critical-path}/static-decision.ts +1 -1
  478. package/src/{learned-critical-path → package-tools/learned-critical-path}/strategy.ts +7 -4
  479. package/src/project-definition/check-tree/authoring.ts +15 -8
  480. package/src/project-definition/check-tree/check-fields-authoring.ts +106 -91
  481. package/src/project-definition/check-tree/flag-conditions.ts +99 -0
  482. package/src/project-definition/check-tree/materialization.ts +12 -8
  483. package/src/project-definition/check-tree/resolution.ts +13 -15
  484. package/src/project-definition/declarative-snapshot.ts +9 -2
  485. package/src/project-definition/project-changes.ts +112 -0
  486. package/src/project-definition/project-definition-validation.ts +58 -10
  487. package/src/project-definition/project-definition.ts +41 -68
  488. package/src/project-definition/scheduler-policy.ts +6 -3
  489. package/src/project-run/admission-strategy-provider/custom-strategy-preparation.ts +11 -8
  490. package/src/project-run/admission-strategy-provider/prepared-admission-strategy.ts +2 -2
  491. package/src/project-run/aggregation.ts +51 -74
  492. package/src/project-run/changes/git.ts +206 -0
  493. package/src/project-run/check-execution/admitted-check-execution.ts +62 -0
  494. package/src/project-run/check-execution/callback.ts +3 -2
  495. package/src/project-run/check-execution/dependencies.ts +120 -6
  496. package/src/project-run/check-execution/execution-finalization.ts +6 -4
  497. package/src/project-run/check-execution/execution-settlement.ts +88 -29
  498. package/src/project-run/check-execution/flag-controls.ts +22 -8
  499. package/src/project-run/check-execution/lifecycle.ts +14 -6
  500. package/src/project-run/check-execution/{preflight-result.ts → preparation-result.ts} +34 -32
  501. package/src/project-run/check-execution/{preflight.ts → preparation.ts} +92 -84
  502. package/src/project-run/check-execution/ready-check-execution.ts +97 -0
  503. package/src/project-run/check-execution/resolved-checks.ts +40 -219
  504. package/src/project-run/check-execution/scheduled-check-run.ts +119 -0
  505. package/src/project-run/check-execution/terminal-result.ts +108 -29
  506. package/src/project-run/completion/completion.ts +17 -3
  507. package/src/project-run/controls/contract.ts +6 -16
  508. package/src/project-run/controls/validation.ts +7 -60
  509. package/src/project-run/diagnostic-logging/diagnostic-detail-rendering.ts +1 -2
  510. package/src/project-run/diagnostic-logging/observation-rendering.ts +1 -1
  511. package/src/project-run/invocation/candidate.ts +28 -15
  512. package/src/project-run/invocation/candidates.ts +56 -0
  513. package/src/project-run/invocation/creation.ts +7 -3
  514. package/src/project-run/invocation/execution.ts +136 -0
  515. package/src/project-run/invocation/run.ts +15 -179
  516. package/src/project-run/invocation/scheduler.ts +13 -6
  517. package/src/project-run/outputs/status.ts +15 -15
  518. package/src/project-run/progress-rendering/presentation.ts +35 -13
  519. package/src/project-run/progress-rendering/renderer-formatting.ts +20 -7
  520. package/src/project-run/progress-rendering/renderer-lifecycle.ts +23 -6
  521. package/src/project-run/progress-rendering/renderer.ts +10 -4
  522. package/src/project-run/project-context.ts +8 -4
  523. package/src/project-run/result.ts +5 -5
  524. package/src/project-run/run.ts +1 -1
  525. package/src/project-run/task-scheduler/admission-core/compiled-graph-lookup.ts +71 -0
  526. package/src/project-run/task-scheduler/admission-core/compiled-graph.ts +9 -4
  527. package/src/project-run/task-scheduler/admission-core/selection-query.ts +6 -4
  528. package/src/project-run/task-scheduler/admission-core/selection-seed.ts +36 -6
  529. package/src/project-run/task-scheduler/admission-core/selection-transition.ts +17 -8
  530. package/src/project-run/task-scheduler/execution-state.ts +4 -4
  531. package/src/project-run/task-scheduler/measurement/diagnostics.ts +10 -4
  532. package/src/project-run/task-scheduler/measurement/timing.ts +13 -5
  533. package/src/project-run/task-scheduler/scheduler-observation.ts +3 -1
  534. package/src/project-run/task-scheduler/scheduler-terminal-measurement.ts +24 -22
  535. package/src/project-run/task-scheduler/scheduler.ts +23 -6
  536. package/types/check/check.d.ts +178 -67
  537. package/types/check/flag-enablement.d.ts +42 -0
  538. package/types/check/handoff-provider-identity.d.ts +12 -0
  539. package/types/check/project-changes.d.ts +13 -0
  540. package/types/check/project-context.d.ts +10 -0
  541. package/types/check-settlement/facts.d.ts +1 -1
  542. package/types/data-boundary/canonical-data.d.ts +28 -5
  543. package/types/data-boundary/canonical-json.d.ts +18 -1
  544. package/types/data-boundary/closed-values.d.ts +17 -1
  545. package/types/data-boundary/config-glob.d.ts +5 -0
  546. package/types/data-boundary/project-path.d.ts +4 -0
  547. package/types/index.d.ts +27 -11
  548. package/types/package-checks/check-authoring.d.ts +45 -0
  549. package/types/package-checks/code-quality-findings/finding-waiver-authoring.d.ts +1 -1
  550. package/types/package-checks/code-quality-findings/finding-waiver-evidence.d.ts +1 -1
  551. package/types/package-checks/command-check/command-check.d.ts +48 -0
  552. package/types/package-checks/command-check/contract.d.ts +108 -0
  553. package/types/package-checks/command-check/execution.d.ts +7 -0
  554. package/types/package-checks/command-check/options.d.ts +11 -0
  555. package/types/package-checks/command-check/transcript.d.ts +8 -0
  556. package/types/package-checks/duplicate-detection/default-check.d.ts +5 -2
  557. package/types/package-checks/duplicate-detection/finding-messages.d.ts +1 -1
  558. package/types/package-checks/duplicate-detection/options.d.ts +4 -3
  559. package/types/package-checks/duplicate-detection/records.d.ts +1 -1
  560. package/types/package-checks/file-metrics/constructor.d.ts +5 -2
  561. package/types/package-checks/file-metrics/options.d.ts +4 -3
  562. package/types/package-checks/file-metrics/records.d.ts +1 -1
  563. package/types/package-checks/file-metrics/scc/batch-planner.d.ts +18 -0
  564. package/types/package-checks/file-metrics/scc/logical-scan-resources.d.ts +14 -0
  565. package/types/package-checks/function-metrics/analyzer/extensions/protocol.d.ts +3 -3
  566. package/types/package-checks/function-metrics/constructor.d.ts +5 -2
  567. package/types/package-checks/function-metrics/finding-messages.d.ts +1 -1
  568. package/types/package-checks/function-metrics/options.d.ts +4 -3
  569. package/types/package-checks/function-metrics/records.d.ts +1 -1
  570. package/types/package-checks/host-environment/git.d.ts +2 -0
  571. package/types/package-checks/host-environment/path.d.ts +1 -3
  572. package/types/package-checks/host-environment/process/contract.d.ts +17 -9
  573. package/types/package-checks/json-schema-validation/default-check.d.ts +4 -1
  574. package/types/package-checks/json-schema-validation/options.d.ts +2 -1
  575. package/types/package-checks/json-validation/default-check.d.ts +4 -1
  576. package/types/package-checks/json-validation/options.d.ts +2 -1
  577. package/types/package-checks/local-cache-options.d.ts +9 -0
  578. package/types/package-checks/maintenance-reminders/maintenance-reminders.d.ts +11 -2
  579. package/types/package-checks/markdown-link-validation/default-check.d.ts +4 -1
  580. package/types/package-checks/markdown-link-validation/options.d.ts +4 -7
  581. package/types/package-checks/markdown-lint/adapter.d.ts +10 -0
  582. package/types/package-checks/markdown-lint/default-check.d.ts +37 -0
  583. package/types/package-checks/markdown-lint/execution.d.ts +24 -0
  584. package/types/package-checks/markdown-lint/final-data.d.ts +8 -0
  585. package/types/package-checks/markdown-lint/finding-messages.d.ts +6 -0
  586. package/types/package-checks/markdown-lint/finding-waiver-identity.d.ts +3 -0
  587. package/types/package-checks/markdown-lint/findings-cache.d.ts +17 -0
  588. package/types/package-checks/markdown-lint/options-resolution.d.ts +3 -0
  589. package/types/package-checks/markdown-lint/options-validation.d.ts +2 -0
  590. package/types/package-checks/markdown-lint/options.d.ts +65 -0
  591. package/types/package-checks/markdown-lint/records.d.ts +39 -0
  592. package/types/package-checks/markdown-lint/unavailable-reasons.d.ts +3 -0
  593. package/types/package-checks/secret-detection/default-check.d.ts +4 -1
  594. package/types/package-checks/secret-detection/options.d.ts +3 -2
  595. package/types/package-tools/admission-policy/define-admission-policy.d.ts +26 -0
  596. package/types/{check → package-tools/finding-presentation}/finding-presentation.d.ts +3 -1
  597. package/types/{finding-waivers → package-tools/finding-waivers}/reconciliation.d.ts +3 -3
  598. package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/prediction.d.ts +2 -2
  599. package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/preparation.d.ts +1 -1
  600. package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/recording.d.ts +1 -1
  601. package/types/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.d.ts +1 -1
  602. package/types/{learned-critical-path → package-tools/learned-critical-path}/static-decision.d.ts +1 -1
  603. package/types/{learned-critical-path → package-tools/learned-critical-path}/strategy.d.ts +1 -1
  604. package/types/project-definition/check-tree/authoring.d.ts +5 -3
  605. package/types/project-definition/check-tree/check-fields-authoring.d.ts +12 -7
  606. package/types/project-definition/check-tree/flag-conditions.d.ts +5 -0
  607. package/types/project-definition/check-tree/resolution.d.ts +6 -4
  608. package/types/project-definition/declarative-snapshot.d.ts +4 -1
  609. package/types/project-definition/project-changes.d.ts +30 -0
  610. package/types/project-definition/project-definition.d.ts +15 -30
  611. package/types/project-definition/scheduler-policy.d.ts +3 -3
  612. package/types/project-run/admission-strategy-provider/prepared-admission-strategy.d.ts +2 -2
  613. package/types/project-run/aggregation.d.ts +8 -6
  614. package/types/project-run/changes/git.d.ts +14 -0
  615. package/types/project-run/check-execution/admitted-check-execution.d.ts +18 -0
  616. package/types/project-run/check-execution/dependencies.d.ts +3 -0
  617. package/types/project-run/check-execution/execution-finalization.d.ts +1 -1
  618. package/types/project-run/check-execution/execution-settlement.d.ts +15 -7
  619. package/types/project-run/check-execution/flag-controls.d.ts +1 -1
  620. package/types/project-run/check-execution/lifecycle.d.ts +9 -5
  621. package/types/project-run/check-execution/{preflight-result.d.ts → preparation-result.d.ts} +3 -3
  622. package/types/project-run/check-execution/{preflight.d.ts → preparation.d.ts} +10 -9
  623. package/types/project-run/check-execution/ready-check-execution.d.ts +18 -0
  624. package/types/project-run/check-execution/resolved-checks.d.ts +12 -13
  625. package/types/project-run/check-execution/scheduled-check-run.d.ts +10 -0
  626. package/types/project-run/check-execution/terminal-result.d.ts +13 -1
  627. package/types/project-run/completion/completion.d.ts +3 -1
  628. package/types/project-run/controls/contract.d.ts +6 -16
  629. package/types/project-run/invocation/candidates.d.ts +8 -0
  630. package/types/project-run/invocation/execution.d.ts +5 -0
  631. package/types/project-run/invocation/run.d.ts +2 -2
  632. package/types/project-run/outputs/status.d.ts +4 -4
  633. package/types/project-run/progress-rendering/presentation.d.ts +4 -3
  634. package/types/project-run/progress-rendering/renderer-formatting.d.ts +5 -2
  635. package/types/project-run/progress-rendering/renderer-lifecycle.d.ts +2 -0
  636. package/types/project-run/progress-rendering/renderer.d.ts +4 -2
  637. package/types/project-run/project-context.d.ts +3 -3
  638. package/types/project-run/result.d.ts +3 -3
  639. package/types/project-run/run.d.ts +1 -1
  640. package/types/project-run/task-scheduler/admission-core/compiled-graph-lookup.d.ts +10 -0
  641. package/types/project-run/task-scheduler/execution-state.d.ts +4 -4
  642. package/types/project-run/task-scheduler/measurement/diagnostics.d.ts +2 -2
  643. package/types/project-run/task-scheduler/scheduler-terminal-measurement.d.ts +1 -1
  644. package/dist/esm/cache/cache-json-by-key.mjs.map +0 -1
  645. package/dist/esm/check/finding-presentation.mjs.map +0 -1
  646. package/dist/esm/finding-waivers/reconciliation.mjs.map +0 -1
  647. package/dist/esm/learned-critical-path/duration-model/bounded-history.mjs.map +0 -1
  648. package/dist/esm/learned-critical-path/duration-model/prediction.mjs.map +0 -1
  649. package/dist/esm/learned-critical-path/duration-model/preparation.mjs.map +0 -1
  650. package/dist/esm/learned-critical-path/duration-model/recording.mjs.map +0 -1
  651. package/dist/esm/learned-critical-path/duration-model/storage.mjs.map +0 -1
  652. package/dist/esm/learned-critical-path/selection-layers.mjs.map +0 -1
  653. package/dist/esm/learned-critical-path/static-decision.mjs.map +0 -1
  654. package/dist/esm/learned-critical-path/strategy.mjs.map +0 -1
  655. package/dist/esm/package-checks/project-files/config-glob.mjs.map +0 -1
  656. package/dist/esm/project-run/check-execution/preflight-result.mjs.map +0 -1
  657. package/dist/esm/project-run/check-execution/preflight.mjs.map +0 -1
  658. package/dist/esm/project-run/task-scheduler/critical-path-ranking.mjs.map +0 -1
  659. package/types/package-checks/project-files/config-glob.d.ts +0 -5
  660. /package/dist/esm/{check → package-tools/finding-presentation}/finding-presentation.mjs +0 -0
  661. /package/dist/esm/{project-run/task-scheduler → package-tools/learned-critical-path}/critical-path-ranking.mjs +0 -0
  662. /package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/bounded-history.mjs +0 -0
  663. /package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/recording.mjs +0 -0
  664. /package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/static-decision.mjs +0 -0
  665. /package/src/{project-run/task-scheduler → package-tools/learned-critical-path}/critical-path-ranking.ts +0 -0
  666. /package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/bounded-history.ts +0 -0
  667. /package/types/{cache → package-tools/cache}/cache-json-by-key.d.ts +0 -0
  668. /package/types/{project-run/task-scheduler → package-tools/learned-critical-path}/critical-path-ranking.d.ts +0 -0
  669. /package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/bounded-history.d.ts +0 -0
  670. /package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.d.ts +0 -0
@@ -1,5 +1,7 @@
1
1
  import type { CanonicalJsonObject, CanonicalJsonValue } from "../data-boundary/canonical-json.ts";
2
2
  import type { InheritableCheckCollection } from "./inherited-collection.ts";
3
+ import type { CheckFlagEnablement } from "./flag-enablement.ts";
4
+ import type { CheckProjectContext } from "./project-context.ts";
3
5
  export { inherit, isInheritedCheckCollection, snapshotInheritedCheckCollection } from "./inherited-collection.ts";
4
6
  export type { InheritCheckCollectionInput, InheritableCheckCollection, InheritedCheckCollection } from "./inherited-collection.ts";
5
7
  /** Check 无法给出 final data 时返回的受控 reason code。 */
@@ -32,26 +34,16 @@ export interface CheckMessage {
32
34
  /** 可附加到每个 {@link CheckResult} branch 的有序 terminal messages。 */
33
35
  export interface CheckResultMessages {
34
36
  /** 省略、`undefined` 或空数组都表示没有 supplemental messages。 */
35
- readonly messages?: readonly CheckMessage[];
37
+ readonly messages?: readonly CheckMessage[] | undefined;
36
38
  }
37
- /** 已结算 Check 在人读 progress 中的可见性。 */
38
- export type CheckVisibility = "always" | "attention";
39
+ type HandoffForbidden = Readonly<{
40
+ readonly handoff?: never;
41
+ }>;
39
42
  /** Check Task 在 admission 到 settlement 期间持有的静态 named resource units。 */
40
43
  export type CheckResourceClaims = Readonly<Record<string, number>>;
41
- /** 多 flag Check 启用条件使用的集合 predicate。 */
42
- export type CheckFlagEnablementMode = "all" | "any" | "none" | "not-all";
43
- /** executable Check 的声明式多 flag 启用条件。 */
44
- export interface CheckFlagEnablement {
45
- /** 非空 flag token 集合;Definition 会去重并稳定排序。 */
46
- readonly flags: readonly [string, ...string[]];
47
- /** 对声明 token 与本次 Run flags 执行的 presence predicate。 */
48
- readonly mode: CheckFlagEnablementMode;
49
- /**
50
- * 条件命中时是否启动本 Check 的传递 `dependsOn` prerequisite;省略时保持只选择直接命中 Check 的兼容行为。
51
- * `observes` 不参与此选择,且 dependency 自己的 flag 条件不会阻止本次已启动的 prerequisite。
52
- */
53
- readonly propagateDependsOn?: true;
54
- }
44
+ export type { CheckFlagCondition, CheckFlagEnablement } from "./flag-enablement.ts";
45
+ export type { ProjectChanges } from "./project-changes.ts";
46
+ export type { CheckProjectContext } from "./project-context.ts";
55
47
  /**
56
48
  * Check callback 的 terminal result。
57
49
  *
@@ -59,27 +51,48 @@ export interface CheckFlagEnablement {
59
51
  * @remarks `not-applicable` 与 `unavailable` 不携带 final data;普通 callback、Record 或取消失败由
60
52
  * Product 转换为 `unavailable`,而不是抛出为 Run 的成功结果。
61
53
  */
62
- export type CheckResult<FinalData extends object = object> = Readonly<({
54
+ export type CheckResult<FinalData extends object = object, Handoff extends object = never> = Readonly<(([Handoff] extends [never] ? {
63
55
  /** Check 已产生通过的 final data。 */
64
56
  readonly status: "passed";
65
57
  /** 此 Check 的主要终态事实。 */
66
58
  readonly data: FinalData;
67
- } | {
59
+ } & HandoffForbidden : {
60
+ /** Check 已产生通过的 final data。 */
61
+ readonly status: "passed";
62
+ /** 此 Check 的主要终态事实。 */
63
+ readonly data: FinalData;
64
+ /** 仅由声明 `handoff: true` 的 provider 交接给 direct dependents 的 reference。 */
65
+ readonly handoff: Handoff;
66
+ }) | ({
68
67
  /** Check 已产生失败的 final data。 */
69
68
  readonly status: "failed";
70
69
  /** 此 Check 的主要终态事实。 */
71
70
  readonly data: FinalData;
72
- } | {
71
+ } & HandoffForbidden) | ({
73
72
  /** Check 在当前 invocation 中不适用。 */
74
73
  readonly status: "not-applicable";
75
74
  /** 不适用的可选受控原因。 */
76
75
  readonly reason?: CheckNotApplicableReason;
77
- } | {
76
+ } & HandoffForbidden) | ({
78
77
  /** Check 不能提供 terminal data。 */
79
78
  readonly status: "unavailable";
80
79
  /** 不可用的受控原因。 */
81
80
  readonly reason: CheckDeclaredUnavailableReason;
82
- }) & CheckResultMessages>;
81
+ } & HandoffForbidden)) & CheckResultMessages>;
82
+ /** Check callback 的同步或异步 terminal result。 */
83
+ type CheckExecutionResult<FinalData extends object = object, Handoff extends object = never> = CheckResult<FinalData, Handoff> | Promise<CheckResult<FinalData, Handoff>>;
84
+ declare const CHECK_HANDOFF_PROVIDER_BRAND: unique symbol;
85
+ /**
86
+ * A Check returned by `defineCheck({ handoff: true })`. The type-only brand lets
87
+ * `dependencies.get(provider)` infer the reference returned by that provider.
88
+ *
89
+ * @internal This is used by public callback types but authors never construct it.
90
+ */
91
+ export type CheckHandoffProvider<Id extends string = string, Handoff extends object = object> = Readonly<{
92
+ readonly checkId: Id;
93
+ readonly handoff: true;
94
+ readonly [CHECK_HANDOFF_PROVIDER_BRAND]: Handoff;
95
+ }>;
83
96
  /** 已 materialize 到 Core snapshot 的 Check terminal outcome。 */
84
97
  export type CheckOutcome = Readonly<{
85
98
  /** 已 materialize 的通过 outcome。 */
@@ -102,10 +115,12 @@ export type CheckOutcome = Readonly<{
102
115
  /** 包含相关 upstream Check IDs 的受控原因。 */
103
116
  readonly reason: CheckUnavailableReason;
104
117
  }>;
105
- /** 将 callback options 转为不可变观察值的递归 utility type。 */
106
- export type DeepReadonly<T> = T extends string | number | boolean | null ? T : T extends readonly (infer Item)[] ? readonly DeepReadonly<Item>[] : T extends object ? {
107
- readonly [Key in keyof T]: DeepReadonly<T[Key]>;
108
- } : never;
118
+ /** 递归只读 Check callback options,同时保留 array/tuple 形状和非 object leaf 类型。 */
119
+ export type DeepReadonly<Value> = Value extends readonly unknown[] ? {
120
+ readonly [Key in keyof Value]: DeepReadonly<Value[Key]>;
121
+ } : Value extends object ? {
122
+ readonly [Key in keyof Value]: DeepReadonly<Value[Key]>;
123
+ } : Value;
109
124
  /** callback 写入 supplemental Record 时的 Check-local identity。 */
110
125
  interface RecordIdentityInput {
111
126
  /** 在当前 Check 内唯一的 Record ID。 */
@@ -146,6 +161,28 @@ export type DependencyReadResult = Readonly<{
146
161
  /** 失败的授权或 upstream-data reason。 */
147
162
  readonly error: DependencyReadError;
148
163
  }>;
164
+ /** `dependsOn` provider-object handoff read 的受控结果。 */
165
+ export type DependencyHandoffReadResult<Id extends string, Handoff extends object> = Readonly<{
166
+ /** 同一 execution graph 中接受的 provider handoff。 */
167
+ readonly ok: true;
168
+ readonly checkId: Id;
169
+ readonly status: "passed";
170
+ /** Core-owned canonical provider final data。 */
171
+ readonly data: CanonicalJsonObject;
172
+ /** Provider 交接且未由 Product clone、freeze 或 serialize 的引用。 */
173
+ readonly handoff: Handoff;
174
+ } | {
175
+ readonly ok: false;
176
+ readonly error: Readonly<{
177
+ /** 当前 Check 未将 provider 声明为 direct `dependsOn`。 */
178
+ readonly code: "dependency-not-declared";
179
+ readonly checkId: string;
180
+ } | {
181
+ /** 已授权 provider 没有与其 Definition-internal identity 对应的已接受 passed handoff。 */
182
+ readonly code: "upstream-handoff-unavailable";
183
+ readonly checkId: string;
184
+ }>;
185
+ }>;
149
186
  /** 当前 Check 的一个已规范化直接 relation 及其完整终态事实。 */
150
187
  export type DependencyObservation = Readonly<{
151
188
  /** 已规范化、稳定排序的 direct relation ID。 */
@@ -155,6 +192,15 @@ export type DependencyObservation = Readonly<{
155
192
  }>;
156
193
  /** 当前 Check 的已规范化直接 relation outcomes 的 data reader。 */
157
194
  export interface CheckDependencies {
195
+ /**
196
+ * Reads a `handoff: true` provider's accepted invocation-private handoff.
197
+ *
198
+ * @returns Only an effective direct `dependsOn` provider declared with `handoff: true`, whose
199
+ * Definition-internal identity has accepted `passed` data, returns canonical data plus its typed
200
+ * reference. `observes`, string IDs, lookalikes and unavailable handoffs fail closed without
201
+ * upstream data.
202
+ */
203
+ get<Id extends string, Handoff extends object>(provider: CheckHandoffProvider<Id, Handoff>): DependencyHandoffReadResult<Id, Handoff>;
158
204
  /**
159
205
  * 读取一个直接 relation 的 canonical final data。
160
206
  *
@@ -171,17 +217,10 @@ export interface CheckDependencies {
171
217
  */
172
218
  list(): readonly DependencyObservation[];
173
219
  }
174
- /** callback 可读取的、由 Product 规范化的项目上下文。 */
175
- export interface CheckProjectContext {
176
- /** 本次 Run 使用的绝对项目根目录。 */
177
- readonly root: string;
178
- /** 已去重、排序的 caller-supplied flags。 */
179
- readonly flags: readonly string[];
180
- }
181
220
  /**
182
221
  * Check callback 收到的 Product-owned execution context。
183
222
  *
184
- * @typeParam Options - 此 Check preflight 后传给 execution 的 options shape。
223
+ * @typeParam Options - 此 Check preparation 后传给 execution 的 options shape。
185
224
  */
186
225
  export interface CheckExecutionContext<Options extends object> {
187
226
  /** 当前 Check 的 absolute invocation artifact directory;caller 未授予时为 `null`。 */
@@ -205,20 +244,20 @@ export interface CheckExecutionContext<Options extends object> {
205
244
  * @typeParam Options - callback 从 context 读取的 prepared options shape。
206
245
  * @returns terminal Check result 或其 Promise。
207
246
  */
208
- export type CheckExecution<Options extends object = object> = (this: void, context: CheckExecutionContext<Options>) => CheckResult | Promise<CheckResult>;
247
+ export type CheckExecution<Options extends object = object> = (this: void, context: CheckExecutionContext<Options>) => CheckExecutionResult;
209
248
  /**
210
249
  * 在 Check execution 前,可选地为本次 invocation 准备 options。
211
250
  *
212
- * @remarks `signal` 与同一次 callback execution 使用同一个 cancellation signal;实现应在可等待工作中
213
- * 协作退出,而不是留下悬挂 work。bivariant callback 保持具体 options Check 可进入普通递归 Check
214
- * collection;Product 仍只会用该 Check 自己的 authored options 调用它。精确结果见
215
- * {@link CheckPreflightResult}。
251
+ * @remarks `signal` 与同一次 callback execution 使用同一个 cancellation signal;`project` 与 execution
252
+ * 收到同一个冻结 project context。实现应在可等待工作中协作退出,而不是留下悬挂 work。bivariant callback
253
+ * 保持具体 options Check 可进入普通递归 Check collection;Product 仍只会用该 Check 自己的 authored options 调用它。精确结果见
254
+ * {@link CheckPreparationResult}。
216
255
  */
217
- export type CheckPreflight<AuthoredOptions extends object = object, PreparedOptions extends object = AuthoredOptions> = {
218
- bivarianceHack(this: void, options: DeepReadonly<AuthoredOptions>, signal: AbortSignal): CheckPreflightResult<PreparedOptions> | Promise<CheckPreflightResult<PreparedOptions>>;
256
+ export type CheckPreparation<AuthoredOptions extends object = object, PreparedOptions extends object = AuthoredOptions> = {
257
+ bivarianceHack(this: void, options: DeepReadonly<AuthoredOptions>, signal: AbortSignal, project?: CheckProjectContext): CheckPreparationResult<PreparedOptions> | Promise<CheckPreparationResult<PreparedOptions>>;
219
258
  }["bivarianceHack"];
220
259
  /**
221
- * Check-owned preflight 的判别结果。
260
+ * Check-owned preparation 的判别结果。
222
261
  *
223
262
  * `failure/block` 不允许 fallback,直接以 owning reason 结算为 unavailable;`failure/continue` 必须给出
224
263
  * fallback 并继续 execution。两种进入 execution 的值都只属于本次 invocation,Product canonicalize/freeze
@@ -226,7 +265,7 @@ export type CheckPreflight<AuthoredOptions extends object = object, PreparedOpti
226
265
  * 是 Check-owned diagnostic identity,当前不会单独 materialize 为 outcome,调用方通过 messages 与后续
227
266
  * outcome 观察结果;block 物理上不含 fallback 字段。
228
267
  */
229
- export type CheckPreflightResult<PreparedOptions extends object = object> = Readonly<{
268
+ export type CheckPreparationResult<PreparedOptions extends object = object> = Readonly<{
230
269
  readonly status: "success";
231
270
  readonly preparedOptions: PreparedOptions;
232
271
  readonly messages?: readonly CheckMessage[];
@@ -246,10 +285,10 @@ export type CheckPreflightResult<PreparedOptions extends object = object> = Read
246
285
  * 普通递归 Check authoring value 的共享字段。
247
286
  *
248
287
  * @typeParam AuthoredOptions - Definition 中的 declarative options shape。
249
- * @typeParam PreparedOptions - preflight 后 callback 接收的 invocation-local options shape。
250
- * @remarks 该值可以同时有 `execution` 和 `checks`;只有 executable node 产生 final Check fact。
288
+ * @typeParam PreparedOptions - preparation 后 callback 接收的 invocation-local options shape。
289
+ * @remarks 该值可以同时有 `execute` 和 `checks`;只有 executable node 产生 final Check fact。
251
290
  */
252
- interface CheckBase<AuthoredOptions extends object, PreparedOptions extends object> {
291
+ interface CheckBase<AuthoredOptions extends object, _PreparedOptions extends object> {
253
292
  /** 在 Definition 内唯一的 stable Check ID。 */
254
293
  readonly checkId: string;
255
294
  /** 人读 progress 与 output 使用的非空名称。 */
@@ -258,8 +297,8 @@ interface CheckBase<AuthoredOptions extends object, PreparedOptions extends obje
258
297
  readonly options?: AuthoredOptions;
259
298
  /** 仅当多 flag presence predicate 匹配时启用 executable Check;省略时始终启用。 */
260
299
  readonly enabledByFlags?: CheckFlagEnablement;
261
- /** 可执行节点的 callback;省略时此节点只承载递归 children。 */
262
- execution?(this: void, context: CheckExecutionContext<PreparedOptions>): CheckResult | Promise<CheckResult>;
300
+ /** `true` declares an invocation-private handoff on this executable Check. */
301
+ readonly handoff?: true;
263
302
  /** 继承 scheduling context 的 child Checks,不会单独形成 container result。 */
264
303
  readonly checks?: readonly Check[];
265
304
  /** 必须全部 `passed` 才能开始当前 Check author work 的直接 prerequisite Check IDs。 */
@@ -274,31 +313,43 @@ interface CheckBase<AuthoredOptions extends object, PreparedOptions extends obje
274
313
  readonly mutex?: InheritableCheckCollection<string>;
275
314
  /** 静态 named resource claims;省略时继承,显式 mapping 完整替换。 */
276
315
  readonly resourceClaims?: CheckResourceClaims;
277
- /** 已结算 Check 的人读可见性;可执行节点默认 `always`。 */
278
- readonly visibility?: CheckVisibility;
279
316
  }
317
+ interface ExecutableCheckFields<PreparedOptions extends object, ExecutionResult = CheckExecutionResult> {
318
+ /** 可执行节点的 callback;拥有本字段的节点产生一个 terminal Check fact。 */
319
+ execute(this: void, context: CheckExecutionContext<PreparedOptions>): ExecutionResult;
320
+ /**
321
+ * `true` 时,progress renderer 不保留没有 accepted Record 或 message 的 passed row;运行中与所有保留的
322
+ * 终态 row 都无编号。该 policy 只属于 executable Check,不继承给 child Checks。
323
+ */
324
+ readonly omitQuietPassedRow?: true;
325
+ }
326
+ /** Container 只承载 children 与 scheduling,不能执行或设置 executable presentation policy。 */
327
+ type ContainerCheckFields = Readonly<{
328
+ execute?: never;
329
+ omitQuietPassedRow?: never;
330
+ }>;
280
331
  /**
281
332
  * 判断两个 options shape 是否互相可赋值;互相可赋值时 execution 不需要 preparation 转换。
282
333
  */
283
334
  type HasSameOptionsShape<AuthoredOptions extends object, PreparedOptions extends object> = [
284
335
  AuthoredOptions
285
336
  ] extends [PreparedOptions] ? [PreparedOptions] extends [AuthoredOptions] ? true : false : false;
286
- /** Prepared shape 不同时,preflight 是建立安全转换的必填边界。 */
287
- type CheckPreflightField<AuthoredOptions extends object, PreparedOptions extends object> = HasSameOptionsShape<AuthoredOptions, PreparedOptions> extends true ? Readonly<{
288
- readonly preflight?: CheckPreflight<AuthoredOptions, PreparedOptions>;
337
+ /** Prepared shape 不同时,preparation 是建立安全转换的必填边界。 */
338
+ type CheckPreparationField<AuthoredOptions extends object, PreparedOptions extends object> = HasSameOptionsShape<AuthoredOptions, PreparedOptions> extends true ? Readonly<{
339
+ readonly prepare?: CheckPreparation<AuthoredOptions, PreparedOptions>;
289
340
  }> : Readonly<{
290
- readonly preflight: CheckPreflight<AuthoredOptions, PreparedOptions>;
341
+ readonly prepare: CheckPreparation<AuthoredOptions, PreparedOptions>;
291
342
  }>;
292
343
  /**
293
344
  * Project Definition 中的普通递归 Check authoring value。
294
345
  *
295
346
  * @typeParam AuthoredOptions - Definition 中的 declarative options shape。
296
- * @typeParam PreparedOptions - preflight 后 callback 接收的 invocation-local options shape。
347
+ * @typeParam PreparedOptions - preparation 后 callback 接收的 invocation-local options shape。
297
348
  * @remarks Definition 只闭合 authored JSON options;每个 admitted Check 先在自身 Task lifecycle 内执行
298
- * preflight,随后才执行 callback。`PreparedOptions` 与 `AuthoredOptions` 不同时必须提供 preflight;同形时可以
349
+ * preparation,随后才执行 callback。`PreparedOptions` 与 `AuthoredOptions` 不同时必须提供 preparation;同形时可以
299
350
  * 省略。它不进入 declarative fingerprint 或 machine output。
300
351
  */
301
- export type Check<AuthoredOptions extends object = object, PreparedOptions extends object = AuthoredOptions> = CheckBase<AuthoredOptions, PreparedOptions> & CheckPreflightField<AuthoredOptions, PreparedOptions>;
352
+ export type Check<AuthoredOptions extends object = object, PreparedOptions extends object = AuthoredOptions> = CheckBase<AuthoredOptions, PreparedOptions> & CheckPreparationField<AuthoredOptions, PreparedOptions> & (ExecutableCheckFields<PreparedOptions, CheckExecutionResult | CheckExecutionResult<Readonly<Record<never, never>>, object>> | ContainerCheckFields);
302
353
  export type EmptyCheckOptions = Readonly<Record<never, never>>;
303
354
  /**
304
355
  * 防止宽泛的 parser 标注擦除 `PromiseLike`。canonical `then` field 可以保存 JSON data,
@@ -314,20 +365,21 @@ type NonThenableData = Readonly<{
314
365
  * @remarks Product 不调用此 parser;provider 负责不受信任或跨版本 data 的业务验证。
315
366
  */
316
367
  export type CheckDataParser<FinalData extends object = object> = (this: void, data: CanonicalJsonObject) => FinalData & NonThenableData;
317
- type CheckAuthoringBase<Id extends string, AuthoredOptions extends object, PreparedOptions extends object> = Omit<CheckBase<AuthoredOptions, PreparedOptions>, "checkId" | "execution" | "options"> & CheckPreflightField<AuthoredOptions, PreparedOptions> & Readonly<{
368
+ type CheckAuthoringBase<Id extends string, AuthoredOptions extends object, PreparedOptions extends object> = Omit<CheckBase<AuthoredOptions, PreparedOptions>, "checkId" | "handoff" | "options"> & CheckPreparationField<AuthoredOptions, PreparedOptions> & Readonly<{
318
369
  readonly checkId: Id;
319
370
  }>;
320
- interface OrdinaryCheckFields<PreparedOptions extends object> {
321
- execution?(this: void, context: CheckExecutionContext<PreparedOptions>): CheckResult | Promise<CheckResult>;
322
- readonly parseData?: never;
323
- }
371
+ /** Ordinary Check branches cannot declare typed-provider parsing or private handoff. */
372
+ type OrdinaryCheckRestrictions = HandoffForbidden & Readonly<{
373
+ parseData?: undefined;
374
+ }>;
375
+ type OrdinaryCheckFields<PreparedOptions extends object> = (ExecutableCheckFields<PreparedOptions> & OrdinaryCheckRestrictions) | (ContainerCheckFields & OrdinaryCheckRestrictions);
324
376
  export type CheckWithOptions<Id extends string, AuthoredOptions extends object, PreparedOptions extends object = AuthoredOptions> = CheckAuthoringBase<Id, AuthoredOptions, PreparedOptions> & OrdinaryCheckFields<PreparedOptions> & Readonly<{
325
377
  readonly options: AuthoredOptions;
326
378
  }>;
327
379
  export type CheckWithoutOptions<Id extends string> = CheckAuthoringBase<Id, EmptyCheckOptions, EmptyCheckOptions> & OrdinaryCheckFields<EmptyCheckOptions> & Readonly<{
328
380
  readonly options?: never;
329
381
  }>;
330
- interface TypedCheckFields<PreparedOptions extends object, Parser extends CheckDataParser> {
382
+ interface TypedCheckFields<PreparedOptions extends object, Parser extends CheckDataParser> extends ExecutableCheckFields<PreparedOptions, CheckExecutionResult<NoInfer<ReturnType<Parser>>>> {
331
383
  /**
332
384
  * 将 canonical runtime data 还原为 provider data。
333
385
  *
@@ -336,14 +388,49 @@ interface TypedCheckFields<PreparedOptions extends object, Parser extends CheckD
336
388
  * 也不验证不受信任输入。
337
389
  */
338
390
  readonly parseData: Parser;
339
- execution(this: void, context: CheckExecutionContext<PreparedOptions>): CheckResult<NoInfer<ReturnType<Parser>>> | Promise<CheckResult<NoInfer<ReturnType<Parser>>>>;
391
+ readonly handoff?: never;
340
392
  }
393
+ interface HandoffCheckFields<PreparedOptions extends object, Handoff extends object> extends ExecutableCheckFields<PreparedOptions, CheckExecutionResult<object, Handoff>> {
394
+ readonly handoff: true;
395
+ readonly parseData?: undefined;
396
+ }
397
+ interface TypedHandoffCheckFields<PreparedOptions extends object, Parser extends CheckDataParser, Handoff extends object> extends ExecutableCheckFields<PreparedOptions, CheckExecutionResult<NoInfer<ReturnType<Parser>>, Handoff>> {
398
+ readonly handoff: true;
399
+ readonly parseData: Parser;
400
+ }
401
+ /** Extracts the private reference type from an already-validated passed terminal result. */
402
+ type HandoffFromTerminalResult<Result> = Extract<Awaited<Result>, {
403
+ readonly status: "passed";
404
+ }> extends {
405
+ readonly handoff: infer Handoff;
406
+ } ? Handoff extends object ? Handoff : never : never;
407
+ type PassedHandoffResult<Result> = Extract<Awaited<Result>, {
408
+ readonly status: "passed";
409
+ }>;
410
+ /** Every passed branch must accept the complete inferred handoff type, not just one union member. */
411
+ type PassedHandoffBranchIsConsistent<Passed, Handoff> = Passed extends {
412
+ readonly handoff: infer BranchHandoff;
413
+ } ? [Handoff] extends [BranchHandoff] ? true : false : false;
414
+ type HandoffTerminalResultConstraint<Result> = false extends PassedHandoffBranchIsConsistent<PassedHandoffResult<Result>, HandoffFromTerminalResult<Result>> ? never : unknown;
415
+ type HandoffExecution<PreparedOptions extends object, FinalData extends object = object> = (this: void, context: CheckExecutionContext<PreparedOptions>) => CheckExecutionResult<FinalData, object>;
341
416
  export type TypedCheckWithOptions<Id extends string, AuthoredOptions extends object, Parser extends CheckDataParser, PreparedOptions extends object = AuthoredOptions> = CheckAuthoringBase<Id, AuthoredOptions, PreparedOptions> & TypedCheckFields<PreparedOptions, Parser> & Readonly<{
342
417
  readonly options: AuthoredOptions;
343
418
  }>;
344
419
  export type TypedCheckWithoutOptions<Id extends string, Parser extends CheckDataParser> = CheckAuthoringBase<Id, EmptyCheckOptions, EmptyCheckOptions> & TypedCheckFields<EmptyCheckOptions, Parser> & Readonly<{
345
420
  readonly options?: never;
346
421
  }>;
422
+ export type HandoffCheckWithOptions<Id extends string, AuthoredOptions extends object, Handoff extends object, PreparedOptions extends object = AuthoredOptions> = CheckAuthoringBase<Id, AuthoredOptions, PreparedOptions> & HandoffCheckFields<PreparedOptions, Handoff> & Readonly<{
423
+ readonly options: AuthoredOptions;
424
+ }>;
425
+ export type HandoffCheckWithoutOptions<Id extends string, Handoff extends object> = CheckAuthoringBase<Id, EmptyCheckOptions, EmptyCheckOptions> & HandoffCheckFields<EmptyCheckOptions, Handoff> & Readonly<{
426
+ readonly options?: never;
427
+ }>;
428
+ export type TypedHandoffCheckWithOptions<Id extends string, AuthoredOptions extends object, Parser extends CheckDataParser, Handoff extends object, PreparedOptions extends object = AuthoredOptions> = CheckAuthoringBase<Id, AuthoredOptions, PreparedOptions> & TypedHandoffCheckFields<PreparedOptions, Parser, Handoff> & Readonly<{
429
+ readonly options: AuthoredOptions;
430
+ }>;
431
+ export type TypedHandoffCheckWithoutOptions<Id extends string, Parser extends CheckDataParser, Handoff extends object> = CheckAuthoringBase<Id, EmptyCheckOptions, EmptyCheckOptions> & TypedHandoffCheckFields<EmptyCheckOptions, Parser, Handoff> & Readonly<{
432
+ readonly options?: never;
433
+ }>;
347
434
  /**
348
435
  * 定义一个 Check,同时保留 literal `checkId`、options 与 typed-provider parser 的 inference。
349
436
  *
@@ -366,13 +453,13 @@ export type TypedCheckWithoutOptions<Id extends string, Parser extends CheckData
366
453
  * checkId: "license-policy",
367
454
  * displayName: "License policy",
368
455
  * options: { denied: ["GPL-3.0-only"] },
369
- * preflight(options) {
456
+ * prepare(options) {
370
457
  * return hasValidLicensePolicyOptions(options)
371
458
  * ? { status: "success", preparedOptions: options }
372
459
  * : { status: "failure", action: "block", reason: { code: "invalid-options" } };
373
460
  * },
374
- * visibility: "attention",
375
- * execution({ options, records, signal }) {
461
+ * omitQuietPassedRow: true,
462
+ * execute({ options, records, signal }) {
376
463
  * if (signal.aborted) return { status: "unavailable", reason: { code: "cancelled" } };
377
464
  *
378
465
  * const deniedCount = options.denied.length;
@@ -389,6 +476,30 @@ export type TypedCheckWithoutOptions<Id extends string, Parser extends CheckData
389
476
  * });
390
477
  * ```
391
478
  */
479
+ export declare function defineCheck<const Id extends string, AuthoredOptions extends object, const Execution extends HandoffExecution<PreparedOptions>, PreparedOptions extends object = AuthoredOptions>(value: CheckAuthoringBase<Id, AuthoredOptions, PreparedOptions> & Readonly<{
480
+ readonly handoff: true;
481
+ readonly options: AuthoredOptions;
482
+ readonly parseData?: undefined;
483
+ readonly execute: Execution;
484
+ }> & HandoffTerminalResultConstraint<ReturnType<Execution>>): HandoffCheckWithOptions<Id, AuthoredOptions, HandoffFromTerminalResult<ReturnType<Execution>>, PreparedOptions> & CheckHandoffProvider<Id, HandoffFromTerminalResult<ReturnType<Execution>>>;
485
+ export declare function defineCheck<const Id extends string, const Execution extends HandoffExecution<EmptyCheckOptions>>(value: CheckAuthoringBase<Id, EmptyCheckOptions, EmptyCheckOptions> & Readonly<{
486
+ readonly handoff: true;
487
+ readonly options?: never;
488
+ readonly parseData?: undefined;
489
+ readonly execute: Execution;
490
+ }> & HandoffTerminalResultConstraint<ReturnType<Execution>>): HandoffCheckWithoutOptions<Id, HandoffFromTerminalResult<ReturnType<Execution>>> & CheckHandoffProvider<Id, HandoffFromTerminalResult<ReturnType<Execution>>>;
491
+ export declare function defineCheck<const Id extends string, AuthoredOptions extends object, const Parser extends CheckDataParser, const Execution extends HandoffExecution<PreparedOptions, NoInfer<ReturnType<Parser>>>, PreparedOptions extends object = AuthoredOptions>(value: CheckAuthoringBase<Id, AuthoredOptions, PreparedOptions> & Readonly<{
492
+ readonly handoff: true;
493
+ readonly options: AuthoredOptions;
494
+ readonly parseData: Parser;
495
+ readonly execute: Execution;
496
+ }> & HandoffTerminalResultConstraint<ReturnType<Execution>>): TypedHandoffCheckWithOptions<Id, AuthoredOptions, Parser, HandoffFromTerminalResult<ReturnType<Execution>>, PreparedOptions> & CheckHandoffProvider<Id, HandoffFromTerminalResult<ReturnType<Execution>>>;
497
+ export declare function defineCheck<const Id extends string, const Parser extends CheckDataParser, const Execution extends HandoffExecution<EmptyCheckOptions, NoInfer<ReturnType<Parser>>>>(value: CheckAuthoringBase<Id, EmptyCheckOptions, EmptyCheckOptions> & Readonly<{
498
+ readonly handoff: true;
499
+ readonly options?: never;
500
+ readonly parseData: Parser;
501
+ readonly execute: Execution;
502
+ }> & HandoffTerminalResultConstraint<ReturnType<Execution>>): TypedHandoffCheckWithoutOptions<Id, Parser, HandoffFromTerminalResult<ReturnType<Execution>>> & CheckHandoffProvider<Id, HandoffFromTerminalResult<ReturnType<Execution>>>;
392
503
  export declare function defineCheck<const Id extends string, AuthoredOptions extends object, PreparedOptions extends object = AuthoredOptions>(value: CheckWithOptions<Id, AuthoredOptions, PreparedOptions>): CheckWithOptions<Id, AuthoredOptions, PreparedOptions>;
393
504
  export declare function defineCheck<const Id extends string>(value: CheckWithoutOptions<Id>): CheckWithoutOptions<Id>;
394
505
  export declare function defineCheck<const Id extends string, AuthoredOptions extends object, const Parser extends CheckDataParser, PreparedOptions extends object = AuthoredOptions>(value: TypedCheckWithOptions<Id, AuthoredOptions, Parser, PreparedOptions>): TypedCheckWithOptions<Id, AuthoredOptions, Parser, PreparedOptions>;
@@ -0,0 +1,42 @@
1
+ /** 一个递归 flag presence 条件表达式。字符串是唯一 leaf;operator 保留 author child 顺序和 multiplicity。 */
2
+ export type CheckFlagCondition = string | Readonly<{
3
+ readonly kind: "all" | "any" | "none" | "not-all" | "exactly-one";
4
+ readonly conditions: readonly [CheckFlagCondition, ...CheckFlagCondition[]];
5
+ }> | Readonly<{
6
+ readonly kind: "not";
7
+ readonly condition: CheckFlagCondition;
8
+ }>;
9
+ type CheckFlagConditionSetKind = "all" | "any" | "none" | "not-all" | "exactly-one";
10
+ type NonEmptyFlagConditions = readonly [CheckFlagCondition, ...CheckFlagCondition[]];
11
+ type CheckFlagConditionSet<Kind extends CheckFlagConditionSetKind> = Readonly<{
12
+ readonly kind: Kind;
13
+ readonly conditions: NonEmptyFlagConditions;
14
+ }>;
15
+ type CheckFlagNegation = Readonly<{
16
+ readonly kind: "not";
17
+ readonly condition: CheckFlagCondition;
18
+ }>;
19
+ /** 构造 `all` 条件;Definition 仍负责 validation、snapshot 与 freeze。 */
20
+ export declare function all(...conditions: NonEmptyFlagConditions): CheckFlagConditionSet<"all">;
21
+ /** 构造 `any` 条件;Definition 仍负责 validation、snapshot 与 freeze。 */
22
+ export declare function any(...conditions: NonEmptyFlagConditions): CheckFlagConditionSet<"any">;
23
+ /** 构造 `none` 条件;Definition 仍负责 validation、snapshot 与 freeze。 */
24
+ export declare function none(...conditions: NonEmptyFlagConditions): CheckFlagConditionSet<"none">;
25
+ /** 构造 `not-all` 条件;Definition 仍负责 validation、snapshot 与 freeze。 */
26
+ export declare function notAll(...conditions: NonEmptyFlagConditions): CheckFlagConditionSet<"not-all">;
27
+ /** 构造 `exactly-one` 条件;Definition 仍负责 validation、snapshot 与 freeze。 */
28
+ export declare function exactlyOne(...conditions: NonEmptyFlagConditions): CheckFlagConditionSet<"exactly-one">;
29
+ /** 构造 `not` 条件;Definition 仍负责 validation、snapshot 与 freeze。 */
30
+ export declare function not(condition: CheckFlagCondition): CheckFlagNegation;
31
+ /** 为一个已声明的 project change ID 生成保留 flag token。 */
32
+ export declare function changeFlag<const Id extends string>(id: Id): `vibe-check:change:${Id}`;
33
+ /** executable Check 的 flag 选择控制。 */
34
+ export interface CheckFlagEnablement {
35
+ readonly when: CheckFlagCondition;
36
+ /**
37
+ * 条件命中时是否启动本 Check 的传递 `dependsOn` prerequisite;省略时只选择直接命中 Check。
38
+ * `observes` 不参与此选择,且 dependency 自己的 flag 条件不会阻止已启动 prerequisite。
39
+ */
40
+ readonly propagateDependsOn?: true;
41
+ }
42
+ export {};
@@ -0,0 +1,12 @@
1
+ declare const HANDOFF_PROVIDER_IDENTITY_BRAND: unique symbol;
2
+ /** Opaque same-package identity retained only by Definition and invocation execution. */
3
+ export type HandoffProviderIdentity = Readonly<{
4
+ readonly [HANDOFF_PROVIDER_IDENTITY_BRAND]: true;
5
+ }>;
6
+ /** Registers the identity that makes a `handoff: true` Check authentic to this package runtime. */
7
+ export declare function registerHandoffProviderIdentity(value: object): void;
8
+ /** Returns the same-package identity registered by `defineCheck`. */
9
+ export declare function getDefinedHandoffProviderIdentity(value: unknown): HandoffProviderIdentity | undefined;
10
+ /** Preserves a Definition-validated provider identity during materialization. */
11
+ export declare function bindHandoffProviderIdentity(value: object, identity: HandoffProviderIdentity): void;
12
+ export {};
@@ -0,0 +1,13 @@
1
+ /** 已配置的 project change preparation 产生的 file-centric evidence。 */
2
+ export type ProjectChanges = Readonly<{
3
+ readonly ok: true;
4
+ readonly files: readonly Readonly<{
5
+ readonly path: string;
6
+ readonly flags: readonly string[];
7
+ }>[];
8
+ } | {
9
+ readonly ok: false;
10
+ readonly reason: Readonly<{
11
+ readonly code: string;
12
+ }>;
13
+ }>;
@@ -0,0 +1,10 @@
1
+ import type { ProjectChanges } from "./project-changes.ts";
2
+ /** 每次 Run 共享、冻结的 caller project context。 */
3
+ export interface CheckProjectContext {
4
+ /** 本次 Run 使用的绝对项目根目录。 */
5
+ readonly root: string;
6
+ /** 已去重、排序的 invocation-effective flags(caller flags 与派生 change flags)。 */
7
+ readonly flags: readonly string[];
8
+ /** 只在当前 Project Definition 配置 change preparation 时存在。 */
9
+ readonly changes?: ProjectChanges;
10
+ }
@@ -2,7 +2,7 @@ import type { CheckDescriptor } from "../check/descriptor.ts";
2
2
  import type { CheckOutcome } from "../check/check.ts";
3
3
  export type { CanonicalJsonObject, CanonicalJsonPrimitive, CanonicalJsonValue } from "../data-boundary/canonical-data.ts";
4
4
  export type { CheckDescriptor, CheckOutcome };
5
- /** A Core Check has exactly one terminal outcome and no execution bookkeeping. */
5
+ /** Core Check 恰有一个 terminal outcome,不携带 execution bookkeeping。 */
6
6
  export interface CoreCheck extends CheckDescriptor {
7
7
  readonly outcome: CheckOutcome;
8
8
  }
@@ -1,13 +1,36 @@
1
1
  import type { CanonicalJsonObject, CanonicalJsonValue } from "./canonical-json.ts";
2
2
  export type { CanonicalJsonObject, CanonicalJsonPrimitive, CanonicalJsonValue } from "./canonical-json.ts";
3
3
  /**
4
- * Materializes arbitrary author data without property reads or JSON hooks.
5
- * The returned graph is detached, prototype-safe, and deeply frozen before it
6
- * becomes a Core fact. Canonical text order is applied explicitly at serialization.
4
+ * 将输入规范化为独立且递归冻结的 canonical JSON 对象副本。
5
+ *
6
+ * 递归内容只接受普通对象或 null-prototype 对象、标准无空洞数组和有限 JSON 基本值;仅当顶层结果是
7
+ * 非数组对象时返回该副本。输出对象使用 null prototype,输出对象和数组均独立于输入且递归冻结。不调用
8
+ * getter 或 `toJSON`;无效输入、循环引用或反射失败返回 `undefined`。反射 Proxy 时仍可能执行其 trap,
9
+ * 不隔离 trap 的副作用。
7
10
  */
8
11
  export declare function canonicalizeJsonObject(value: unknown): CanonicalJsonObject | undefined;
12
+ /**
13
+ * 将输入规范化为独立且递归冻结的 canonical JSON 值副本。
14
+ *
15
+ * 接受 `null`、boolean、string、有限 number、普通对象或 null-prototype 对象,以及标准无空洞数组;
16
+ * `-0` 转换为 `0`,输出对象使用 null prototype。拒绝存取器、稀疏数组、不可枚举的自有属性、非有限
17
+ * number 和其它 prototype。不调用 getter 或 `toJSON`;无效输入、循环引用或反射失败返回 `undefined`。
18
+ * 反射 Proxy 时仍可能执行其 trap,不隔离 trap 的副作用。`CanonicalJsonPrimitive` 的 `number` 在
19
+ * TypeScript 中仍可表示 `NaN`,有限性只能由本函数在运行时检查。
20
+ */
9
21
  export declare function canonicalizeJsonValue(value: unknown): CanonicalJsonValue | undefined;
10
- /** Serializes detached canonical JSON with explicit lexical object-key ordering. */
22
+ /**
23
+ * 规范化输入后生成确定性的无额外空白 JSON 文本。
24
+ *
25
+ * 对象键按固定的 lexical `<` 顺序输出,不承诺遵循外部 canonical-JSON 标准。即使同一对象已经过
26
+ * 规范化,`JSON.stringify` 仍按 ECMAScript 的整数索引键顺序输出,不能替代本函数。输入规则与 Proxy
27
+ * 边界同 `canonicalizeJsonValue`;无效输入或无法反射的 Proxy 均抛出 `TypeError`。
28
+ */
11
29
  export declare function canonicalJsonText(value: unknown): string;
12
- /** Emits canonical UTF-8 JSON without invoking author getters or `toJSON`. */
30
+ /**
31
+ * 规范化输入后生成与 `canonicalJsonText` 相同的确定性 UTF-8 JSON 字节。
32
+ *
33
+ * 函数自行完成规范化与固定键排序,不要求调用方先取得 canonical JSON 值。输入规则、Proxy 边界和
34
+ * `TypeError` 失败方式与 `canonicalJsonText` 相同。
35
+ */
13
36
  export declare function canonicalJsonBytes(value: unknown): Uint8Array;
@@ -1,6 +1,23 @@
1
- /** Package-private static shape for Product's detached canonical JSON facts. */
1
+ /**
2
+ * Canonical JSON 基本值的静态结构类型。
3
+ *
4
+ * TypeScript 的 `number` 无法在静态层区分有限值与 `NaN` / `Infinity`;因此此类型不能证明值已经由
5
+ * canonical API 规范化。运行时只接受有限 number,并将 `-0` 转换为 `0`。
6
+ */
2
7
  export type CanonicalJsonPrimitive = boolean | null | number | string;
8
+ /**
9
+ * Canonical JSON 值的递归只读静态结构类型。
10
+ *
11
+ * 它描述基本值、数组和对象能够如何组合,便于声明参数和结果;不证明值已经通过 canonical API 的
12
+ * 运行时规范化、递归冻结或循环检查。
13
+ */
3
14
  export type CanonicalJsonValue = CanonicalJsonPrimitive | readonly CanonicalJsonValue[] | CanonicalJsonObject;
15
+ /**
16
+ * Canonical JSON 对象的只读静态结构类型。
17
+ *
18
+ * 该类型不证明值来自 canonical API。API 实际返回的对象使用 null prototype,没有继承的对象方法;
19
+ * 检查属性时使用 `Object.hasOwn`,不要调用 `value.hasOwnProperty`。
20
+ */
4
21
  export interface CanonicalJsonObject {
5
22
  readonly [key: string]: CanonicalJsonValue;
6
23
  }
@@ -1,7 +1,23 @@
1
1
  export declare function snapshotPlainRecord(value: unknown): Readonly<Record<string, unknown>> | undefined;
2
2
  export declare function snapshotClosedRecord(value: unknown): Readonly<Record<string, unknown>> | undefined;
3
- /** Snapshots a closed plain record only when it has exactly the declared own keys. */
3
+ /**
4
+ * 取得字段集合恰好匹配调用方字段表的闭合普通记录外层浅快照。
5
+ *
6
+ * 输入必须是使用 `Object.prototype` 或 null prototype 的非数组对象,且每个自有属性都是可枚举数据属性。
7
+ * 调用方持有的 `keys` 必须是稳定、无重复的字符串列表;缺字段、多字段、symbol 键、存取器或不可枚举属性
8
+ * 均返回 `undefined`。成功结果是使用 `Object.prototype` 的冻结浅副本:只固定外层字段,保留 callback、
9
+ * `undefined` 与嵌套对象或数组的原引用,调用方仍须逐字段验证。这不是 JSON 验证器;不调用 getter,
10
+ * 但反射 Proxy 可能执行其 trap,反射失败时返回 `undefined`。
11
+ */
4
12
  export declare function snapshotExactClosedRecord(value: unknown, keys: readonly string[]): Readonly<Record<string, unknown>> | undefined;
13
+ /**
14
+ * 取得标准无空洞数组的外层浅快照。
15
+ *
16
+ * 输入必须使用 `Array.prototype`,除标准 `length` 和可枚举索引外没有其它自有属性,也不能包含存取器;
17
+ * 稀疏数组、额外属性或其它不符合条件的输入返回 `undefined`。成功结果是冻结浅副本,只固定数组结构,
18
+ * 保留 callback、`undefined` 与嵌套值的原引用,不检查元素的业务类型或 JSON 合法性。不调用存取器,
19
+ * 但反射 Proxy 可能执行其 trap,反射失败时返回 `undefined`。
20
+ */
5
21
  export declare function snapshotClosedArray(value: unknown): readonly unknown[] | undefined;
6
22
  export declare function hasExactPlainRecordKeys(value: Readonly<Record<string, unknown>>, keys: readonly string[]): boolean;
7
23
  export declare function hasRequiredAndOptionalRecordKeys(value: Readonly<Record<string, unknown>>, keys: Readonly<{
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Product config glob's single matcher boundary. Candidates use slash form;
3
+ * dot paths participate only when an explicit glob matches them.
4
+ */
5
+ export declare function matchesAnyConfigGlob(candidatePath: string, configGlobs: readonly string[]): boolean;
@@ -0,0 +1,4 @@
1
+ /** Converts a host path spelling to the Product's slash-path form. */
2
+ export declare function toSlashPath(filePath: string): string;
3
+ /** Recognizes one stable project-root-relative slash path. */
4
+ export declare function isNormalizedProjectRelativePath(value: unknown): value is string;