@hominis/fireforge 0.49.2 → 0.51.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 (400) hide show
  1. package/CHANGELOG.md +87 -1
  2. package/README.md +1 -1
  3. package/dist/bin/fireforge.js +6 -0
  4. package/dist/build-info.json +4 -4
  5. package/dist/src/commands/build-prelock.d.ts +20 -0
  6. package/dist/src/commands/build-prelock.js +50 -0
  7. package/dist/src/commands/build.d.ts +3 -1
  8. package/dist/src/commands/build.js +13 -6
  9. package/dist/src/commands/check-report.d.ts +41 -0
  10. package/dist/src/commands/check-report.js +91 -0
  11. package/dist/src/commands/check-run.d.ts +33 -0
  12. package/dist/src/commands/check-run.js +112 -0
  13. package/dist/src/commands/check-steps.d.ts +75 -0
  14. package/dist/src/commands/check-steps.js +200 -0
  15. package/dist/src/commands/check.d.ts +32 -0
  16. package/dist/src/commands/check.js +160 -0
  17. package/dist/src/commands/config.js +5 -6
  18. package/dist/src/commands/declarations-report.d.ts +43 -0
  19. package/dist/src/commands/declarations-report.js +76 -0
  20. package/dist/src/commands/doctor-engine-eslint.js +6 -1
  21. package/dist/src/commands/doctor-source-pin.js +4 -1
  22. package/dist/src/commands/export-adopt-check.d.ts +38 -0
  23. package/dist/src/commands/export-adopt-check.js +98 -0
  24. package/dist/src/commands/export-flow.js +29 -14
  25. package/dist/src/commands/export-placement-gate.d.ts +6 -2
  26. package/dist/src/commands/export-placement-gate.js +8 -0
  27. package/dist/src/commands/export-shared.d.ts +2 -1
  28. package/dist/src/commands/export-staged-registration.d.ts +46 -0
  29. package/dist/src/commands/export-staged-registration.js +91 -0
  30. package/dist/src/commands/forward-import-remedy.d.ts +32 -0
  31. package/dist/src/commands/forward-import-remedy.js +63 -0
  32. package/dist/src/commands/furnace/apply.js +3 -3
  33. package/dist/src/commands/furnace/chrome-doc-remove.d.ts +2 -1
  34. package/dist/src/commands/furnace/chrome-doc-remove.js +2 -2
  35. package/dist/src/commands/furnace/chrome-doc.d.ts +2 -1
  36. package/dist/src/commands/furnace/chrome-doc.js +2 -2
  37. package/dist/src/commands/furnace/create.js +2 -2
  38. package/dist/src/commands/furnace/deploy-named.d.ts +48 -0
  39. package/dist/src/commands/furnace/deploy-named.js +107 -0
  40. package/dist/src/commands/furnace/deploy.d.ts +3 -2
  41. package/dist/src/commands/furnace/deploy.js +50 -86
  42. package/dist/src/commands/furnace/diff.js +26 -3
  43. package/dist/src/commands/furnace/index.js +66 -41
  44. package/dist/src/commands/furnace/init.js +13 -6
  45. package/dist/src/commands/furnace/override.js +4 -2
  46. package/dist/src/commands/furnace/preview.js +4 -3
  47. package/dist/src/commands/furnace/refresh.js +2 -2
  48. package/dist/src/commands/furnace/remove.js +4 -3
  49. package/dist/src/commands/furnace/rename-dry-run.d.ts +29 -0
  50. package/dist/src/commands/furnace/rename-dry-run.js +127 -0
  51. package/dist/src/commands/furnace/rename-helpers.d.ts +7 -0
  52. package/dist/src/commands/furnace/rename-helpers.js +15 -1
  53. package/dist/src/commands/furnace/rename-registrations.d.ts +41 -0
  54. package/dist/src/commands/furnace/rename-registrations.js +98 -0
  55. package/dist/src/commands/furnace/rename.d.ts +2 -1
  56. package/dist/src/commands/furnace/rename.js +28 -66
  57. package/dist/src/commands/furnace/scan.d.ts +9 -4
  58. package/dist/src/commands/furnace/scan.js +11 -9
  59. package/dist/src/commands/furnace/sync.js +3 -2
  60. package/dist/src/commands/furnace/validate-report.d.ts +45 -0
  61. package/dist/src/commands/furnace/validate-report.js +91 -0
  62. package/dist/src/commands/furnace/validate.d.ts +1 -1
  63. package/dist/src/commands/furnace/validate.js +151 -113
  64. package/dist/src/commands/furnace/validation-output.js +14 -3
  65. package/dist/src/commands/lint-per-patch.js +36 -61
  66. package/dist/src/commands/lint-per-run-checkjs.js +2 -2
  67. package/dist/src/commands/lint-report.d.ts +8 -4
  68. package/dist/src/commands/lint-report.js +20 -5
  69. package/dist/src/commands/lint.js +15 -34
  70. package/dist/src/commands/manifest.js +4 -0
  71. package/dist/src/commands/park.d.ts +22 -0
  72. package/dist/src/commands/park.js +232 -0
  73. package/dist/src/commands/patch/delete-gap-notice.js +3 -1
  74. package/dist/src/commands/patch/delete.d.ts +1 -1
  75. package/dist/src/commands/patch/delete.js +24 -104
  76. package/dist/src/commands/patch/index.d.ts +3 -3
  77. package/dist/src/commands/patch/index.js +10 -4
  78. package/dist/src/commands/patch/lint-ignore-from.d.ts +44 -0
  79. package/dist/src/commands/patch/lint-ignore-from.js +142 -0
  80. package/dist/src/commands/patch/lint-ignore.d.ts +5 -1
  81. package/dist/src/commands/patch/lint-ignore.js +78 -31
  82. package/dist/src/commands/patch/move-files-create.js +34 -18
  83. package/dist/src/commands/patch/move-files-into.js +15 -7
  84. package/dist/src/commands/patch/move-files.js +6 -2
  85. package/dist/src/commands/patch/removal-created-files.d.ts +48 -0
  86. package/dist/src/commands/patch/removal-created-files.js +83 -0
  87. package/dist/src/commands/patch/removal-dependents.d.ts +63 -0
  88. package/dist/src/commands/patch/removal-dependents.js +133 -0
  89. package/dist/src/commands/patch/rename.js +20 -1
  90. package/dist/src/commands/patch/reserve.d.ts +33 -0
  91. package/dist/src/commands/patch/reserve.js +152 -0
  92. package/dist/src/commands/patch/retire.d.ts +34 -0
  93. package/dist/src/commands/patch/retire.js +133 -0
  94. package/dist/src/commands/patch/split-plan.d.ts +17 -8
  95. package/dist/src/commands/patch/split-plan.js +60 -28
  96. package/dist/src/commands/patch/split-staged.d.ts +108 -0
  97. package/dist/src/commands/patch/split-staged.js +202 -0
  98. package/dist/src/commands/patch/split.d.ts +5 -0
  99. package/dist/src/commands/patch/split.js +62 -17
  100. package/dist/src/commands/patch/stage.d.ts +34 -0
  101. package/dist/src/commands/patch/stage.js +153 -0
  102. package/dist/src/commands/patch/staged-dependency-batch.d.ts +48 -0
  103. package/dist/src/commands/patch/staged-dependency-batch.js +176 -0
  104. package/dist/src/commands/patch/staged-dependency-entries.d.ts +36 -0
  105. package/dist/src/commands/patch/staged-dependency-entries.js +52 -0
  106. package/dist/src/commands/patch/staged-dependency-from.d.ts +14 -0
  107. package/dist/src/commands/patch/staged-dependency-from.js +108 -0
  108. package/dist/src/commands/patch/staged-dependency-remove.d.ts +31 -0
  109. package/dist/src/commands/patch/staged-dependency-remove.js +80 -0
  110. package/dist/src/commands/patch/staged-dependency.js +54 -139
  111. package/dist/src/commands/re-export-adjacent-registrations.d.ts +20 -0
  112. package/dist/src/commands/re-export-adjacent-registrations.js +75 -0
  113. package/dist/src/commands/re-export-adjacent.d.ts +50 -2
  114. package/dist/src/commands/re-export-adjacent.js +160 -40
  115. package/dist/src/commands/re-export-bulk-scan.d.ts +2 -1
  116. package/dist/src/commands/re-export-bulk-scan.js +22 -7
  117. package/dist/src/commands/re-export-drift.d.ts +36 -8
  118. package/dist/src/commands/re-export-drift.js +73 -49
  119. package/dist/src/commands/re-export-files.js +11 -8
  120. package/dist/src/commands/re-export-hunks.d.ts +35 -0
  121. package/dist/src/commands/re-export-hunks.js +220 -0
  122. package/dist/src/commands/re-export-lint.d.ts +2 -1
  123. package/dist/src/commands/re-export-lint.js +23 -10
  124. package/dist/src/commands/re-export-options.js +74 -6
  125. package/dist/src/commands/re-export-preflight.d.ts +23 -0
  126. package/dist/src/commands/re-export-preflight.js +160 -0
  127. package/dist/src/commands/re-export-purity-scope.d.ts +18 -0
  128. package/dist/src/commands/re-export-purity-scope.js +131 -0
  129. package/dist/src/commands/re-export-register.js +56 -17
  130. package/dist/src/commands/re-export-removed.d.ts +13 -2
  131. package/dist/src/commands/re-export-removed.js +57 -12
  132. package/dist/src/commands/re-export-scan-owner.d.ts +44 -0
  133. package/dist/src/commands/re-export-scan-owner.js +116 -0
  134. package/dist/src/commands/re-export-scan.d.ts +19 -9
  135. package/dist/src/commands/re-export-scan.js +60 -24
  136. package/dist/src/commands/re-export-single.js +122 -46
  137. package/dist/src/commands/re-export-stale-registrations.d.ts +18 -0
  138. package/dist/src/commands/re-export-stale-registrations.js +62 -0
  139. package/dist/src/commands/re-export-summary.d.ts +28 -0
  140. package/dist/src/commands/re-export-summary.js +36 -0
  141. package/dist/src/commands/re-export.js +71 -57
  142. package/dist/src/commands/rebase/index.js +17 -17
  143. package/dist/src/commands/run.js +16 -2
  144. package/dist/src/commands/status-check.d.ts +55 -16
  145. package/dist/src/commands/status-check.js +92 -37
  146. package/dist/src/commands/status-json.d.ts +22 -9
  147. package/dist/src/commands/status-json.js +47 -32
  148. package/dist/src/commands/status-output.js +3 -1
  149. package/dist/src/commands/status-scope.d.ts +37 -0
  150. package/dist/src/commands/status-scope.js +54 -0
  151. package/dist/src/commands/status.js +66 -23
  152. package/dist/src/commands/test-browser-preflight.js +19 -3
  153. package/dist/src/commands/test-build-furnace.d.ts +22 -0
  154. package/dist/src/commands/test-build-furnace.js +54 -0
  155. package/dist/src/commands/test-build-phase.js +64 -41
  156. package/dist/src/commands/test-checkjs.js +10 -2
  157. package/dist/src/commands/test-diagnose.js +7 -0
  158. package/dist/src/commands/test-dispatch.d.ts +39 -0
  159. package/dist/src/commands/test-dispatch.js +211 -0
  160. package/dist/src/commands/test-furnace-reach.d.ts +37 -0
  161. package/dist/src/commands/test-furnace-reach.js +132 -0
  162. package/dist/src/commands/test-modes.d.ts +16 -1
  163. package/dist/src/commands/test-modes.js +24 -1
  164. package/dist/src/commands/test-multi-verdict.d.ts +61 -0
  165. package/dist/src/commands/test-multi-verdict.js +111 -0
  166. package/dist/src/commands/test-orchestrate.d.ts +52 -0
  167. package/dist/src/commands/test-orchestrate.js +240 -0
  168. package/dist/src/commands/test-perf-scope.d.ts +50 -0
  169. package/dist/src/commands/test-perf-scope.js +138 -0
  170. package/dist/src/commands/test-prelock.d.ts +51 -0
  171. package/dist/src/commands/test-prelock.js +273 -0
  172. package/dist/src/commands/test-register.js +69 -10
  173. package/dist/src/commands/test-results.d.ts +62 -0
  174. package/dist/src/commands/test-results.js +62 -0
  175. package/dist/src/commands/test-run.d.ts +13 -55
  176. package/dist/src/commands/test-run.js +74 -99
  177. package/dist/src/commands/test-shards.d.ts +110 -0
  178. package/dist/src/commands/test-shards.js +255 -0
  179. package/dist/src/commands/test-stale-gate.d.ts +5 -1
  180. package/dist/src/commands/test-stale-gate.js +60 -28
  181. package/dist/src/commands/test-verdict.d.ts +11 -1
  182. package/dist/src/commands/test-verdict.js +28 -1
  183. package/dist/src/commands/test.d.ts +6 -1
  184. package/dist/src/commands/test.js +120 -124
  185. package/dist/src/commands/token-lint.d.ts +14 -0
  186. package/dist/src/commands/token-lint.js +151 -0
  187. package/dist/src/commands/token.js +10 -0
  188. package/dist/src/commands/verify-scope.d.ts +28 -0
  189. package/dist/src/commands/verify-scope.js +67 -0
  190. package/dist/src/commands/verify.d.ts +10 -2
  191. package/dist/src/commands/verify.js +67 -36
  192. package/dist/src/core/build-baseline-types.d.ts +46 -0
  193. package/dist/src/core/build-baseline-validate.js +19 -0
  194. package/dist/src/core/build-baseline.d.ts +5 -1
  195. package/dist/src/core/build-baseline.js +3 -1
  196. package/dist/src/core/build-overwrite-guard.d.ts +50 -0
  197. package/dist/src/core/build-overwrite-guard.js +84 -4
  198. package/dist/src/core/build-prepare.d.ts +13 -0
  199. package/dist/src/core/build-prepare.js +42 -10
  200. package/dist/src/core/build-run-record.d.ts +74 -0
  201. package/dist/src/core/build-run-record.js +136 -0
  202. package/dist/src/core/checkjs-support-heads.d.ts +41 -0
  203. package/dist/src/core/checkjs-support-heads.js +104 -0
  204. package/dist/src/core/config-paths.d.ts +2 -2
  205. package/dist/src/core/config-paths.js +10 -0
  206. package/dist/src/core/config-validate-check.d.ts +8 -0
  207. package/dist/src/core/config-validate-check.js +219 -0
  208. package/dist/src/core/config-validate-file-size.d.ts +9 -6
  209. package/dist/src/core/config-validate-file-size.js +91 -2
  210. package/dist/src/core/config-validate-history.d.ts +11 -0
  211. package/dist/src/core/config-validate-history.js +38 -0
  212. package/dist/src/core/config-validate-patch-policy.js +100 -0
  213. package/dist/src/core/config-validate-test-toolchains.js +21 -0
  214. package/dist/src/core/config-validate-token-scales.d.ts +9 -0
  215. package/dist/src/core/config-validate-token-scales.js +92 -0
  216. package/dist/src/core/config-validate.js +20 -5
  217. package/dist/src/core/config.d.ts +5 -0
  218. package/dist/src/core/config.js +16 -0
  219. package/dist/src/core/coverage-dispatch.d.ts +24 -0
  220. package/dist/src/core/coverage-dispatch.js +44 -0
  221. package/dist/src/core/coverage-extend.d.ts +70 -45
  222. package/dist/src/core/coverage-extend.js +199 -144
  223. package/dist/src/core/coverage-records.d.ts +108 -0
  224. package/dist/src/core/coverage-records.js +384 -0
  225. package/dist/src/core/destructive.d.ts +7 -4
  226. package/dist/src/core/destructive.js +10 -10
  227. package/dist/src/core/engine-session-lock.d.ts +16 -1
  228. package/dist/src/core/engine-session-lock.js +38 -10
  229. package/dist/src/core/export-moved-code-shape.d.ts +49 -11
  230. package/dist/src/core/export-moved-code-shape.js +135 -44
  231. package/dist/src/core/file-lock-queue.d.ts +67 -0
  232. package/dist/src/core/file-lock-queue.js +221 -0
  233. package/dist/src/core/file-lock-shared.d.ts +57 -0
  234. package/dist/src/core/file-lock-shared.js +117 -0
  235. package/dist/src/core/file-lock.d.ts +13 -25
  236. package/dist/src/core/file-lock.js +163 -140
  237. package/dist/src/core/furnace-apply-output.d.ts +10 -0
  238. package/dist/src/core/furnace-apply-output.js +31 -1
  239. package/dist/src/core/furnace-apply.js +22 -12
  240. package/dist/src/core/furnace-composed-source.d.ts +76 -0
  241. package/dist/src/core/furnace-composed-source.js +167 -0
  242. package/dist/src/core/furnace-config-validate-exceptions.d.ts +16 -0
  243. package/dist/src/core/furnace-config-validate-exceptions.js +102 -0
  244. package/dist/src/core/furnace-config-validate.js +14 -0
  245. package/dist/src/core/furnace-css-fragments.d.ts +10 -0
  246. package/dist/src/core/furnace-css-fragments.js +26 -0
  247. package/dist/src/core/furnace-operation.d.ts +3 -3
  248. package/dist/src/core/furnace-registration-jar-inplace.d.ts +12 -0
  249. package/dist/src/core/furnace-registration-jar-inplace.js +80 -0
  250. package/dist/src/core/furnace-registration-remove.d.ts +22 -1
  251. package/dist/src/core/furnace-registration-remove.js +53 -17
  252. package/dist/src/core/furnace-registration-rename.d.ts +26 -0
  253. package/dist/src/core/furnace-registration-rename.js +77 -0
  254. package/dist/src/core/furnace-registration.d.ts +14 -4
  255. package/dist/src/core/furnace-registration.js +44 -10
  256. package/dist/src/core/furnace-staleness.d.ts +7 -0
  257. package/dist/src/core/furnace-staleness.js +34 -24
  258. package/dist/src/core/furnace-validate-accessibility.d.ts +8 -4
  259. package/dist/src/core/furnace-validate-accessibility.js +71 -28
  260. package/dist/src/core/furnace-validate-exceptions.d.ts +48 -0
  261. package/dist/src/core/furnace-validate-exceptions.js +80 -0
  262. package/dist/src/core/furnace-validate-icon-button.d.ts +7 -0
  263. package/dist/src/core/furnace-validate-icon-button.js +78 -0
  264. package/dist/src/core/furnace-validate.js +1 -1
  265. package/dist/src/core/harness-port-fallback.d.ts +60 -0
  266. package/dist/src/core/harness-port-fallback.js +96 -0
  267. package/dist/src/core/history-log-file.d.ts +61 -0
  268. package/dist/src/core/history-log-file.js +164 -0
  269. package/dist/src/core/history-log.d.ts +2 -1
  270. package/dist/src/core/history-log.js +2 -1
  271. package/dist/src/core/json-preserving-edit.d.ts +22 -0
  272. package/dist/src/core/json-preserving-edit.js +199 -0
  273. package/dist/src/core/line-prefixer.d.ts +18 -0
  274. package/dist/src/core/line-prefixer.js +34 -0
  275. package/dist/src/core/mach.d.ts +7 -0
  276. package/dist/src/core/mach.js +32 -10
  277. package/dist/src/core/module-resolution-preflight.d.ts +19 -3
  278. package/dist/src/core/module-resolution-preflight.js +24 -6
  279. package/dist/src/core/negative-control-compiled.d.ts +27 -0
  280. package/dist/src/core/negative-control-compiled.js +73 -0
  281. package/dist/src/core/negative-control-diff.d.ts +51 -0
  282. package/dist/src/core/negative-control-diff.js +179 -0
  283. package/dist/src/core/negative-control.d.ts +150 -0
  284. package/dist/src/core/negative-control.js +399 -0
  285. package/dist/src/core/objdir-install-manifests.d.ts +73 -0
  286. package/dist/src/core/objdir-install-manifests.js +226 -0
  287. package/dist/src/core/park-store.d.ts +63 -0
  288. package/dist/src/core/park-store.js +216 -0
  289. package/dist/src/core/patch-export-update.d.ts +6 -0
  290. package/dist/src/core/patch-export-update.js +13 -3
  291. package/dist/src/core/patch-export.d.ts +3 -2
  292. package/dist/src/core/patch-export.js +22 -16
  293. package/dist/src/core/patch-files.js +26 -8
  294. package/dist/src/core/patch-lint-checkjs-any-import.d.ts +39 -0
  295. package/dist/src/core/patch-lint-checkjs-any-import.js +63 -0
  296. package/dist/src/core/patch-lint-checkjs-diagnostics.d.ts +17 -0
  297. package/dist/src/core/patch-lint-checkjs-diagnostics.js +32 -0
  298. package/dist/src/core/patch-lint-checkjs.d.ts +10 -1
  299. package/dist/src/core/patch-lint-checkjs.js +20 -13
  300. package/dist/src/core/patch-lint-code-lines.d.ts +59 -0
  301. package/dist/src/core/patch-lint-code-lines.js +105 -0
  302. package/dist/src/core/patch-lint-cross.d.ts +3 -1
  303. package/dist/src/core/patch-lint-cross.js +17 -4
  304. package/dist/src/core/patch-lint-css.d.ts +8 -2
  305. package/dist/src/core/patch-lint-css.js +24 -14
  306. package/dist/src/core/patch-lint-file-size.d.ts +12 -5
  307. package/dist/src/core/patch-lint-file-size.js +22 -11
  308. package/dist/src/core/patch-lint-forward-registration-extended.d.ts +23 -0
  309. package/dist/src/core/patch-lint-forward-registration-extended.js +36 -11
  310. package/dist/src/core/patch-lint-forward-registration.js +10 -0
  311. package/dist/src/core/patch-lint-ignore.d.ts +196 -0
  312. package/dist/src/core/patch-lint-ignore.js +429 -0
  313. package/dist/src/core/patch-lint-ownership.d.ts +10 -0
  314. package/dist/src/core/patch-lint-ownership.js +26 -0
  315. package/dist/src/core/patch-lint-size-thresholds.d.ts +52 -0
  316. package/dist/src/core/patch-lint-size-thresholds.js +110 -0
  317. package/dist/src/core/patch-lint-size.d.ts +117 -0
  318. package/dist/src/core/patch-lint-size.js +331 -0
  319. package/dist/src/core/patch-lint-staged-registration.d.ts +18 -1
  320. package/dist/src/core/patch-lint-staged-registration.js +20 -0
  321. package/dist/src/core/patch-lint-token-scale.d.ts +57 -0
  322. package/dist/src/core/patch-lint-token-scale.js +286 -0
  323. package/dist/src/core/patch-lint.d.ts +11 -83
  324. package/dist/src/core/patch-lint.js +66 -288
  325. package/dist/src/core/patch-lock.js +7 -6
  326. package/dist/src/core/patch-manifest-consistency.js +7 -6
  327. package/dist/src/core/patch-manifest-io.d.ts +6 -3
  328. package/dist/src/core/patch-manifest-io.js +27 -9
  329. package/dist/src/core/patch-manifest-key-order.d.ts +24 -0
  330. package/dist/src/core/patch-manifest-key-order.js +61 -0
  331. package/dist/src/core/patch-manifest-stage.d.ts +46 -0
  332. package/dist/src/core/patch-manifest-stage.js +96 -0
  333. package/dist/src/core/patch-manifest-validate.js +61 -3
  334. package/dist/src/core/patch-order-legal.d.ts +26 -0
  335. package/dist/src/core/patch-order-legal.js +88 -0
  336. package/dist/src/core/patch-policy-content.d.ts +40 -0
  337. package/dist/src/core/patch-policy-content.js +216 -0
  338. package/dist/src/core/patch-policy.d.ts +22 -5
  339. package/dist/src/core/patch-policy.js +26 -12
  340. package/dist/src/core/patch-retired.d.ts +57 -0
  341. package/dist/src/core/patch-retired.js +92 -0
  342. package/dist/src/core/patch-subset.d.ts +16 -0
  343. package/dist/src/core/patch-subset.js +66 -0
  344. package/dist/src/core/preflight-wait.d.ts +20 -0
  345. package/dist/src/core/preflight-wait.js +38 -0
  346. package/dist/src/core/rebase-from-version.d.ts +46 -0
  347. package/dist/src/core/rebase-from-version.js +71 -0
  348. package/dist/src/core/run-log.d.ts +26 -0
  349. package/dist/src/core/run-log.js +106 -4
  350. package/dist/src/core/run-profile.d.ts +7 -0
  351. package/dist/src/core/run-profile.js +7 -1
  352. package/dist/src/core/smoke-patterns.d.ts +5 -0
  353. package/dist/src/core/smoke-patterns.js +13 -0
  354. package/dist/src/core/test-harness-crash.d.ts +19 -1
  355. package/dist/src/core/test-harness-crash.js +8 -9
  356. package/dist/src/core/test-harness-signature.d.ts +33 -0
  357. package/dist/src/core/test-harness-signature.js +23 -1
  358. package/dist/src/core/test-raw-log.d.ts +66 -0
  359. package/dist/src/core/test-raw-log.js +122 -0
  360. package/dist/src/core/test-run-completeness.d.ts +90 -0
  361. package/dist/src/core/test-run-completeness.js +184 -0
  362. package/dist/src/core/test-stale-check.d.ts +27 -1
  363. package/dist/src/core/test-stale-check.js +39 -49
  364. package/dist/src/core/test-stale-exempt.d.ts +40 -0
  365. package/dist/src/core/test-stale-exempt.js +70 -0
  366. package/dist/src/core/test-xpcshell-retry.d.ts +2 -0
  367. package/dist/src/core/test-xpcshell-retry.js +2 -1
  368. package/dist/src/core/token-lint.d.ts +53 -0
  369. package/dist/src/core/token-lint.js +131 -0
  370. package/dist/src/core/token-sibling-sheets.d.ts +46 -0
  371. package/dist/src/core/token-sibling-sheets.js +119 -0
  372. package/dist/src/core/tree-guard.js +5 -0
  373. package/dist/src/core/typecheck-shim.d.ts +6 -2
  374. package/dist/src/core/typecheck-shim.js +205 -4
  375. package/dist/src/core/typecheck.js +3 -1
  376. package/dist/src/index.d.ts +14 -3
  377. package/dist/src/index.js +6 -1
  378. package/dist/src/types/commands/index.d.ts +2 -2
  379. package/dist/src/types/commands/options.d.ts +212 -24
  380. package/dist/src/types/commands/patches.d.ts +118 -1
  381. package/dist/src/types/config.d.ts +264 -0
  382. package/dist/src/types/config.js +9 -0
  383. package/dist/src/types/furnace.d.ts +63 -1
  384. package/dist/src/types/furnace.js +7 -0
  385. package/dist/src/types/index.d.ts +1 -1
  386. package/dist/src/utils/options.d.ts +36 -7
  387. package/dist/src/utils/options.js +94 -8
  388. package/dist/src/utils/path-glob.d.ts +15 -0
  389. package/dist/src/utils/path-glob.js +47 -0
  390. package/dist/src/utils/regex.d.ts +15 -3
  391. package/dist/src/utils/regex.js +37 -16
  392. package/docs/configuration.md +369 -11
  393. package/docs/exit-codes.md +18 -1
  394. package/docs/furnace.md +139 -3
  395. package/docs/lifecycle-invariants.md +65 -30
  396. package/docs/machine-output.md +120 -12
  397. package/docs/patch-workflow.md +458 -22
  398. package/docs/run-logs.md +20 -1
  399. package/docs/testing.md +346 -21
  400. package/package.json +3 -3
@@ -22,10 +22,21 @@ export type { ApplyAllComponentsResult } from './core/furnace-apply.js';
22
22
  export { applyAllComponents } from './core/furnace-apply.js';
23
23
  export { ensureFurnaceConfig, loadFurnaceConfig, loadFurnaceState, saveFurnaceState, validateFurnaceConfig, } from './core/furnace-config.js';
24
24
  export { validateAllComponents, validateComponent } from './core/furnace-validate.js';
25
- export type { PatchSizeTierDecision } from './core/patch-lint.js';
26
- export { countNonBinaryDiffLines, filesMeasuredByFileTooLarge, getPatchSizeThresholds, resolvePatchSizeTier, } from './core/patch-lint.js';
25
+ export type { PatchSizeThresholds, PatchSizeTierDecision } from './core/patch-lint.js';
26
+ export { countNonBinaryDiffLines, filesMeasuredByFileTooLarge, getPatchSizeThresholds, isTestFile, resolvePatchSizeTier, } from './core/patch-lint.js';
27
+ export type { CodeLineCount, CodeLineMask } from './core/patch-lint-code-lines.js';
28
+ export { codeLineMask, countCodeLines } from './core/patch-lint-code-lines.js';
29
+ export type { ResolvedFileSizeTier } from './core/patch-lint-file-size.js';
30
+ export { resolveFileSizeThresholds } from './core/patch-lint-file-size.js';
31
+ export type { PatchSizeMeasurement } from './core/patch-lint-size.js';
32
+ export { measurePatchSize } from './core/patch-lint-size.js';
33
+ export type { ResolvedPatchFilesTier } from './core/patch-lint-size-thresholds.js';
34
+ export { isPatchSizeRegistrationFile } from './core/patch-lint-size-thresholds.js';
35
+ export type { PatchPolicyIssue, PatchPolicyIssueCode } from './core/patch-policy.js';
36
+ export { evaluatePatchPolicyContentForQueue } from './core/patch-policy-content.js';
27
37
  export type { AddTokenOptions, AddTokenResult, TokenMode } from './core/token-manager.js';
28
38
  export { addToken, getTokensCssPath, validateTokenAdd } from './core/token-manager.js';
29
39
  export { CancellationError, CommandError, FireForgeError, GeneralError, InvalidArgumentError, ResolutionError, } from './errors/base.js';
30
40
  export { ExitCode } from './errors/codes.js';
31
- export type { ApplyResult, BuildConfig, ComponentType, CustomComponentConfig, DryRunAction, FireForgeConfig, FirefoxConfig, FirefoxProduct, FurnaceConfig, FurnaceState, OverrideComponentConfig, OverrideType, ProjectLicense, StepError, ValidationIssue, WireConfig, } from './types/index.js';
41
+ export type { PatchesManifest, PatchMetadata } from './types/commands/index.js';
42
+ export type { ApplyResult, BuildConfig, ComponentType, CustomComponentConfig, DryRunAction, FireForgeConfig, FirefoxConfig, FirefoxProduct, FurnaceConfig, FurnaceState, OverrideComponentConfig, OverrideType, PatchLintFileSizeThresholds, PatchLintFileSizeTier, PatchLintPatchSizeMetric, ProjectLicense, StepError, ValidationIssue, WireConfig, } from './types/index.js';
package/dist/src/index.js CHANGED
@@ -21,7 +21,12 @@ export { findForwardRegistrations } from './core/forward-registrations.js';
21
21
  export { applyAllComponents } from './core/furnace-apply.js';
22
22
  export { ensureFurnaceConfig, loadFurnaceConfig, loadFurnaceState, saveFurnaceState, validateFurnaceConfig, } from './core/furnace-config.js';
23
23
  export { validateAllComponents, validateComponent } from './core/furnace-validate.js';
24
- export { countNonBinaryDiffLines, filesMeasuredByFileTooLarge, getPatchSizeThresholds, resolvePatchSizeTier, } from './core/patch-lint.js';
24
+ export { countNonBinaryDiffLines, filesMeasuredByFileTooLarge, getPatchSizeThresholds, isTestFile, resolvePatchSizeTier, } from './core/patch-lint.js';
25
+ export { codeLineMask, countCodeLines } from './core/patch-lint-code-lines.js';
26
+ export { resolveFileSizeThresholds } from './core/patch-lint-file-size.js';
27
+ export { measurePatchSize } from './core/patch-lint-size.js';
28
+ export { isPatchSizeRegistrationFile } from './core/patch-lint-size-thresholds.js';
29
+ export { evaluatePatchPolicyContentForQueue } from './core/patch-policy-content.js';
25
30
  export { addToken, getTokensCssPath, validateTokenAdd } from './core/token-manager.js';
26
31
  export { CancellationError, CommandError, FireForgeError, GeneralError, InvalidArgumentError, ResolutionError, } from './errors/base.js';
27
32
  export { ExitCode } from './errors/codes.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Re-exports all command-related types from focused sub-modules.
3
3
  */
4
- export type { BuildOptions, DiscardOptions, DoctorOptions, DownloadOptions, ExportOptions, FurnaceApplyOptions, FurnaceCreateOptions, FurnaceDeployOptions, FurnaceOverrideOptions, FurnacePreviewOptions, FurnaceRefreshOptions, FurnaceRemoveOptions, FurnaceSyncOptions, FurnaceValidateOptions, ImportOptions, LintCommandOptions, PackageOptions, PatchCompactOptions, PatchDeleteOptions, PatchLintIgnoreOptions, PatchMoveFilesOptions, PatchRenameOptions, PatchReorderOptions, PatchSplitOptions, PatchStagedDependencyOptions, PatchTierOptions, RebaseOptions, ReExportOptions, RegisterOptions, ResetOptions, RunOptions, SetupOptions, SourceSetOptions, StatusOptions, TestOptions, TokenAddOptions, WireOptions, } from './options.js';
5
- export type { ImportSummary, PatchCategory, PatchesManifest, PatchInfo, PatchLintIssue, PatchMetadata, PatchResult, PatchStagedDependencies, PatchStagedForwardImport, PatchStagedRegistration, } from './patches.js';
4
+ export type { BuildOptions, DiscardOptions, DoctorOptions, DownloadOptions, ExportOptions, FurnaceApplyOptions, FurnaceCreateOptions, FurnaceDeployOptions, FurnaceLockWaitable, FurnaceOverrideOptions, FurnacePreviewOptions, FurnaceRefreshOptions, FurnaceRemoveOptions, FurnaceRenameOptions, FurnaceSyncOptions, FurnaceValidateOptions, ImportOptions, LintCommandOptions, PackageOptions, PatchCompactOptions, PatchDeleteOptions, PatchLintIgnoreOptions, PatchMoveFilesOptions, PatchRenameOptions, PatchReorderOptions, PatchReserveOptions, PatchRetireOptions, PatchSplitOptions, PatchStagedDependencyOptions, PatchStageOptions, PatchTierOptions, RebaseOptions, ReExportOptions, RegisterOptions, ResetOptions, RunOptions, SetupOptions, SourceSetOptions, StatusOptions, TestOptions, TokenAddOptions, WireOptions, } from './options.js';
5
+ export type { ImportSummary, LintIgnoreCeiling, LintIgnoreEntry, PatchCategory, PatchesManifest, PatchInfo, PatchLintIssue, PatchLintStagedDeclaration, PatchMetadata, PatchReservedSlot, PatchResult, PatchRetiredSlot, PatchSizeShare, PatchStagedDependencies, PatchStagedForwardImport, PatchStagedRegistration, } from './patches.js';
6
6
  export type { DoctorCheck, TokenCoverageFileEntry, TokenCoverageReport } from './project.js';
@@ -2,7 +2,7 @@
2
2
  * Command option types for CLI commands.
3
3
  */
4
4
  import type { FirefoxProduct, ProjectLicense } from '../config.js';
5
- import type { PatchCategory } from './patches.js';
5
+ import type { PatchCategory, PatchSizeShare } from './patches.js';
6
6
  /**
7
7
  * `--dry-run`: print the planned change and exit without writing anything.
8
8
  *
@@ -111,6 +111,8 @@ export interface SourceSetOptions {
111
111
  export interface BuildOptions extends EngineLockWaitable {
112
112
  /** Wait for the objdir browser before deploying/building. */
113
113
  waitBrowser?: number | boolean;
114
+ /** Also write the run log here, outside `.fireforge/logs/` retention. */
115
+ keepLog?: string;
114
116
  /** Fast UI-only rebuild */
115
117
  ui?: boolean;
116
118
  /** Number of parallel jobs */
@@ -263,7 +265,9 @@ export interface ReExportOptions extends EngineLockWaitable {
263
265
  /**
264
266
  * Explicit engine-relative files to add while scanning. Unlike broad
265
267
  * `--scan`, this does not collect adjacent files from the same directory.
266
- * Requires `--scan` and exactly one target patch.
268
+ * Requires `--scan`. A `<patch>:<path>` entry names its owning patch, which
269
+ * a call with several target patches requires; selected patches without
270
+ * an entry then refresh scan-less.
267
271
  */
268
272
  scanFiles?: string[];
269
273
  /**
@@ -330,8 +334,8 @@ export interface ReExportOptions extends EngineLockWaitable {
330
334
  * unmanaged files exist adjacent to the patch's ownership, instead of
331
335
  * warning. Gate-driven workflows use this so a freshly created file
332
336
  * beside a patch's owned files cannot be silently left out of the
333
- * refreshed body. Only meaningful on the plain path, and mutually
334
- * exclusive with `--scan` and `--files`, which set filesAffected
337
+ * refreshed body. Beside `--scan` it judges the neighbours the scan did
338
+ * not adopt. Mutually exclusive with `--files`, which sets filesAffected
335
339
  * explicitly.
336
340
  */
337
341
  refuseAdjacentUnmanaged?: boolean;
@@ -343,11 +347,13 @@ export interface ReExportOptions extends EngineLockWaitable {
343
347
  noCache?: boolean;
344
348
  /**
345
349
  * Refuse (non-zero exit, patch not written) a re-export whose refreshed
346
- * body would absorb engine lines not present in the old patch body.
350
+ * body would add or drop lines, in a file the patch already owns, that
351
+ * the old patch body did not carry.
347
352
  * This is the multi-session guard against silently capturing another
348
353
  * session's uncommitted edits in files the patch already owns. The drift preview
349
- * always prints. This flag turns it into a hard stop. Mutually
350
- * exclusive with `--scan` and `--files`.
354
+ * always prints. This flag turns it into a hard stop. Beside `--scan` it
355
+ * guards the files each patch already owns (adopted files count as
356
+ * expected). Mutually exclusive with `--files`.
351
357
  */
352
358
  refuseForeignDrift?: boolean;
353
359
  /**
@@ -370,8 +376,44 @@ export interface ReExportOptions extends EngineLockWaitable {
370
376
  * rather than hidden.
371
377
  */
372
378
  expectUnmanaged?: string[];
373
- /** Explicitly retire named absent patch-created files in a scan-less export. */
379
+ /**
380
+ * Engine-relative files this session created and will adopt with its next
381
+ * export (`--expect-new`, repeatable). Requires
382
+ * `--refuse-adjacent-unmanaged`. Lets the owners of a new file's
383
+ * registration re-export first while a peer's unmanaged neighbour still
384
+ * refuses. The path must be changed in engine/ and owned by no patch.
385
+ */
386
+ expectNew?: string[];
387
+ /**
388
+ * Reviewed ignore list for `--refuse-adjacent-unmanaged`
389
+ * (`--adjacent-ignore`, repeatable): an engine-relative path, or a glob
390
+ * whose `*` stays within one segment (`**` is refused). Matches are
391
+ * reported, never refused.
392
+ */
393
+ adjacentIgnore?: string[];
394
+ /**
395
+ * Explicitly retire named files in a scan-less export: an absent file the
396
+ * patch created, or a patch-modified upstream file whose engine copy is
397
+ * back at HEAD.
398
+ */
374
399
  expectRemoved?: string[];
400
+ /**
401
+ * Where a refused `--scan` adoption writes its one `--from`-ready
402
+ * declaration report (`--declarations-out`). Defaults to
403
+ * `.fireforge/declarations/`.
404
+ */
405
+ declarationsOut?: string;
406
+ /**
407
+ * `--hunks-from <diff>`: export each named file as the patch's current
408
+ * body plus only the hunks in this diff, leaving every other session's
409
+ * edits in the file out.
410
+ */
411
+ hunksFrom?: string;
412
+ /**
413
+ * `--exclude-hunks <diff>`: export each named file as the working tree
414
+ * minus the hunks in this diff.
415
+ */
416
+ excludeHunks?: string;
375
417
  }
376
418
  /**
377
419
  * Options for the `fireforge patch tier` subcommand. Sets or clears the
@@ -396,6 +438,20 @@ export interface PatchLintIgnoreOptions extends Confirmable, DryRunnable, PatchL
396
438
  remove?: string[];
397
439
  /** Drop the `lintIgnore` field entirely. */
398
440
  clear?: boolean;
441
+ /**
442
+ * With `add`: write `{ rule, max, reason }` ceiling entries instead of
443
+ * bare IDs. Only the measured size rules accept one. Requires `reason`.
444
+ */
445
+ max?: number;
446
+ /** Why the ceiling exists. Required with `max` or a `<rule>=<max>` add. */
447
+ reason?: string;
448
+ /** With a ceiling on `large-patch-lines`: the share it bounds. */
449
+ share?: PatchSizeShare;
450
+ /**
451
+ * Add every entry in a JSON file under one lock hold: an array of
452
+ * entries, or a lint report whose ceilings for the patch are rebaselined.
453
+ */
454
+ from?: string;
399
455
  }
400
456
  /**
401
457
  * Options for the `fireforge patch staged-dependency` subcommand. Modes are
@@ -430,6 +486,11 @@ export interface PatchStagedDependencyOptions extends Confirmable, DryRunnable,
430
486
  owner?: string;
431
487
  /** Optional human-readable rationale stored with the declaration. */
432
488
  reason?: string;
489
+ /**
490
+ * JSON file of declarations to add in one call (`--add` only): a
491
+ * `lint --per-patch --report` document or a plain array of declarations.
492
+ */
493
+ from?: string;
433
494
  }
434
495
  /**
435
496
  * Options for the `patch split` command.
@@ -453,6 +514,8 @@ export interface PatchSplitOptions extends Confirmable, PatchLockWaitable, Unsaf
453
514
  dryRun?: boolean;
454
515
  /** Skip per-patch lint of the projected bodies. */
455
516
  skipLint?: boolean;
517
+ /** Where a refusal writes its one `--from`-ready declaration report. */
518
+ declarationsOut?: string;
456
519
  }
457
520
  /**
458
521
  * Options for the `fireforge patch move-files` subcommand. Without
@@ -476,6 +539,8 @@ export interface PatchMoveFilesOptions extends Confirmable, PatchLockWaitable, U
476
539
  dryRun?: boolean;
477
540
  /** Skip per-patch lint of the projected bodies. */
478
541
  skipLint?: boolean;
542
+ /** Where a refusal writes its one `--from`-ready declaration report. */
543
+ declarationsOut?: string;
479
544
  }
480
545
  /**
481
546
  * Options for the rebase command.
@@ -510,6 +575,16 @@ export interface RunOptions {
510
575
  * Implied by `smokeExit` unless `profile` is given.
511
576
  */
512
577
  tempProfile?: boolean;
578
+ /**
579
+ * Pass `-purgecaches` with a named `profile`, so Firefox discards the
580
+ * profile's startup cache (compiled chrome scripts) before it runs. A UI
581
+ * build keeps the build id the cache is keyed on, so a kept profile would
582
+ * otherwise run the chrome scripts an earlier build cached. Default
583
+ * `true`; `--no-purge-caches` sets `false`. Fresh temporary profiles and
584
+ * mach's own profile-default (cleaned before every run) have no cache to
585
+ * purge.
586
+ */
587
+ purgeCaches?: boolean;
513
588
  /**
514
589
  * Enable smoke-run mode. Launches the browser, streams the console,
515
590
  * sends SIGTERM to the whole process group after `smokeExit` seconds,
@@ -520,7 +595,9 @@ export interface RunOptions {
520
595
  * - `ExitCode.SMOKE_LAUNCH_FAILURE` (13): the browser exited with a
521
596
  * non-clean status before the smoke window elapsed (a launch-side
522
597
  * failure we cannot observe as a console line, such as a crash
523
- * before console wiring, or a missing profile).
598
+ * before console wiring, or a missing profile), or exited before the
599
+ * window with no browser console output at all (a launch that never
600
+ * reached a window, such as a profile in a startup-crash streak).
524
601
  *
525
602
  * POSIX only (process-group semantics do not map cleanly onto Windows).
526
603
  * `runSmokeExit` rejects the flag up front on `win32`.
@@ -559,6 +636,10 @@ export interface TestOptions extends EngineLockWaitable {
559
636
  waitBrowser?: number | boolean;
560
637
  /** Queue behind the mochitest/Marionette port holder. */
561
638
  waitPort?: number | boolean;
639
+ /** Also write the run log here, outside `.fireforge/logs/` retention. */
640
+ keepLog?: string;
641
+ /** Forward mochitest's `--restart-between-tests` (mochitest dispatch only). */
642
+ restartBetweenTests?: boolean;
562
643
  /** Copy a file into the profile at a relative destination (repeatable source=destination). */
563
644
  profileFile?: string[];
564
645
  /** Run tests in headless mode */
@@ -580,13 +661,11 @@ export interface TestOptions extends EngineLockWaitable {
580
661
  */
581
662
  buildOnly?: boolean;
582
663
  /**
583
- * Union the paths this build packages onto the recorded coverage claim
584
- * instead of REPLACING it, so successive scoped builds accumulate and an
585
- * earlier slice's build-less runs stay covered. Valid only with
586
- * `--build`/`--build-only` and explicit paths. Refused fail-closed unless
587
- * the build anchor is unchanged: same engine HEAD, same `engine/mozconfig`,
588
- * and every previously fingerprinted packageable file byte-identical. See
589
- * `src/core/coverage-extend.ts`.
664
+ * Refuse, before the build, instead of dropping any earlier packaging
665
+ * claim. Scoped builds keep earlier paths by default while each path's own
666
+ * staging inputs and `engine/mozconfig` are unchanged; this flag makes a
667
+ * drop fail-closed. Valid only with `--build`/`--build-only` and explicit
668
+ * paths. See `src/core/coverage-extend.ts`.
590
669
  */
591
670
  extendCoverage?: boolean;
592
671
  /**
@@ -598,6 +677,13 @@ export interface TestOptions extends EngineLockWaitable {
598
677
  * that could not arm the refusal. Valid only with `--build`/`--build-only`.
599
678
  */
600
679
  refuseUnexportedDrift?: boolean;
680
+ /**
681
+ * Which components the pre-test build deploys: `all` (default), `reached`
682
+ * (only those a requested test reaches) or `none`. `false` is
683
+ * `--no-furnace-apply`, the same as `none`. Valid only with
684
+ * `--build`/`--build-only`.
685
+ */
686
+ furnaceApply?: boolean | 'all' | 'reached' | 'none';
601
687
  /** Forward mach's pathless auto-selection mode. Valid only with no explicit paths. */
602
688
  auto?: boolean;
603
689
  /**
@@ -691,6 +777,37 @@ export interface TestOptions extends EngineLockWaitable {
691
777
  * `FIREFORGE_SHUFFLE_SEED` for custom task code and recorded on the verdict.
692
778
  */
693
779
  shuffle?: number | boolean;
780
+ /**
781
+ * Run the same selection this many times under one engine-lock hold (the
782
+ * pre-test build, when requested, runs once). Each run prints a
783
+ * `FIREFORGE-RUN:` line; the verdict aggregates them with `runs=<p>/<n>`.
784
+ */
785
+ repeat?: number;
786
+ /**
787
+ * Project-relative path of a reviewed `git diff` against `engine/` or
788
+ * `components/` sources, applied after the pre-test build and before each
789
+ * dispatch, and restored byte-exact before the lock is released. The
790
+ * verdict carries `control=caught|missed|inconclusive`. See
791
+ * `src/core/negative-control.ts`.
792
+ */
793
+ negativeControl?: string;
794
+ /**
795
+ * Let a browser run proceed when the mochitest server or Marionette port
796
+ * is held by something that is not this checkout's own, relying on the
797
+ * engine harness's busy-port fallback. Same as `test.mochitestPorts: "auto"`.
798
+ */
799
+ autoPorts?: boolean;
800
+ /**
801
+ * Hold the engine session lock shared for a build-less run with auto
802
+ * ports, so peers' build-less runs overlap. Same as `test.lockMode: "shared"`.
803
+ */
804
+ sharedLock?: boolean;
805
+ /** Run shards on this many harness instances at once (requires auto ports). */
806
+ jobs?: number;
807
+ /** Dispatch n files per mach invocation, judged per file from the raw log. */
808
+ shardSize?: number;
809
+ /** Write per-file results (mozlog raw log) as JSON to this path. */
810
+ results?: string;
694
811
  }
695
812
  /**
696
813
  * Options for the furnace apply command.
@@ -707,10 +824,24 @@ export interface FurnaceApplyOptions extends DryRunnable {
707
824
  */
708
825
  waitLockSeconds?: number;
709
826
  }
827
+ /**
828
+ * `--wait-lock` budget for a furnace command that takes only Furnace's own
829
+ * lock (`.fireforge/furnace.lock`, via `runFurnaceMutation`): `create`,
830
+ * `remove`, `rename`, `refresh`, `scan`, `override`, `preview` and the
831
+ * `chrome-doc` pair. Without it the flag was accepted and ignored on those
832
+ * commands, so their lock budget came only from `FIREFORGE_WAIT_LOCK`.
833
+ */
834
+ export interface FurnaceLockWaitable {
835
+ /**
836
+ * Resolved `--wait-lock` budget in seconds, or undefined for the default
837
+ * (`FIREFORGE_WAIT_LOCK`, else the furnace lock's own 30 s).
838
+ */
839
+ waitLockSeconds?: number;
840
+ }
710
841
  /**
711
842
  * Options for the furnace preview command.
712
843
  */
713
- export interface FurnacePreviewOptions {
844
+ export interface FurnacePreviewOptions extends FurnaceLockWaitable {
714
845
  /** Force reinstall Storybook dependencies */
715
846
  install?: boolean;
716
847
  }
@@ -732,7 +863,7 @@ export interface FurnaceDeployOptions extends DryRunnable {
732
863
  /**
733
864
  * Options for the furnace refresh command.
734
865
  */
735
- export interface FurnaceRefreshOptions extends DryRunnable {
866
+ export interface FurnaceRefreshOptions extends DryRunnable, FurnaceLockWaitable {
736
867
  /** Refresh all overrides in a single batch */
737
868
  all?: boolean;
738
869
  /** Conflict resolution strategy for automated use (ours = keep local, theirs = accept upstream) */
@@ -740,6 +871,11 @@ export interface FurnaceRefreshOptions extends DryRunnable {
740
871
  /** Reset the override's baseline to the current engine HEAD, skipping three-way merge */
741
872
  resetBase?: boolean;
742
873
  }
874
+ /**
875
+ * Options for the furnace rename command.
876
+ */
877
+ export interface FurnaceRenameOptions extends DryRunnable, FurnaceLockWaitable {
878
+ }
743
879
  /**
744
880
  * Options for the furnace sync command.
745
881
  */
@@ -759,25 +895,30 @@ export interface FurnaceSyncOptions extends DryRunnable {
759
895
  export interface FurnaceValidateOptions {
760
896
  /** Auto-fix registration issues (missing jar.mn entries, customElements.js registration) */
761
897
  fix?: boolean;
898
+ /** Write one schemaVersion-1 JSON document to stdout instead of the human report. */
899
+ json?: boolean;
900
+ /** Fail when more than this many warnings remain after `validationExceptions`. */
901
+ maxWarnings?: number;
762
902
  }
763
903
  /**
764
904
  * Options for the furnace override command.
765
905
  */
766
- export interface FurnaceOverrideOptions {
906
+ export interface FurnaceOverrideOptions extends FurnaceLockWaitable {
767
907
  /** Override type: css-only or full */
768
908
  type?: 'css-only' | 'full';
769
909
  /** Description of the override */
770
910
  description?: string;
771
911
  }
772
912
  /**
773
- * Options for the furnace remove command. `--yes` is the only flag it takes,
774
- * so the type is the confirmation mixin under a command-specific name.
913
+ * Options for the furnace remove command: the confirmation mixin plus the
914
+ * furnace lock budget.
775
915
  */
776
- export type FurnaceRemoveOptions = Confirmable;
916
+ export interface FurnaceRemoveOptions extends Confirmable, FurnaceLockWaitable {
917
+ }
777
918
  /**
778
919
  * Options for the furnace create command.
779
920
  */
780
- export interface FurnaceCreateOptions {
921
+ export interface FurnaceCreateOptions extends FurnaceLockWaitable {
781
922
  /** Component description */
782
923
  description?: string;
783
924
  /**
@@ -883,6 +1024,35 @@ export interface RegisterOptions {
883
1024
  export interface PatchDeleteOptions extends Confirmable, DryRunnable, PatchLockWaitable {
884
1025
  /** Bypass the hard refusal when later patches depend on the target. */
885
1026
  forceUnsafe?: boolean;
1027
+ /** Also delete the engine files the patch creates that are still on disk. */
1028
+ deleteCreated?: boolean;
1029
+ }
1030
+ /**
1031
+ * Options for the `fireforge patch retire` subcommand: `patch delete` that
1032
+ * keeps the removed patch's order as a retired slot in `patches.json`.
1033
+ */
1034
+ export interface PatchRetireOptions extends PatchDeleteOptions {
1035
+ /** Optional human-readable rationale stored on the retired slot. */
1036
+ reason?: string;
1037
+ }
1038
+ /**
1039
+ * Options for the `fireforge patch stage` subcommand: stage the named
1040
+ * patches' files and only their `patches.json` rows in the project index.
1041
+ */
1042
+ export type PatchStageOptions = DryRunnable & PatchLockWaitable;
1043
+ /**
1044
+ * Options for the `fireforge patch reserve` subcommand: hold an order
1045
+ * number for a patch not exported yet, or release the hold.
1046
+ */
1047
+ export interface PatchReserveOptions extends DryRunnable, PatchLockWaitable {
1048
+ /** Category the reserved patch will carry (required to reserve). */
1049
+ category?: string;
1050
+ /** Who holds the reservation (required to reserve). */
1051
+ owner?: string;
1052
+ /** Optional human-readable rationale stored on the reserved slot. */
1053
+ reason?: string;
1054
+ /** Release the reservation at the order instead of creating one. */
1055
+ release?: boolean;
886
1056
  }
887
1057
  /**
888
1058
  * Options for the `fireforge patch rename` subcommand. Updates the patch's
@@ -991,9 +1161,27 @@ export interface StatusOptions {
991
1161
  /**
992
1162
  * Comma-separated classification list replacing the default `--check`
993
1163
  * policy. Implies `--check`. Unknown values refuse, naming the valid
994
- * classification set.
1164
+ * classification set. `ownership-conflict` (a path claimed by more than
1165
+ * one patch) is accepted beside the file classifications.
995
1166
  */
996
1167
  failOn?: string;
1168
+ /**
1169
+ * Comma-separated classification list that never fails `--check`,
1170
+ * removed from the fail set. Implies `--check`. Naming a class in both
1171
+ * `failOn` and `allow` refuses.
1172
+ */
1173
+ allow?: string;
1174
+ /**
1175
+ * With `allow`: fail on every present classification that neither
1176
+ * `failOn` nor `allow` names, so a classification added by a later
1177
+ * FireForge fails closed. Implies `--check`.
1178
+ */
1179
+ failOnUnknown?: boolean;
1180
+ /**
1181
+ * Judge only these patches (`--patches`, each value may be a comma
1182
+ * list): files they own or claim and ownership rows naming them.
1183
+ */
1184
+ patches?: string[];
997
1185
  }
998
1186
  /**
999
1187
  * Options for the token add command.
@@ -51,6 +51,38 @@ export interface PatchResult {
51
51
  */
52
52
  autoResolvedOriginals?: Map<string, Uint8Array>;
53
53
  }
54
+ /**
55
+ * A size waiver with a ceiling, one form of a `PatchMetadata.lintIgnore`
56
+ * entry. The named size rule stays suppressed while its measurement is at
57
+ * or below `max` and fires again past it, so a waived file cannot grow
58
+ * without bound. Only the measured size rules (`file-too-large`,
59
+ * `large-patch-lines`, `large-patch-files`) accept a ceiling.
60
+ */
61
+ export interface LintIgnoreCeiling {
62
+ /** Size rule check ID the waiver applies to. */
63
+ rule: string;
64
+ /** Largest measurement (lines or files) the waiver still suppresses. */
65
+ max: number;
66
+ /** Why the waiver exists. Required so the ceiling is reviewable. */
67
+ reason: string;
68
+ /**
69
+ * Which share of a split `large-patch-lines` measurement the ceiling
70
+ * bounds: `product` (non-test files) or `test` (test files, held to the
71
+ * test tier). Absent: every finding of the rule. Only valid on
72
+ * `large-patch-lines`, and a rule carries either one share-less ceiling
73
+ * or at most one ceiling per share.
74
+ */
75
+ share?: PatchSizeShare;
76
+ /**
77
+ * Free-form JSON object FireForge preserves and never reads: a place for
78
+ * a project's own waiver bookkeeping (kind, owner, exit condition).
79
+ */
80
+ meta?: Record<string, unknown>;
81
+ }
82
+ /** The two classes a split `addedCode` line measurement reports. */
83
+ export type PatchSizeShare = 'test' | 'product';
84
+ /** One `PatchMetadata.lintIgnore` entry: a bare check ID or a ceiling waiver. */
85
+ export type LintIgnoreEntry = string | LintIgnoreCeiling;
54
86
  /**
55
87
  * Extended patch information with metadata.
56
88
  */
@@ -91,8 +123,11 @@ export interface PatchMetadata {
91
123
  * listed here still run normally. An entry for an unknown check ID is a
92
124
  * no-op: the metadata documents the intent to suppress even if the check
93
125
  * is later renamed or removed.
126
+ *
127
+ * An entry may instead be a {@link LintIgnoreCeiling}, which waives a size
128
+ * rule only up to a measured maximum.
94
129
  */
95
- lintIgnore?: string[];
130
+ lintIgnore?: LintIgnoreEntry[];
96
131
  /**
97
132
  * Optional per-patch threshold-tier override for the `large-patch-lines`
98
133
  * rule. Exists for branding patches that must touch a small number of
@@ -171,6 +206,26 @@ export interface PatchStagedRegistration {
171
206
  /** Optional human-readable rationale for the staged dependency. */
172
207
  reason?: string;
173
208
  }
209
+ /**
210
+ * A staged-dependency declaration a lint finding proposes: the arguments of
211
+ * one `patch staged-dependency <patch> --add` call.
212
+ */
213
+ export interface PatchLintStagedDeclaration {
214
+ /** Patch that must carry the declaration. */
215
+ patch: string;
216
+ /** Declaration kind (`--kind`). */
217
+ kind: 'import' | 'registration';
218
+ /** Declaring file path relative to engine/. */
219
+ file: string;
220
+ /** Import specifier (`kind: import`). */
221
+ specifier?: string;
222
+ /** Registration line as the patch adds it (`kind: registration`). */
223
+ line?: string;
224
+ /** Later-created file path relative to engine/. */
225
+ creates: string;
226
+ /** Later patch that creates it. */
227
+ owner: string;
228
+ }
174
229
  /**
175
230
  * Schema for patches/patches.json file.
176
231
  */
@@ -179,6 +234,49 @@ export interface PatchesManifest {
179
234
  version: 1;
180
235
  /** Array of patch metadata entries */
181
236
  patches: PatchMetadata[];
237
+ /**
238
+ * Order numbers a `patch retire` emptied on purpose. A retired slot has no
239
+ * `.patch` file and no row in `patches`, so apply, export, lint and rebase
240
+ * never see it; only the `patchPolicy.allowGaps: false` gap check reads it,
241
+ * as an occupied order. A patch that later takes the same order fills the
242
+ * slot, and the slot is dropped on that write.
243
+ */
244
+ retired?: PatchRetiredSlot[];
245
+ /**
246
+ * Order numbers `patch reserve` holds for a patch a session has agreed to
247
+ * export but has not exported yet. Like a retired slot, a reservation is
248
+ * read only by the `patchPolicy.allowGaps: false` gap check (as an
249
+ * occupied order) and by the earliest-legal-order search (as taken); the
250
+ * export that lands on the order fills it, and the slot is dropped on that
251
+ * write.
252
+ */
253
+ reserved?: PatchReservedSlot[];
254
+ }
255
+ /** One order held by `patch reserve` until its owner exports it. */
256
+ export interface PatchReservedSlot {
257
+ /** The reserved order number. */
258
+ order: number;
259
+ /** Category the reserved patch will carry, so the slot stays in its range. */
260
+ category: PatchCategory;
261
+ /** Who holds the reservation: a session label or the planned filename. */
262
+ owner: string;
263
+ /** ISO timestamp of the reservation. */
264
+ reservedAt: string;
265
+ /** Optional human-readable rationale. */
266
+ reason?: string;
267
+ }
268
+ /** One placeholder left by `patch retire`. */
269
+ export interface PatchRetiredSlot {
270
+ /** The order number the retired patch held. */
271
+ order: number;
272
+ /** Category of the retired patch, kept so the slot stays in its range. */
273
+ category: PatchCategory;
274
+ /** Filename of the retired patch, for the audit trail only. */
275
+ filename: string;
276
+ /** ISO timestamp of the retirement. */
277
+ retiredAt: string;
278
+ /** Optional human-readable rationale. */
279
+ reason?: string;
182
280
  }
183
281
  /**
184
282
  * Summary of import operation with continue mode.
@@ -221,6 +319,13 @@ export interface PatchLintIssue {
221
319
  * rename-sensitive fingerprint.
222
320
  */
223
321
  patches?: string[];
322
+ /**
323
+ * For a `forward-import` or `forward-registration` finding: the staged
324
+ * declarations that would discharge it, one per later creator. The same
325
+ * records the printed `patch staged-dependency --add` commands carry, in
326
+ * the shape `patch staged-dependency --from` reads back.
327
+ */
328
+ stagedDeclarations?: PatchLintStagedDeclaration[];
224
329
  /** Severity: errors block export, warnings are advisory, notices are informational (not counted) */
225
330
  severity: 'error' | 'warning' | 'notice';
226
331
  /**
@@ -232,4 +337,16 @@ export interface PatchLintIssue {
232
337
  * introduced by the current task.
233
338
  */
234
339
  tag?: 'introduced' | 'cumulative';
340
+ /**
341
+ * The value a size rule measured (lines for `file-too-large` and
342
+ * `large-patch-lines`, files for `large-patch-files`). A lintIgnore
343
+ * ceiling compares against it, and `lint --report` carries it.
344
+ */
345
+ measurement?: number;
346
+ /**
347
+ * For a `large-patch-lines` finding under `patchSizeMetric: "addedCode"`
348
+ * on a general-tier patch: which share of the patch it measured. A
349
+ * share-scoped lintIgnore ceiling matches only findings of its share.
350
+ */
351
+ share?: PatchSizeShare;
235
352
  }