@visulima/vis 1.0.0-alpha.9 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/CHANGELOG.md +1844 -3
  2. package/LICENSE.md +13515 -10
  3. package/README.md +215 -39
  4. package/bin/resolve-binary.mjs +85 -0
  5. package/bin/vis.mjs +76 -0
  6. package/dashboard/dist/index.html +152 -0
  7. package/dist/bin.d.ts +1 -0
  8. package/dist/bin.js +1 -2
  9. package/dist/binx.js +3 -0
  10. package/dist/config/index.d.ts +3276 -0
  11. package/dist/config/index.js +1 -0
  12. package/dist/generate/index.d.ts +1 -1
  13. package/dist/generate/index.js +1 -1
  14. package/dist/packem_chunks/CONFIG_FILES.js +8 -0
  15. package/dist/packem_chunks/DEFAULT_CLEAN_KEEP.js +1 -0
  16. package/dist/packem_chunks/agent-instructions.js +11 -0
  17. package/dist/packem_chunks/bloom-status.js +2 -0
  18. package/dist/packem_chunks/bloom-sync.js +2 -0
  19. package/dist/packem_chunks/cache-attestation.js +1 -0
  20. package/dist/packem_chunks/catalog-detector.js +1 -0
  21. package/dist/packem_chunks/catalog.js +114 -0
  22. package/dist/packem_chunks/cli-exec.js +1 -0
  23. package/dist/packem_chunks/cli-main.js +268 -0
  24. package/dist/packem_chunks/defineReleasePlugin.js +3 -0
  25. package/dist/packem_chunks/detect.js +3 -0
  26. package/dist/packem_chunks/detect2.js +8 -0
  27. package/dist/packem_chunks/devtools.js +4 -0
  28. package/dist/packem_chunks/discord.js +4 -0
  29. package/dist/packem_chunks/dispatch.js +4 -0
  30. package/dist/packem_chunks/doctor-probe.js +2 -0
  31. package/dist/packem_chunks/dynamic-import.js +1 -0
  32. package/dist/packem_chunks/extra-files.js +3 -0
  33. package/dist/packem_chunks/fix.js +11 -0
  34. package/dist/packem_chunks/git.js +3 -0
  35. package/dist/packem_chunks/group-tags.js +1 -0
  36. package/dist/packem_chunks/handler.js +1 -1
  37. package/dist/packem_chunks/handler10.js +5 -1
  38. package/dist/packem_chunks/handler11.js +1 -1
  39. package/dist/packem_chunks/handler12.js +26 -152
  40. package/dist/packem_chunks/handler13.js +5 -1
  41. package/dist/packem_chunks/handler14.js +1 -3
  42. package/dist/packem_chunks/handler15.js +1 -1
  43. package/dist/packem_chunks/handler16.js +1 -2
  44. package/dist/packem_chunks/handler17.js +1 -7
  45. package/dist/packem_chunks/handler18.js +1 -1
  46. package/dist/packem_chunks/handler19.js +5 -19
  47. package/dist/packem_chunks/handler2.js +1 -1
  48. package/dist/packem_chunks/handler20.js +2 -428
  49. package/dist/packem_chunks/handler21.js +2 -22
  50. package/dist/packem_chunks/handler22.js +14 -3
  51. package/dist/packem_chunks/handler23.js +1 -5
  52. package/dist/packem_chunks/handler24.js +1 -1
  53. package/dist/packem_chunks/handler25.js +1 -20
  54. package/dist/packem_chunks/handler26.js +5 -1
  55. package/dist/packem_chunks/handler27.js +1 -1
  56. package/dist/packem_chunks/handler28.js +3 -1
  57. package/dist/packem_chunks/handler29.js +1 -2
  58. package/dist/packem_chunks/handler3.js +4 -2
  59. package/dist/packem_chunks/handler30.js +1 -22
  60. package/dist/packem_chunks/handler31.js +2 -1
  61. package/dist/packem_chunks/handler32.js +2 -1
  62. package/dist/packem_chunks/handler33.js +2 -37
  63. package/dist/packem_chunks/handler34.js +3 -3
  64. package/dist/packem_chunks/handler35.js +6 -23
  65. package/dist/packem_chunks/handler36.js +1 -5
  66. package/dist/packem_chunks/handler37.js +36 -21
  67. package/dist/packem_chunks/handler38.js +8 -1
  68. package/dist/packem_chunks/handler39.js +9 -2
  69. package/dist/packem_chunks/handler4.js +4 -5
  70. package/dist/packem_chunks/handler40.js +75 -1
  71. package/dist/packem_chunks/handler41.js +5 -5
  72. package/dist/packem_chunks/handler42.js +4 -1
  73. package/dist/packem_chunks/handler43.js +3 -24
  74. package/dist/packem_chunks/handler44.js +2 -3
  75. package/dist/packem_chunks/handler45.js +1 -1
  76. package/dist/packem_chunks/handler46.js +1 -0
  77. package/dist/packem_chunks/handler47.js +1 -0
  78. package/dist/packem_chunks/handler48.js +3 -0
  79. package/dist/packem_chunks/handler49.js +1 -0
  80. package/dist/packem_chunks/handler5.js +6 -4
  81. package/dist/packem_chunks/handler50.js +7 -0
  82. package/dist/packem_chunks/handler51.js +33 -0
  83. package/dist/packem_chunks/handler52.js +3 -0
  84. package/dist/packem_chunks/handler53.js +8 -0
  85. package/dist/packem_chunks/handler54.js +4 -0
  86. package/dist/packem_chunks/handler55.js +1 -0
  87. package/dist/packem_chunks/handler56.js +12 -0
  88. package/dist/packem_chunks/handler57.js +11 -0
  89. package/dist/packem_chunks/handler58.js +5 -0
  90. package/dist/packem_chunks/handler59.js +11 -0
  91. package/dist/packem_chunks/handler6.js +8 -2
  92. package/dist/packem_chunks/handler60.js +3 -0
  93. package/dist/packem_chunks/handler61.js +22 -0
  94. package/dist/packem_chunks/handler62.js +61 -0
  95. package/dist/packem_chunks/handler63.js +3 -0
  96. package/dist/packem_chunks/handler64.js +6 -0
  97. package/dist/packem_chunks/handler65.js +9 -0
  98. package/dist/packem_chunks/handler66.js +2 -0
  99. package/dist/packem_chunks/handler67.js +24 -0
  100. package/dist/packem_chunks/handler68.js +25 -0
  101. package/dist/packem_chunks/handler69.js +153 -0
  102. package/dist/packem_chunks/handler7.js +1 -24
  103. package/dist/packem_chunks/handler70.js +10 -0
  104. package/dist/packem_chunks/handler71.js +23 -0
  105. package/dist/packem_chunks/handler72.js +322 -0
  106. package/dist/packem_chunks/handler73.js +708 -0
  107. package/dist/packem_chunks/handler74.js +48 -0
  108. package/dist/packem_chunks/handler75.js +27 -0
  109. package/dist/packem_chunks/handler76.js +3 -0
  110. package/dist/packem_chunks/handler77.js +190 -0
  111. package/dist/packem_chunks/handler78.js +38 -0
  112. package/dist/packem_chunks/handler8.js +1 -6
  113. package/dist/packem_chunks/handler9.js +1 -8
  114. package/dist/packem_chunks/heal-accept.js +10 -0
  115. package/dist/packem_chunks/heal.js +14 -0
  116. package/dist/packem_chunks/help-command.js +31 -0
  117. package/dist/packem_chunks/index.js +1 -7
  118. package/dist/packem_chunks/index2.js +802 -0
  119. package/dist/packem_chunks/index3.js +7 -0
  120. package/dist/packem_chunks/index4.js +135 -0
  121. package/dist/packem_chunks/index5.js +74 -0
  122. package/dist/packem_chunks/interface.js +2 -0
  123. package/dist/packem_chunks/keys-refresh.js +4 -0
  124. package/dist/packem_chunks/lean.js +4 -0
  125. package/dist/packem_chunks/list.js +3 -0
  126. package/dist/packem_chunks/loader.js +4 -1
  127. package/dist/packem_chunks/loader2.js +1 -0
  128. package/dist/packem_chunks/orchestrator.js +42 -0
  129. package/dist/packem_chunks/pre-mode.js +2 -0
  130. package/dist/packem_chunks/print-config.js +2 -0
  131. package/dist/packem_chunks/prompts.js +7 -0
  132. package/dist/packem_chunks/prune.js +3 -0
  133. package/dist/packem_chunks/publish-guards.js +1 -0
  134. package/dist/packem_chunks/registry.js +48 -0
  135. package/dist/packem_chunks/resolveFormatter.js +9 -0
  136. package/dist/packem_chunks/run.js +1 -0
  137. package/dist/packem_chunks/security.js +1 -0
  138. package/dist/packem_chunks/shell-runner.js +1 -0
  139. package/dist/packem_chunks/slack.js +2 -0
  140. package/dist/packem_chunks/snapshot.js +2 -0
  141. package/dist/packem_chunks/stage-publisher.js +1 -0
  142. package/dist/packem_chunks/staged-registry.js +2 -0
  143. package/dist/packem_chunks/state.js +3 -0
  144. package/dist/packem_chunks/status.js +2 -0
  145. package/dist/packem_chunks/success-walk.js +8 -0
  146. package/dist/packem_chunks/sync.js +2 -0
  147. package/dist/packem_chunks/sync2.js +2 -0
  148. package/dist/packem_chunks/tar.js +3 -0
  149. package/dist/packem_chunks/tripwire.js +2 -0
  150. package/dist/packem_chunks/ts-loader.js +22 -0
  151. package/dist/packem_chunks/verify-lockfile.js +2 -0
  152. package/dist/packem_chunks/version-resolver.js +2 -0
  153. package/dist/packem_chunks/webhook.js +1 -0
  154. package/dist/packem_chunks/workflow-templates.js +167 -0
  155. package/dist/packem_chunks/workspace.js +2 -0
  156. package/dist/packem_shared/AfterAllProjectsVersioned-CAKI2nWf.js +1 -0
  157. package/dist/packem_shared/MultiSpinner-B9U0-aE3-B-gIXhFk.js +3 -0
  158. package/dist/packem_shared/ReleaseClient-BY4OZNCK.js +1 -0
  159. package/dist/packem_shared/Table-CcVkyULl-DLWu6XHL.js +34 -0
  160. package/dist/packem_shared/VisReleaseError-DMGRBTNO.js +1 -0
  161. package/dist/packem_shared/_commonjsHelpers-B5Y90VFO.js +1 -0
  162. package/dist/packem_shared/advisories-B76fBVL-.js +1 -0
  163. package/dist/packem_shared/affected-shas-CCxG4tvm.js +1 -0
  164. package/dist/packem_shared/ai-analysis-BpVdn20h.js +68 -0
  165. package/dist/packem_shared/ai-fix-CeGzAT9m.js +43 -0
  166. package/dist/packem_shared/anolilab-text-CAM_E6uK.js +13 -0
  167. package/dist/packem_shared/api.d-BPftyU9r.d.ts +27 -0
  168. package/dist/packem_shared/augment-DaSS2Lgs.js +4 -0
  169. package/dist/packem_shared/bin-BlGVEhl8.js +1 -0
  170. package/dist/packem_shared/build-scripts-q__dKE2y.js +1 -0
  171. package/dist/packem_shared/command-runtime-3FTGuUsK.js +1 -0
  172. package/dist/packem_shared/compile-cache-B_Vf_WxT.js +3 -0
  173. package/dist/packem_shared/createAdapter-bU4DIP3F.js +1 -0
  174. package/dist/packem_shared/createVersionActions-BK43SNDH.js +1 -0
  175. package/dist/packem_shared/cyclonedx-CmrYQ0vx.js +4 -0
  176. package/dist/packem_shared/defineFormatter-D5dCp6Kv.js +1 -0
  177. package/dist/packem_shared/definePlugin-DoUcoYSy.js +1 -0
  178. package/dist/packem_shared/dependency-scan-DpOFiZuI.js +1 -0
  179. package/dist/packem_shared/docker-BYqiD711.js +59 -0
  180. package/dist/packem_shared/env-DdQRnEIy.js +27 -0
  181. package/dist/packem_shared/failure-log-CKMhqLWr.js +2 -0
  182. package/dist/packem_shared/giget-DVTFJlbR.js +2 -0
  183. package/dist/packem_shared/glob-fqg4KepW-1S3z30c8.js +1 -0
  184. package/dist/packem_shared/index-B0EsgdzO.js +1 -0
  185. package/dist/packem_shared/index-CE6MsgcV.js +22 -0
  186. package/dist/packem_shared/index-Cg0IHaFI.js +1 -0
  187. package/dist/packem_shared/index-Cg71MisW.js +1 -0
  188. package/dist/packem_shared/index-DjTWo3sH.js +1 -0
  189. package/dist/packem_shared/index-jJNulo5i.js +28 -0
  190. package/dist/packem_shared/index.server-J83sowC4.js +2 -0
  191. package/dist/packem_shared/interface.d-B7VK2rcH.d.ts +148 -0
  192. package/dist/packem_shared/interface.d-Cezzifoh.d.ts +106 -0
  193. package/dist/packem_shared/license-t5KnNX6v.js +1 -0
  194. package/dist/packem_shared/lifecycle-aDTZ8dW1.js +2 -0
  195. package/dist/packem_shared/lockfile-C1qCKGH6.js +1 -0
  196. package/dist/packem_shared/main-B3juSU5z.js +1 -0
  197. package/dist/packem_shared/manifests-DSBr3-dw.js +1 -0
  198. package/dist/packem_shared/min-release-age-C71MO72F.js +34 -0
  199. package/dist/packem_shared/missing-package-json-CTF71tE5.js +1 -0
  200. package/dist/packem_shared/native-config-sync-D-z2Uwqu.js +21 -0
  201. package/dist/packem_shared/osv-bloom-DMhXP184.js +2 -0
  202. package/dist/packem_shared/otelPlugin-DmKDBaPo.js +1 -0
  203. package/dist/packem_shared/packument-aGzYwXKn.js +1 -0
  204. package/dist/packem_shared/peer-warnings-BXAzXqY3.js +1 -0
  205. package/dist/packem_shared/plugins.d-ND23R9I3.d.ts +4 -0
  206. package/dist/packem_shared/pm-runner-CQcraCcu.js +1 -0
  207. package/dist/packem_shared/prompt-DjXHVgYU.js +1 -0
  208. package/dist/packem_shared/provenance-S7y0BRAt.js +1 -0
  209. package/dist/packem_shared/public-api-WqUCiyIe.js +131 -0
  210. package/dist/packem_shared/readJsonSync-DuMMeB3s-ihoybKvs.js +1 -0
  211. package/dist/packem_shared/registry-keys-CRnXATt2.js +1 -0
  212. package/dist/packem_shared/resolve-explicit-CJGazevw.js +5 -0
  213. package/dist/packem_shared/resolve-runtime-QRaQucfL.js +1 -0
  214. package/dist/packem_shared/run-file-DD7Ne23Z.js +1 -0
  215. package/dist/packem_shared/runtime-check-qnrPTlma.js +1 -0
  216. package/dist/packem_shared/runtime-process-Dmz0vCJy-DUwTvH1J.js +1 -0
  217. package/dist/packem_shared/s1ngularity-BLj4Jy8z.js +1 -0
  218. package/dist/packem_shared/scan-progress-BDcl7Kty.js +2 -0
  219. package/dist/packem_shared/selectors-D4iCvITE.js +3 -0
  220. package/dist/packem_shared/signatures-DoNG2hEr.js +2 -0
  221. package/dist/packem_shared/slug-DoueYuLo.js +1 -0
  222. package/dist/packem_shared/spinner-DuJJvFTl.js +1 -0
  223. package/dist/packem_shared/sticky-comment-D6_7-w8T.js +1 -0
  224. package/dist/packem_shared/subtree-C7bZuiSQ.js +2 -0
  225. package/dist/packem_shared/symbols-DPTlrJ3B.js +1 -0
  226. package/dist/packem_shared/tabs-CgxCvjCY.js +1 -0
  227. package/dist/packem_shared/target-merge-Dg25Izl5.js +11 -0
  228. package/dist/packem_shared/target-options-CR0OuYJr.js +1 -0
  229. package/dist/packem_shared/toolchain-Zb3VzZb4.js +5 -0
  230. package/dist/packem_shared/typosquats-C12CP_2G.js +1 -0
  231. package/dist/packem_shared/use-measured-height-CjS7Tks7.js +1 -0
  232. package/dist/packem_shared/utils-CRueU43T.js +1 -0
  233. package/dist/packem_shared/verify-DStfg3nb.js +1 -0
  234. package/dist/packem_shared/vis-update-app-BlocL713.js +1 -0
  235. package/dist/packem_shared/watch-BXNI7dC6.js +1 -0
  236. package/dist/packem_shared/watch-loop-BZudYfcl.js +11 -0
  237. package/dist/release/core/changelog/index.d.ts +5 -0
  238. package/dist/release/core/changelog/index.js +1 -0
  239. package/dist/release/core/package-managers/index.d.ts +6 -0
  240. package/dist/release/core/package-managers/index.js +1 -0
  241. package/dist/release/core/version-actions/index.d.ts +14 -0
  242. package/dist/release/core/version-actions/index.js +1 -0
  243. package/dist/release/index.d.ts +233 -0
  244. package/dist/release/index.js +1 -0
  245. package/dist/release/plugin-sdk.d.ts +128 -0
  246. package/dist/release/plugin-sdk.js +1 -0
  247. package/dist/release/presets.d.ts +225 -0
  248. package/dist/release/presets.js +1 -0
  249. package/dist/release/types.d.ts +1493 -0
  250. package/dist/release/types.js +1 -0
  251. package/dist/runtime/preload.d.ts +1 -0
  252. package/dist/runtime/preload.js +1 -0
  253. package/index.d.ts +450 -0
  254. package/index.js +80 -57
  255. package/package.json +87 -44
  256. package/schemas/project.schema.json +872 -225
  257. package/schemas/vis-config.schema.json +6309 -264
  258. package/schemas/vis-release-config.schema.json +1423 -0
  259. package/skills/vis/SKILL.md +96 -0
  260. package/templates/buildkite-ci/.buildkite/pipeline.yml.tera +85 -0
  261. package/templates/buildkite-ci/template.yml +20 -0
  262. package/dist/config.d.ts +0 -1087
  263. package/dist/config.js +0 -1
  264. package/dist/packem_shared/VisUpdateApp-BBx3idMI.js +0 -1
  265. package/dist/packem_shared/ai-analysis-DDqXRFxY.js +0 -67
  266. package/dist/packem_shared/bin-BaZZ32BK.js +0 -93
  267. package/dist/packem_shared/cache-directory-DL8hfXeG.js +0 -1
  268. package/dist/packem_shared/catalog-CuSpuB_R.js +0 -12
  269. package/dist/packem_shared/dependency-scan-BoLG2Fez.js +0 -1
  270. package/dist/packem_shared/docker-BcfqH4Av.js +0 -2
  271. package/dist/packem_shared/flakiness-DSIHZGBT.js +0 -1
  272. package/dist/packem_shared/otelPlugin-DxyvBcXO.js +0 -1
  273. package/dist/packem_shared/runtime-check-CGHal8SO.js +0 -1
  274. package/dist/packem_shared/selectors-CfH9ZY08.js +0 -3
  275. package/dist/packem_shared/symbols-CIMw60-G.js +0 -1
  276. package/dist/packem_shared/toolchain-C3ZG0o_X.js +0 -5
  277. package/dist/packem_shared/typosquats-Bpq4zcWL.js +0 -1
  278. package/dist/packem_shared/utils-DrNg0XTR.js +0 -1
@@ -0,0 +1,1493 @@
1
+ /**
2
+ * Public types for the vis release subsystem.
3
+ *
4
+ * Imported via `@visulima/vis/release/types` sub-export. See the RFC at
5
+ * `packages/tooling/vis/rfc/design-release-manager.md` for the full design.
6
+ *
7
+ * Stability: every type here is part of vis's public API surface — breaking
8
+ * changes require a vis major version bump (RFC §21.1).
9
+ */
10
+ type BumpLevel = "major" | "minor" | "patch" | "none";
11
+ declare const BUMP_LEVELS: ReadonlyArray<BumpLevel>;
12
+ /**
13
+ * Numeric ranking used to compare two bump levels.
14
+ * `major` &gt; `minor` &gt; `patch` &gt; `none`.
15
+ */
16
+ declare const bumpRank: (level: BumpLevel) => number;
17
+ /** Take the maximum of two bump levels. */
18
+ declare const maxBump: (a: BumpLevel, b: BumpLevel) => BumpLevel;
19
+ interface ChangeFileSimple {
20
+ /** Map of package-name → bump level. */
21
+ bumps: Record<string, BumpLevel>;
22
+ }
23
+ /**
24
+ * A replay trigger (tegami parity). A change file carrying `replay` conditions
25
+ * is NOT consumed on `version`; instead its body is re-emitted into a package's
26
+ * changelog when a milestone is reached:
27
+ * - `{ kind: "version" }` — the package reaches an exact version (`name@1.2.0`)
28
+ * - `{ kind: "exit-prerelease" }` — the package leaves a prerelease line
29
+ *
30
+ * Per run, every condition that matches re-injects the body; the file is deleted
31
+ * once *all* its conditions are satisfied within a single run, otherwise it is
32
+ * retained. A file whose conditions can only fire in different runs (e.g. two
33
+ * distinct future version milestones) therefore stays on disk until you remove
34
+ * it — keep one milestone per file if you want automatic cleanup.
35
+ */
36
+ type ReplayCondition = {
37
+ kind: "exit-prerelease";
38
+ package: string;
39
+ } | {
40
+ kind: "version";
41
+ package: string;
42
+ version: string;
43
+ };
44
+ interface ChangeFileNested {
45
+ /** Bump level for the primary. */
46
+ bump: BumpLevel;
47
+ /** Optional cascade: package-glob → bump level. */
48
+ cascade?: Record<string, BumpLevel>;
49
+ /** Single primary package being bumped. */
50
+ package: string;
51
+ /**
52
+ * Pin the resulting version to this exact value, bypassing the
53
+ * computed bump. Useful for "I need to ship 2.0.0 right now"
54
+ * scenarios. Must be a valid semver string. Maps to release-please's
55
+ * `Release-As: &lt;version>` PR footer.
56
+ *
57
+ * When set, the `bump` field is still required (for tooling
58
+ * consistency + cascade triggering) but the resulting newVersion is
59
+ * `releaseAs` literally, ignored by `bumpVersion`.
60
+ */
61
+ releaseAs?: string;
62
+ /**
63
+ * Replay triggers — when present this file is retained (not deleted) and its
64
+ * body is replayed into the matched package's changelog at each milestone.
65
+ * Replay files do NOT contribute a version bump (changelog-only).
66
+ */
67
+ replay?: ReplayCondition[];
68
+ }
69
+ interface ChangeFile {
70
+ /** Markdown body — used as changelog entry verbatim. May be empty. */
71
+ body: string;
72
+ /** Slug of the file (filename without `.md` extension). */
73
+ id: string;
74
+ /** Optional inline metadata recognized by github formatter. */
75
+ meta?: {
76
+ author?: string;
77
+ commit?: string;
78
+ pr?: number;
79
+ };
80
+ /** File path relative to the repo root. */
81
+ path: string;
82
+ /** Either-or: simple multi-package or nested with cascade. */
83
+ payload: ChangeFileSimple | ChangeFileNested;
84
+ }
85
+ interface WorkspacePackage {
86
+ /** Absolute directory containing the package. */
87
+ dir: string;
88
+ /** Raw `package.json` contents. */
89
+ manifest: PackageManifest;
90
+ /** Path to `package.json`. */
91
+ manifestPath: string;
92
+ /** Package name from `package.json#name`. */
93
+ name: string;
94
+ /** Whether `package.json#private === true`. */
95
+ private: boolean;
96
+ /** Current version from `package.json#version`. */
97
+ version: string;
98
+ }
99
+ interface PackageManifest {
100
+ [key: string]: unknown;
101
+ dependencies?: Record<string, string>;
102
+ devDependencies?: Record<string, string>;
103
+ name: string;
104
+ napi?: Record<string, unknown>;
105
+ optionalDependencies?: Record<string, string>;
106
+ peerDependencies?: Record<string, string>;
107
+ private?: boolean;
108
+ publishConfig?: Record<string, unknown>;
109
+ version: string;
110
+ "vis-release"?: PerPackageReleaseConfig;
111
+ }
112
+ type DependencyKind = "dependencies" | "devDependencies" | "peerDependencies" | "optionalDependencies";
113
+ interface DependentInfo {
114
+ /** Which dep field the source appears in. */
115
+ kind: DependencyKind;
116
+ /** Package depending on the source. */
117
+ name: string;
118
+ /** The raw range string (`workspace:^1.2.3`, `^1.2.3`, `catalog:dev`, etc.). */
119
+ range: string;
120
+ }
121
+ /**
122
+ * Why a particular package ended up in the release plan.
123
+ * Used for log lines and changelog attribution.
124
+ */
125
+ type BumpReason = "EXPLICIT" | "DEPENDENCY_OUT_OF_RANGE" | "DEPENDENCY_BUMPED" | "DEVDEPENDENCY_BUMPED" | "CASCADE" | "CASCADE_TO" | "CATALOG_CHANGED" | "FIXED_GROUP" | "LINKED_GROUP" | "PEER_DEP_MATCH";
126
+ interface BumpSource {
127
+ bumpType: BumpLevel;
128
+ name: string;
129
+ newVersion: string;
130
+ }
131
+ interface PlannedRelease {
132
+ /** Change files contributing to this release (may be empty for pure dep bumps). */
133
+ changeFiles: ChangeFile[];
134
+ /** True when bumped by a cascade rule. */
135
+ isCascadeBump: boolean;
136
+ /** True when no change file directly named this package. */
137
+ isDependencyBump: boolean;
138
+ /** True when bumped by a fixed/linked group. */
139
+ isGroupBump: boolean;
140
+ /** Package name. */
141
+ name: string;
142
+ /** Post-bump version. */
143
+ newVersion: string;
144
+ /** Pre-bump version. */
145
+ oldVersion: string;
146
+ /** Reason this package made it into the plan. */
147
+ reasons: BumpReason[];
148
+ /** Sources that triggered cascading bumps (for changelog attribution). */
149
+ sources: BumpSource[];
150
+ /** Bump level applied. */
151
+ type: Exclude<BumpLevel, "none">;
152
+ }
153
+ interface ReleasePlan {
154
+ /** Change files consumed by this plan (deleted on `vis release version`). */
155
+ consumedChangeFiles: ChangeFile[];
156
+ /** Sorted alphabetically by package name. */
157
+ releases: PlannedRelease[];
158
+ /** Non-fatal warnings to surface to the user. */
159
+ warnings: string[];
160
+ }
161
+ /** A package as seen by a lifecycle hook. */
162
+ interface PluginPackageInfo {
163
+ /** Absolute package directory. */
164
+ dir: string;
165
+ /** Package name. */
166
+ name: string;
167
+ /** Version before this release. */
168
+ oldVersion: string;
169
+ /** Version being published. */
170
+ version: string;
171
+ }
172
+ /** Outcome summary handed to `afterPublishAll`. */
173
+ interface PluginPublishSummary {
174
+ failed: {
175
+ name: string;
176
+ reason: string;
177
+ }[];
178
+ published: {
179
+ name: string;
180
+ version: string;
181
+ }[];
182
+ skipped: {
183
+ name: string;
184
+ reason: string;
185
+ }[];
186
+ }
187
+ /** Common context passed to every lifecycle hook. */
188
+ interface ReleasePluginContext {
189
+ config: VisReleaseConfig;
190
+ cwd: string;
191
+ }
192
+ /**
193
+ * A release lifecycle plugin (tegami parity). Unlike the single-purpose
194
+ * `defineVersionActions` / `defineChangelogFormatter` / `defineNotificationChannel`
195
+ * extension points, a plugin can hook arbitrary points of the version/publish
196
+ * lifecycle — e.g. run a build in `willPublish`, push docs in `afterPublishAll`.
197
+ *
198
+ * Error semantics: `applyDraft` and `willPublish` throw-propagate (they gate the
199
+ * release — fail fast). `afterPublish` / `afterPublishAll` are post-effect: a
200
+ * throw is logged and swallowed so a side-effect hiccup can't "unpublish".
201
+ */
202
+ interface ReleasePlugin {
203
+ /** After each package is successfully published. Post-effect (errors are logged, not fatal). */
204
+ afterPublish?: (context: ReleasePluginContext & {
205
+ package: PluginPackageInfo;
206
+ }) => Promise<void> | void;
207
+ /** After the whole publish wave completes. Post-effect (errors are logged, not fatal). */
208
+ afterPublishAll?: (context: ReleasePluginContext & {
209
+ result: PluginPublishSummary;
210
+ }) => Promise<void> | void;
211
+ /** After versions + changelogs are written (the version/apply phase). Throw to abort. */
212
+ applyDraft?: (context: ReleasePluginContext & {
213
+ plan: ReleasePlan;
214
+ }) => Promise<void> | void;
215
+ /** Stable plugin id (used in logs + skip reasons). */
216
+ name: string;
217
+ /** Before a package is published — return `false` to skip it (anything else proceeds). Throw to abort the wave. */
218
+ willPublish?: (context: ReleasePluginContext & {
219
+ package: PluginPackageInfo;
220
+ }) => Promise<boolean | undefined> | boolean | undefined;
221
+ }
222
+ type ChannelMode = "auto-publish" | "version-pr";
223
+ interface ChannelConfig {
224
+ /** CI behavior: `auto-publish` (push triggers publish) or `version-pr` (review gate). */
225
+ mode?: ChannelMode;
226
+ /** Pre-release identifier (e.g. `"alpha"`, `"beta"`, `"rc"`). Omit for stable channels. */
227
+ prerelease?: string;
228
+ /** For maintenance branches: `"match"` keeps releases inside the branch's semver range. */
229
+ range?: string;
230
+ /** npm dist-tag for publishes on this channel. Use `"branch-name"` to mirror the branch name. */
231
+ tag: string;
232
+ }
233
+ type BumpAs = BumpLevel | "match";
234
+ interface DependencyBumpRule {
235
+ /** Bump level to apply to the dependent. `"match"` = same as source. */
236
+ bumpAs: BumpAs;
237
+ /** Minimum source bump that activates this rule. */
238
+ trigger: BumpLevel;
239
+ }
240
+ type DependencyBumpRules = Partial<Record<DependencyKind, DependencyBumpRule | false>>;
241
+ type UpdateInternalDependenciesMode = "patch" | "minor" | "out-of-range";
242
+ /**
243
+ * Per-group changelog routing.
244
+ *
245
+ * - `"per-package"` (default) — every member writes to its own
246
+ * `&lt;pkg-dir>/CHANGELOG.md` exactly as if it weren't grouped.
247
+ * - `"shared"` — every member's entry is rendered into ONE shared
248
+ * file. `path` overrides the default location
249
+ * (`&lt;first-member-dir>/GROUP-CHANGELOG.md`). Useful for `core/utils`
250
+ * pairs and other tightly-coupled package sets where one
251
+ * consolidated changelog reads better than N tiny ones.
252
+ */
253
+ interface ReleaseGroupChangelogConfig {
254
+ mode: "per-package" | "shared";
255
+ /** Override file path. Default: `&lt;first-member-dir>/GROUP-CHANGELOG.md`. */
256
+ path?: string;
257
+ }
258
+ /**
259
+ * Dual-shape config for `release.fixed` / `release.linked` entries.
260
+ *
261
+ * Bare `string[]` is interpreted as `{ packages, changelog: { mode: "per-package" } }`
262
+ * — keeps existing configs working without migration.
263
+ */
264
+ type ReleaseGroupConfig = string[] | {
265
+ changelog?: ReleaseGroupChangelogConfig;
266
+ /**
267
+ * Optional name for the group. Used as the heading in the
268
+ * shared changelog when set; defaults to a "group-N"-style
269
+ * identifier derived from the array index.
270
+ */
271
+ name?: string;
272
+ /** Package names or globs that belong to this group. */
273
+ packages: string[];
274
+ /**
275
+ * Emit a single shared git tag (and one aggregate GitHub/GitLab
276
+ * release) for the whole group instead of one tag + release per
277
+ * member (tegami parity). Default `false`.
278
+ */
279
+ syncGitTag?: boolean;
280
+ /**
281
+ * Override the shared git tag for a `syncGitTag` group. Tokens:
282
+ * `{name}` (group name), `{version}` (representative version).
283
+ * Default: `"{name}@{version}"`.
284
+ */
285
+ tagPattern?: string;
286
+ };
287
+ /**
288
+ * Normalise a `ReleaseGroupConfig` (bare array or object form) into the
289
+ * object form. Centralised so plan-assembly, changelog routing, and
290
+ * print-config all see the same shape.
291
+ */
292
+ declare const normaliseGroup: (group: ReleaseGroupConfig) => {
293
+ changelog: ReleaseGroupChangelogConfig;
294
+ name?: string;
295
+ packages: string[];
296
+ syncGitTag: boolean;
297
+ tagPattern?: string;
298
+ };
299
+ type SnapshotTagKind = "sha" | "short-sha" | "branch" | "pr";
300
+ type SnapshotBackend = "pkg-pr-new" | "registry" | {
301
+ auth?: string;
302
+ url: string;
303
+ };
304
+ /**
305
+ * Common fields shared across built-in notification channels.
306
+ * `id` is an operator-supplied disambiguator that surfaces in log lines
307
+ * when fanning out to multiple instances of the same channel kind
308
+ * (e.g. `slack:engineering` vs `slack:releases`).
309
+ */
310
+ interface CommonChannelConfig {
311
+ /** Optional disambiguator for log lines + doctor checks. */
312
+ id?: string;
313
+ /** Skip the `Skipped (N):` block. Default false (skipped are surfaced). */
314
+ includeSkipped?: boolean;
315
+ /**
316
+ * Title template — see `expandNotificationTemplate` for tokens
317
+ * (`{count}`, `{packages}`, `{firstName}`, `{firstVersion}`,
318
+ * `{channel}`, `{repo}`, `{date}`). When omitted, a sensible
319
+ * "🚀 Released N packages" default is used.
320
+ */
321
+ title?: string;
322
+ }
323
+ interface SlackConfig extends CommonChannelConfig {
324
+ /**
325
+ * Override the channel the webhook posts to. Only honoured when
326
+ * the webhook was created with multi-channel posting allowed (rare).
327
+ */
328
+ channelOverride?: string;
329
+ /** Bot icon emoji (e.g. `":rocket:"`). */
330
+ iconEmoji?: string;
331
+ /** Bot display name override. */
332
+ username?: string;
333
+ /**
334
+ * Slack incoming-webhook URL. Workspace+channel scoped. Use env
335
+ * substitution if you don't want it inline:
336
+ * `webhook: "${SLACK_WEBHOOK_URL}"`.
337
+ */
338
+ webhook: string;
339
+ }
340
+ interface DiscordConfig extends CommonChannelConfig {
341
+ /** Override the embed avatar. */
342
+ avatarUrl?: string;
343
+ /** Embed colour as an integer RGB (e.g. `0x3B82F6` = blue-500). */
344
+ color?: number;
345
+ /** Bot display name override. */
346
+ username?: string;
347
+ /** Discord webhook URL. Server+channel scoped. */
348
+ webhook: string;
349
+ }
350
+ interface WebhookConfig extends CommonChannelConfig {
351
+ /**
352
+ * Body template. When omitted, the full `NotificationContext` is
353
+ * sent verbatim as JSON. When provided, every string leaf is run
354
+ * through `expandNotificationTemplate`.
355
+ */
356
+ body?: unknown;
357
+ /** Additional headers (values run through template interpolation). */
358
+ headers?: Record<string, string>;
359
+ /** HTTP method. Default `POST`. */
360
+ method?: "POST" | "PUT";
361
+ /** Target URL. */
362
+ url: string;
363
+ }
364
+ interface NotificationsConfig {
365
+ /**
366
+ * Built-in Discord channel(s). Single config or array. Each posts a
367
+ * formatted embed with title + bullet-list of packages.
368
+ */
369
+ discord?: DiscordConfig | DiscordConfig[];
370
+ /**
371
+ * Custom channels loaded from a path. The module must export a
372
+ * default `NotificationChannel` (object with `.send`) OR a factory
373
+ * `(options) => NotificationChannel` for the tuple `[path, options]`
374
+ * form.
375
+ */
376
+ plugins?: (string | [string, Record<string, unknown>])[];
377
+ /**
378
+ * Skip notifications on prerelease waves (when every published
379
+ * version has a `-…` suffix). Default `true` — most teams want
380
+ * Slack noise only on stable releases.
381
+ */
382
+ skipPrerelease?: boolean;
383
+ /**
384
+ * Built-in Slack channel(s). Each posts a Block Kit message with
385
+ * a header + package list + context block.
386
+ */
387
+ slack?: SlackConfig | SlackConfig[];
388
+ /** Generic webhook(s) for Teams / Mattermost / internal dashboards. */
389
+ webhook?: WebhookConfig | WebhookConfig[];
390
+ }
391
+ interface SnapshotConfig {
392
+ backend?: SnapshotBackend;
393
+ /** Whether to delete published snapshots on PR-close (no-op for `pkg-pr-new`). */
394
+ cleanupOnPrClose?: boolean;
395
+ /** When backend is `pkg-pr-new`, the registry URL is supplied automatically. */
396
+ registry?: string;
397
+ /** Multi-tag publish — pick which tag types to emit per snapshot. */
398
+ tags?: SnapshotTagKind[];
399
+ /** Version template — interpolation tokens: `{tag}`, `{shortSha}`, `{sha}`, `{branch}`, `{pr}`, `{timestamp}`. */
400
+ versionTemplate?: string;
401
+ }
402
+ interface PerPackageReleaseConfig {
403
+ /**
404
+ * Extra directories (or globs) that logically belong to this package.
405
+ * Used by `vis release check --strict` to attribute changes outside
406
+ * the package's own directory to this package — e.g. a shared
407
+ * `docs/api/` directory whose updates should still trip the
408
+ * "covered by a change file?" gate for the package they document.
409
+ *
410
+ * Globs are workspace-root-relative (NOT package-directory-relative).
411
+ * Examples:
412
+ *
413
+ * ```ts
414
+ * release: {
415
+ * packages: {
416
+ * "@scope/cli": {
417
+ * additionalPaths: ["docs/cli/**", "examples/cli/**"],
418
+ * },
419
+ * },
420
+ * }
421
+ * ```
422
+ *
423
+ * Default: `undefined` (only the package's own directory is
424
+ * attributed to it). Release-please parity: #1921.
425
+ */
426
+ additionalPaths?: string[];
427
+ /** Custom shell command run before publish (requires `allowCustomCommands`). */
428
+ buildCommand?: string;
429
+ /**
430
+ * Build context passed to `docker buildx build` (the final positional
431
+ * argument). Honoured by the `container` versionActions; defaults to
432
+ * the package directory.
433
+ */
434
+ buildContext?: string;
435
+ /**
436
+ * Relative path from the package directory to `Cargo.toml` for the
437
+ * `cargo` versionActions. Set automatically by the `cargo()` preset
438
+ * from its `crateDir` option. Defaults to `"Cargo.toml"`.
439
+ */
440
+ cargoTomlPath?: string;
441
+ /** Source-side cascade: glob → rule. */
442
+ cascadeTo?: Record<string, DependencyBumpRule>;
443
+ /** Per-pkg override of `release.changedFilePatterns`. Replaces (does not merge). */
444
+ changedFilePatterns?: string[];
445
+ /** Custom shell command that prints currently-published version to stdout. */
446
+ checkPublished?: string;
447
+ /**
448
+ * Extra `--build-arg KEY=VALUE` pairs forwarded to `docker buildx
449
+ * build`. Useful for stamping the version into the image at build
450
+ * time. Consumed by the `container` versionActions.
451
+ */
452
+ containerBuildArgs?: Record<string, string>;
453
+ /**
454
+ * Fully-qualified container image reference, e.g.
455
+ * `"ghcr.io/scope/foo"`. Required by the `container` versionActions
456
+ * (no built-in default since the registry hostname is operator-
457
+ * specific). Set automatically by the `container()` preset.
458
+ */
459
+ containerImage?: string;
460
+ /**
461
+ * Target platforms passed to `docker buildx build --platform`.
462
+ * Defaults to `["linux/amd64", "linux/arm64"]`. Single-arch builds
463
+ * can pass a one-entry array.
464
+ */
465
+ containerPlatforms?: ReadonlyArray<string>;
466
+ /**
467
+ * Post-push signing scheme for the `container` versionActions.
468
+ * `"cosign"` runs `cosign sign --yes &lt;image>:&lt;version>` against the
469
+ * just-pushed immutable tag. Future schemes (sigstore-bundle,
470
+ * notation, etc.) can extend this union.
471
+ */
472
+ containerSigning?: "cosign";
473
+ /**
474
+ * Skip the conventional `:latest` floating tag on push. Useful for
475
+ * pre-release / channel-specific images that shouldn't move the
476
+ * shared `latest` pointer.
477
+ */
478
+ containerSkipLatest?: boolean;
479
+ /**
480
+ * Per-package override of the workspace-level `currentVersionResolver`.
481
+ * Same set of modes: `"disk"`, `"registry"`, `"git-tag"`. Useful when
482
+ * one package in the monorepo lags behind the registry / git-tag baseline
483
+ * (e.g. a newly-added package that hasn't been published yet).
484
+ */
485
+ currentVersionResolver?: "disk" | "git-tag" | "registry";
486
+ /** Per-pkg override of inbound dep-bump rules. */
487
+ dependencyBumpRules?: DependencyBumpRules;
488
+ /**
489
+ * Per-package `extra-files` rules with paths relative to the
490
+ * package directory. Merged with workspace-level
491
+ * `release.publish.extraFiles` (per-package wins on path collision).
492
+ */
493
+ extraFiles?: ExtraFileRule[];
494
+ /**
495
+ * Relative path from the package directory to the JSR manifest
496
+ * (`jsr.json` or `deno.json`) for the `jsr` versionActions. Set
497
+ * automatically by the `jsr()` preset from its `manifestPath`
498
+ * option. Defaults to `"jsr.json"`.
499
+ */
500
+ jsrConfigPath?: string;
501
+ /**
502
+ * Extra arguments forwarded verbatim to `jsr publish` for the `jsr`
503
+ * versionActions (the `jsr()` preset wires this from its `publishArgs` /
504
+ * `allowSlowTypes` options). The most common entry is
505
+ * `"--allow-slow-types"`, which JSR requires for packages whose public
506
+ * API has types it can't statically infer. `--allow-dirty` is always
507
+ * passed by vis (the version is bumped on disk before publish) and need
508
+ * not be listed here.
509
+ */
510
+ jsrPublishArgs?: string[];
511
+ /** Hard opt-in/out — overrides every other rule. */
512
+ managed?: boolean;
513
+ /**
514
+ * Override the Maven Central metadata URL used by the `maven`
515
+ * versionActions for already-published detection. Set this when
516
+ * publishing to a custom repository (Artifactory, Nexus, GitHub
517
+ * Packages); the URL should point at
518
+ * `&lt;base>/&lt;groupId>/&lt;artifactId>/maven-metadata.xml`. Pass `""`
519
+ * (empty string) to disable the metadata check entirely.
520
+ */
521
+ mavenMetadataUrl?: string;
522
+ /**
523
+ * Override the path to `pom.xml` for the `maven` versionActions,
524
+ * relative to the package directory. Defaults to `"pom.xml"`.
525
+ */
526
+ pomPath?: string;
527
+ /** Custom shell command run instead of `npm publish` (requires `allowCustomCommands`). */
528
+ publishCommand?: string | string[];
529
+ /**
530
+ * Relative path from the package directory to the directory
531
+ * containing `pyproject.toml` for the `python` versionActions.
532
+ * Set automatically by the `pyproject()` preset from its
533
+ * `projectDir` option. Defaults to the package directory.
534
+ */
535
+ pythonProjectDir?: string;
536
+ /** Custom registry URL (overrides `publish.registry`). */
537
+ registry?: string;
538
+ /**
539
+ * Override the workspace-wide releaseTagPattern.
540
+ * Tokens: `{name}`, `{unscopedName}`, `{version}`, `{major}`, `{minor}`,
541
+ * `{patch}`, `{date}`, `{channel}`.
542
+ */
543
+ releaseTagPattern?: string;
544
+ /** Skip the npm publish step but still create a git tag. */
545
+ skipNpmPublish?: boolean;
546
+ /**
547
+ * Relative path from the package directory (or workspace root, for
548
+ * uv-workspace setups) to `uv.lock`. Set when the operator wants
549
+ * vis to acknowledge a uv-managed lockfile during doctor checks.
550
+ *
551
+ * vis does NOT mutate `uv.lock` itself — uv regenerates it on
552
+ * `uv sync` / `uv build`. The path is recorded only so doctor can
553
+ * warn when the file is missing despite the operator configuring
554
+ * uv-aware tooling. Operators wanting `uv.lock` in the release
555
+ * commit should run `uv lock` between `vis release version` and
556
+ * the commit step (typically wired via `postVersionCommand`).
557
+ *
558
+ * release-please parity: #2561.
559
+ */
560
+ uvLockPath?: string;
561
+ /**
562
+ * uv workspace configuration. When set, the `python` versionActions
563
+ * and the `pyproject()` preset treat this package as a member of a
564
+ * uv workspace rooted at `uvWorkspace.root` (relative to the package
565
+ * directory — typically `".."` or the path up to the repo root).
566
+ *
567
+ * Doctor checks:
568
+ * - the root's pyproject.toml exists at `&lt;root>/pyproject.toml`
569
+ * - `[tool.uv.workspace] members` lists the package's project
570
+ * directory (relative path from the workspace root)
571
+ *
572
+ * Set automatically by the `pyproject({ uvWorkspace })` preset.
573
+ *
574
+ * release-please parity: #2560.
575
+ */
576
+ uvWorkspace?: {
577
+ root: string;
578
+ };
579
+ /**
580
+ * Built-in id (`"npm"`, `"native-addon"`, `"private"`, `"shell"`,
581
+ * `"cargo"`, `"python"`, `"maven"`, `"container"`, `"jsr"`) or a
582
+ * path to a custom implementation module.
583
+ */
584
+ versionActions?: string;
585
+ }
586
+ interface CleanPackageJsonConfig {
587
+ /** Fields to keep — overrides default strip behaviour. */
588
+ keep?: string[];
589
+ /** Fields to strip from the published package.json (extends defaults). */
590
+ strip?: string[];
591
+ }
592
+ type ProtocolResolutionMode = "pack" | "in-place" | "none";
593
+ type CatalogResolutionMode = "auto" | "in-place" | "delegate";
594
+ type PublishStrategy = "npm-publish-tarball" | "native";
595
+ type PackManager = "auto" | "npm" | "pnpm" | "yarn" | "bun";
596
+ /**
597
+ * Pre-publish security gates — run after the manifest is rewritten and the
598
+ * tarball is packed but BEFORE `npm publish` is invoked. Each gate is opt-in;
599
+ * defaults aim for "useful for new repos, easy to disable for established ones".
600
+ */
601
+ interface PublishGuardsConfig {
602
+ /**
603
+ * Run `npm audit --omit=dev` against the resolved package and fail at the
604
+ * configured severity. Skips devDependency CVEs (which don't ship to
605
+ * consumers). `"off"` disables.
606
+ */
607
+ audit?: "critical" | "high" | "low" | "moderate" | "off";
608
+ /**
609
+ * Verify every leaf path declared in `package.json#exports` /
610
+ * `main` / `module` / `types` / `bin` exists post-build. Wildcard exports
611
+ * (`./feat/*.js`) check that the directory is non-empty after build.
612
+ *
613
+ * Catches "deleted file but forgot to update exports" before publish.
614
+ */
615
+ exportsExist?: boolean;
616
+ /**
617
+ * Gate on lifecycle scripts (`preinstall` / `install` / `postinstall`)
618
+ * declared on the package being published. These run on the consumer's
619
+ * machine at install time, so unauthorized additions are a supply-chain
620
+ * vector.
621
+ *
622
+ * Modes: `"off"` (skip), `"warn"` (log + continue), `"strict"` (fail).
623
+ * Object form provides an exact-match `allow` table — only commands matching
624
+ * the listed value pass through.
625
+ */
626
+ lifecycleScripts?: "off" | "strict" | "warn" | {
627
+ allow?: Record<string, string>;
628
+ mode: "off" | "strict" | "warn";
629
+ };
630
+ /**
631
+ * Scan the resolved tarball contents (post `npm pack`) for secrets.
632
+ * Catches `.npmignore`/`files` misconfigurations that would ship `.env`,
633
+ * AWS keys, etc. Different scope than log redaction — this gates what
634
+ * actually leaves the machine.
635
+ *
636
+ * `true` runs the default `@visulima/secret-scanner` ruleset.
637
+ * Object form lets callers narrow the rule set or skip files.
638
+ */
639
+ packSecretScan?: boolean | {
640
+ ignore?: string[];
641
+ };
642
+ }
643
+ /**
644
+ * Optional asset-attestation work done after a successful publish. Both
645
+ * GitHub and GitLab adapters honor these knobs — GitHub uploads the .tgz
646
+ * directly, GitLab uses the project upload endpoint registered as a release
647
+ * link. SHA256/SHA512 are stamped into the release body either way so
648
+ * consumers can verify the registry tarball matches the audited build.
649
+ */
650
+ /**
651
+ * Regex-based file-substitution rule used by `publish.extraFiles`
652
+ * (workspace) or `packages.&lt;name>.extraFiles` (per-package) to keep
653
+ * version strings in non-package.json files in sync with the release.
654
+ */
655
+ interface ExtraFileRegexRule {
656
+ /** Regex flags (default `"g"`). Combine as needed: `"gm"`, `"gmi"`, etc. */
657
+ flags?: string;
658
+ /**
659
+ * File path. Workspace-root-relative when declared on
660
+ * `release.publish.extraFiles`; package-directory-relative when on
661
+ * `release.packages.&lt;name>.extraFiles`.
662
+ */
663
+ path: string;
664
+ /**
665
+ * Substitution template. `{version}` is replaced with the new
666
+ * version literal. Standard regex backreferences (`$1`, `$2`, `$&amp;`)
667
+ * work too. When omitted, the entire match is replaced with the new
668
+ * version.
669
+ */
670
+ replace?: string;
671
+ /** JavaScript regex source (without delimiters). */
672
+ search: string;
673
+ /**
674
+ * Explicit type discriminator. Defaults to `"regex"` when omitted —
675
+ * legacy rules without a `type` field continue to work as regex rules.
676
+ */
677
+ type?: "regex";
678
+ }
679
+ /**
680
+ * Annotation-comment file-substitution rule — release-please parity.
681
+ *
682
+ * Instead of authoring a regex, the operator drops an `x-release-please-
683
+ * version` (or custom-named) marker comment in the target file and vis
684
+ * locates the semver-shaped substring on the marked line (or the line
685
+ * immediately following an own-line marker) and replaces it with the
686
+ * new version. Far more ergonomic than the regex form for the common
687
+ * case of "bump this version string here".
688
+ *
689
+ * Two recognised placements:
690
+ *
691
+ * 1. **Inline** — marker on the same line as the version:
692
+ * ```ts
693
+ * export const VERSION = "0.1.0"; // x-release-please-version
694
+ * ```
695
+ *
696
+ * 2. **Preceding-line** — marker on the line just above the version:
697
+ * ```dockerfile
698
+ * # x-release-please-version
699
+ * ENV APP_VERSION="0.1.0"
700
+ * ```
701
+ *
702
+ * Like the regex path, missing files / no marker found surface as
703
+ * `plan.warnings` rather than throwing.
704
+ */
705
+ interface ExtraFileAnnotationRule {
706
+ /**
707
+ * Limit the semver-replacement to occurrences anchored by this
708
+ * literal prefix on the marked line. Useful when the file has
709
+ * multiple version-shaped substrings (e.g. a lockfile or a
710
+ * Dockerfile referencing both APP_VERSION and a base-image tag).
711
+ *
712
+ * Example — `ENV APP_VERSION="0.1.0"` with `anchor: "APP_VERSION"`
713
+ * only touches the version after that prefix. When omitted, the
714
+ * FIRST semver substring on the marked line is replaced.
715
+ *
716
+ * **Strongly recommended** for any file that contains more than one
717
+ * version-shaped substring (lockfiles, Dockerfiles with both APP
718
+ * and base-image tags, multi-version compose files). The default
719
+ * "first semver wins" behaviour is convenient for single-version
720
+ * files but a footgun on lockfiles — annotating a `package-lock
721
+ * .json` without an anchor would happily rewrite the first nested
722
+ * dep's `version`.
723
+ */
724
+ anchor?: string;
725
+ /**
726
+ * Override the marker string. Default `"x-release-please-version"`
727
+ * (release-please compatibility). Match is plain substring (no
728
+ * regex), case-sensitive.
729
+ */
730
+ marker?: string;
731
+ /**
732
+ * File path. Workspace-root-relative when declared on
733
+ * `release.publish.extraFiles`; package-directory-relative when on
734
+ * `release.packages.&lt;name>.extraFiles`.
735
+ */
736
+ path: string;
737
+ /**
738
+ * Switch to annotation-comment mode. The substitution engine looks
739
+ * for lines tagged with the configured marker — by default
740
+ * `x-release-please-version` (release-please compatibility). The
741
+ * marked line (or the line immediately following an own-line marker)
742
+ * has its semver-shaped substring replaced with the new version.
743
+ */
744
+ type: "annotation";
745
+ }
746
+ /**
747
+ * Union of every extra-files rule shape. The regex form is the historical
748
+ * default; the annotation form was added for release-please ergonomics.
749
+ *
750
+ * When `type` is omitted, the rule is treated as a regex rule (preserves
751
+ * backwards-compat for every existing vis.config.ts in the wild).
752
+ */
753
+ type ExtraFileRule = ExtraFileAnnotationRule | ExtraFileRegexRule;
754
+ interface ReleaseAssetsConfig {
755
+ /**
756
+ * Compute SHA256 + SHA512 of the published tarball and append them to
757
+ * the release body. Lets consumers verify the registry tarball matches
758
+ * the audited build, defending against post-publish substitution.
759
+ */
760
+ stampHashes?: boolean;
761
+ /**
762
+ * Upload the published tarball as a release asset alongside the GH
763
+ * release. Belt-and-suspenders alongside `stampHashes` — registry
764
+ * tampering is detectable by hash comparison.
765
+ */
766
+ uploadTarball?: boolean;
767
+ }
768
+ interface PublishConfig {
769
+ /**
770
+ * Semantic-release/github parity — when set, prepend ("top") or append
771
+ * ("bottom") a "Related releases" block to the per-package GitHub release
772
+ * body that links to the immediately previous N releases of the same
773
+ * package. Aids navigation in the Releases UI ("what did 1.4.2 fix?" is a
774
+ * single click from 1.5.0's release page).
775
+ *
776
+ * Honoured only on the GitHub adapter; GitLab logs a warning and skips
777
+ * the block. Aggregate-release mode is skipped — there's no per-package
778
+ * prior release to point at.
779
+ *
780
+ * Default `false` (no link block).
781
+ */
782
+ addReleases?: false | "bottom" | "top";
783
+ /** How to resolve `catalog:` protocols. */
784
+ catalogResolution?: CatalogResolutionMode;
785
+ /** Strip/keep config for the published `package.json`. `false` ships unmodified. */
786
+ cleanPackageJson?: boolean | CleanPackageJsonConfig;
787
+ /**
788
+ * GitHub-only: link each created release to a Discussion in the
789
+ * named category (e.g. `"Announcements"`, `"Releases"`). The
790
+ * category must already exist on the repository; GitHub creates the
791
+ * discussion automatically. Ignored on GitLab.
792
+ */
793
+ discussionCategory?: string;
794
+ /**
795
+ * Create the forge release (GitHub Release / GitLab Release) as a
796
+ * draft. A draft release is invisible to consumers until a human
797
+ * publishes it through the UI — useful when release notes need a
798
+ * human review before going public. Default `false`.
799
+ *
800
+ * Maps to GitHub's `draft: true` API field and GitLab's released_at
801
+ * being absent (GitLab models drafts implicitly via no released_at).
802
+ */
803
+ draftRelease?: boolean;
804
+ /**
805
+ * Bump version strings in arbitrary files alongside package.json.
806
+ * Each rule's `path` is workspace-root-relative; per-package rules
807
+ * (under `packages.&lt;name>.extraFiles`) resolve relative to the
808
+ * package directory.
809
+ *
810
+ * The `search` is a JavaScript regex source. Default `flags: "g"`
811
+ * for global replacement. The `replace` template supports the
812
+ * `{version}` token and standard regex backreferences (`$1`, `$2`,
813
+ * `$&amp;`, etc.). When `replace` is absent, the entire match is
814
+ * substituted with the new version.
815
+ *
816
+ * Examples — README badge, TS constant, Cargo.toml field:
817
+ * `{ path: "README.md", search: "v\\d+\\.\\d+\\.\\d+" }`
818
+ * `{ path: "src/version.ts", search: 'VERSION = "[^"]+"',
819
+ * replace: 'VERSION = "{version}"' }`
820
+ * `{ path: "Cargo.toml", search: '^version = "[^"]+"',
821
+ * replace: 'version = "{version}"', flags: "m" }`
822
+ *
823
+ * Failed matches are non-fatal — the publish carries on, but a
824
+ * warning surfaces so misconfigured rules don't silently rot.
825
+ */
826
+ extraFiles?: ExtraFileRule[];
827
+ /** Pre-publish security gates. Each gate is opt-in. */
828
+ guards?: PublishGuardsConfig;
829
+ /**
830
+ * Persist in-progress publish state to a git-TRACKED
831
+ * `&lt;changesDir>/publish-lock.json` instead of the gitignored
832
+ * `.state.json`. Default `false`.
833
+ *
834
+ * The tracked lock is committed (and pushed by the publish flow) so a
835
+ * partially-failed publish can be resumed from a *fresh checkout on a
836
+ * different runner* — the ephemeral-CI case where `.state.json` (untracked)
837
+ * never survives the clone. On full success the lock is removed and the
838
+ * removal committed. Mirrors tegami's `publish-lock.yaml`-in-git model.
839
+ */
840
+ lockInGit?: boolean;
841
+ /**
842
+ * Skip creating the GitHub / GitLab Release entirely while still
843
+ * pushing the git tag and publishing the package to the registry.
844
+ * Useful for teams that maintain release notes elsewhere (a docs
845
+ * site, in-product changelog, etc.) and don't want the duplicate
846
+ * forge artifact.
847
+ *
848
+ * Default `false`. Release-please parity: #1295.
849
+ */
850
+ noRelease?: boolean;
851
+ /** Which manager to invoke for `&lt;pm> pack`. */
852
+ packManager?: PackManager;
853
+ /**
854
+ * Auth-precedence escape hatch for the multi-language actions
855
+ * (cargo, python). Default `false`.
856
+ *
857
+ * Default behaviour (false): when both an OIDC env signal
858
+ * (`ACTIONS_ID_TOKEN_REQUEST_URL`) AND a static token
859
+ * (`CARGO_REGISTRY_TOKEN` / `TWINE_PASSWORD`) are present, OIDC
860
+ * wins — an operator who enabled OIDC trusted publishing wants
861
+ * OIDC by default and a leftover token in the env shouldn't
862
+ * silently switch auth modes (M-3).
863
+ *
864
+ * Set `true` to flip the precedence: when both signals are
865
+ * present, the static token wins. Useful for operators migrating
866
+ * off OIDC, shadow-publishing during a cutover, or working around
867
+ * a temporary trusted-publishing outage at the registry.
868
+ */
869
+ preferStaticToken?: boolean;
870
+ /** How to resolve `workspace:` protocols. */
871
+ protocolResolution?: ProtocolResolutionMode;
872
+ /** Extra args appended to publish (`--provenance`, etc.). Skipped for managers that don't support them. */
873
+ publishArgs?: string[];
874
+ /** Publish strategy — see RFC §11.3. */
875
+ publishStrategy?: PublishStrategy;
876
+ /** Override default registry. */
877
+ registry?: string;
878
+ /** Post-publish asset attestation work. */
879
+ releaseAssets?: ReleaseAssetsConfig;
880
+ /**
881
+ * Use npm's staged-publishing flow (`npm stage publish`) instead of
882
+ * `npm publish`. The published version is invisible to consumers until
883
+ * a maintainer approves it via 2FA (`vis release stage approve` or the
884
+ * npmjs.com web UI). Requires npm CLI ≥ 11.15.0 and `registry.npmjs.org`
885
+ * as the registry; doctor warns when those preconditions aren't met.
886
+ *
887
+ * Publish blocks on the human-review gate so downstream pipeline steps
888
+ * (tags, GH release, post-hooks) only run against actually-live packages.
889
+ * Rejection and timeout are NOT CI failures — they flow through the
890
+ * skipped[] result so `vis release publish` exits 0; the unapproved
891
+ * package just doesn't get its downstream side-effects.
892
+ *
893
+ * Pass `true` for defaults (30-min timeout, 15s poll). Pass an object
894
+ * to override per-workspace. Snapshots always publish directly (preview
895
+ * content shouldn't gate on review).
896
+ */
897
+ stage?: boolean | {
898
+ /**
899
+ * Sleep between consecutive `npm stage view` checks while waiting.
900
+ * Default: 15_000 (15 seconds).
901
+ */
902
+ pollIntervalMs?: number;
903
+ /**
904
+ * Hard deadline before the wait gives up and skips the publish.
905
+ * Default: 1_800_000 (30 minutes).
906
+ */
907
+ timeoutMs?: number;
908
+ };
909
+ }
910
+ interface VersionPrConfig {
911
+ /**
912
+ * Auto-assign these users (logins) as the PR assignees on creation.
913
+ * Existing assignees are preserved; this only adds. Defaults to
914
+ * unassigned.
915
+ */
916
+ assignees?: string[];
917
+ /**
918
+ * Enable GitHub's auto-merge once status checks pass. Maps to
919
+ * `gh pr merge --auto`. Requires the repo to have auto-merge
920
+ * enabled in settings. Default `false`.
921
+ */
922
+ autoMerge?: boolean;
923
+ /**
924
+ * Merge strategy for auto-merge — defaults to `"squash"`. Honoured
925
+ * only when `autoMerge: true`.
926
+ */
927
+ autoMergeMethod?: "merge" | "rebase" | "squash";
928
+ /**
929
+ * Periodically rebase the version-PR branch on top of `base` so
930
+ * the PR doesn't drift behind. Default `false`. Enable when
931
+ * the version-PR sits open for long periods and conflicts with
932
+ * other PRs are likely. The actual rebase runs via
933
+ * `vis release ci rebase-pr` (which the CI workflow can schedule
934
+ * on a cron).
935
+ */
936
+ autoRebase?: boolean;
937
+ branch?: string;
938
+ /** Sentinel comment marker for sticky-update detection. */
939
+ commentMarker?: string;
940
+ /**
941
+ * Labels applied to the version-PR. Defaults to `["autorelease: pending"]`.
942
+ * Set to `[]` to disable. The label is added on every PR refresh —
943
+ * external automation can rely on it being present until the
944
+ * lifecycle moves on (`autorelease: tagged` post-publish, etc.).
945
+ */
946
+ labels?: string[];
947
+ /** Markdown prepended to the PR body. */
948
+ preamble?: string;
949
+ /**
950
+ * Auto-request reviews from these users / teams on PR creation.
951
+ * Format: GitHub usernames or `org/team`. Existing reviewers are
952
+ * preserved.
953
+ */
954
+ reviewers?: string[];
955
+ title?: string;
956
+ }
957
+ interface GitUserConfig {
958
+ email: string;
959
+ name: string;
960
+ }
961
+ /**
962
+ * Post-release notification walk — semantic-release parity.
963
+ *
964
+ * **Default OFF.** Set `release.successWalk: {}` to opt in with defaults.
965
+ * Leaving `successWalk` undefined in the workspace config is the explicit
966
+ * "don't touch third-party PRs" stance — sticky comments and the
967
+ * `released` label are an irreversible side effect on every PR mentioned
968
+ * in a changelog body, so we never apply them implicitly.
969
+ *
970
+ * When opted in, after a successful publish wave vis walks every PR /
971
+ * issue referenced in the rendered changelog entries and:
972
+ * 1. Posts (or upserts) a sticky comment announcing the release version.
973
+ * 2. Adds the configured labels (default `["released"]`).
974
+ *
975
+ * Failure to walk a single ref is non-fatal — the publish itself already
976
+ * succeeded; we don't want a forge API blip rolling that back.
977
+ */
978
+ interface SuccessWalkConfig {
979
+ /**
980
+ * Comment body template posted on every referenced PR / issue. Tokens:
981
+ * - `{version}` — the published version (e.g. `1.2.0`)
982
+ * - `{name}` — the published package name
983
+ * - `{tag}` — the git tag created for this release
984
+ * - `{url}` — the forge release URL when available
985
+ *
986
+ * Default mirrors semantic-release's `successComment`.
987
+ */
988
+ commentBody?: string;
989
+ /**
990
+ * Enable the walk. Default `true` when `successWalk` is present in
991
+ * the config. Setting `enabled: false` is functionally equivalent to
992
+ * omitting `successWalk` entirely (no walk runs) — the difference is
993
+ * one of intent: an explicit `enabled: false` documents that the
994
+ * operator has considered the walk and disabled it.
995
+ *
996
+ * Leaving `successWalk` undefined at the top level is the recommended
997
+ * "off" stance — see the interface docstring.
998
+ */
999
+ enabled?: boolean;
1000
+ /** Labels added to every walked PR / issue. Default `["released"]`. */
1001
+ labels?: string[];
1002
+ /**
1003
+ * Skip the walk entirely on prerelease channels — the typical "don't
1004
+ * notify users their PR shipped in a beta" guardrail. Default `true`.
1005
+ */
1006
+ skipPrerelease?: boolean;
1007
+ }
1008
+ interface VisReleaseConfig {
1009
+ /** Default npm `--access` flag. Default: `"public"`. */
1010
+ access?: "public" | "restricted";
1011
+ /** Suppress the unstable warning printed on first invocation (RFC §21.2). */
1012
+ acknowledgeUnstable?: boolean;
1013
+ /** Single GH release per wave vs per-package. */
1014
+ aggregateRelease?: boolean | {
1015
+ enabled: boolean;
1016
+ title?: string;
1017
+ };
1018
+ /**
1019
+ * Pattern for the workspace-level aggregate release tag (when
1020
+ * `aggregateRelease.enabled`). Tokens: `{date}`, `{version}` (latest
1021
+ * bumped pkg's version). Default: `"release-{date}"`.
1022
+ */
1023
+ aggregateReleaseTagPattern?: string;
1024
+ /** Trust gate for per-package custom commands. */
1025
+ allowCustomCommands?: boolean | string[];
1026
+ /** Branch used for `--from` baseline in `status`/`generate`. Default: `"main"`. */
1027
+ baseBranch?: string;
1028
+ /**
1029
+ * Opt-in cascade for `devDependencies` bumps (changesets #944 parity).
1030
+ *
1031
+ * By default, when a workspace package is bumped, only its
1032
+ * `dependencies` / `peerDependencies` / `optionalDependencies`
1033
+ * consumers are considered for propagation — devDependency
1034
+ * consumers are silently ignored because consumers of the
1035
+ * dependent don't observe the devDep at runtime.
1036
+ *
1037
+ * Some teams disagree (especially for type-only packages or build
1038
+ * plugins) and want a devDep bump to still trigger a patch on its
1039
+ * consumer so the lockfile stays in sync across machines. Set this
1040
+ * to:
1041
+ *
1042
+ * - `true` — every devDep cascade fires (patch-level on the
1043
+ * dependent), regardless of the source package.
1044
+ * - `string[]` — narrow allow-list of source package names. Only
1045
+ * bumps to packages whose name appears in the list will cascade
1046
+ * through devDependencies. Useful when only specific
1047
+ * "infrastructure" packages should propagate via devDeps.
1048
+ *
1049
+ * Default: `false` (devDep cascades remain off — historical behaviour).
1050
+ */
1051
+ bumpDevDependencies?: boolean | string[];
1052
+ /**
1053
+ * For pre-1.0 versions, demote `major` bumps to `minor`. Common for
1054
+ * 0.x libraries that don't want their first breaking change to leap
1055
+ * to 2.0. Maps to release-please's `bump-minor-pre-major`. Default
1056
+ * `false`.
1057
+ */
1058
+ bumpMinorPreMajor?: boolean;
1059
+ /**
1060
+ * Companion to `bumpMinorPreMajor` — also demote `minor` bumps to
1061
+ * `patch` for pre-1.0 versions. Maps to release-please's
1062
+ * `bump-patch-for-minor-pre-major`. No-op without
1063
+ * `bumpMinorPreMajor`. Default `false`.
1064
+ */
1065
+ bumpPatchForMinorPreMajor?: boolean;
1066
+ /** Globs that count toward "package changed" detection. */
1067
+ changedFilePatterns?: string[];
1068
+ /**
1069
+ * Changelog formatter selection. Pass `false` to disable changelog output,
1070
+ * one of the built-in names (`"default"`, `"github"`, `"keep-a-changelog"`),
1071
+ * a path to a custom module, or a `[path, options]` tuple.
1072
+ */
1073
+ changelog?: false | string | [string, Record<string, unknown>];
1074
+ /** Directory holding change files. Default: `".vis/release"`. */
1075
+ changesDir?: string;
1076
+ /** Per-channel routing config (semantic-release-style). */
1077
+ channels?: Record<string, ChannelConfig>;
1078
+ /**
1079
+ * Source of truth for "what is the current version of this package?",
1080
+ * controlling how `oldVersion` is resolved when building the release plan.
1081
+ *
1082
+ * `"disk"` (default) — read `package.json#version` (or the equivalent
1083
+ * manifest field for non-npm versionActions). Preserves vis's
1084
+ * historical behaviour and is the right choice when the manifest
1085
+ * on disk is the canonical source.
1086
+ * `"registry"` — query the package registry via the package's
1087
+ * `versionActions.readPublishedVersion()`. Useful when the manifest
1088
+ * drifts between repo and registry (e.g. teams that publish
1089
+ * out-of-band) and you want the registry to win.
1090
+ * `"git-tag"` — find the highest `releaseTagPattern`-matching tag in
1091
+ * the current commit's ancestry and parse the version out of it.
1092
+ * Matches nx's `git-tag` resolver and release-please's tag-based
1093
+ * lookup.
1094
+ *
1095
+ * `"registry"` and `"git-tag"` fall back to the manifest version when
1096
+ * their primary source cannot produce a valid semver (e.g. registry 404
1097
+ * on a freshly-added package, no matching tag yet, etc.) and surface a
1098
+ * plan warning so the operator sees what happened.
1099
+ *
1100
+ * Overridable per-package via `packages.&lt;name>.currentVersionResolver`.
1101
+ *
1102
+ * The `--first-release` CLI flag is the bootstrap shortcut for this
1103
+ * setting — it forces `"disk"` regardless of config and additionally
1104
+ * skips remote-tag collision checks, so the very first run on a
1105
+ * greenfield monorepo can't trip over missing tags or registry 404s.
1106
+ */
1107
+ currentVersionResolver?: "disk" | "git-tag" | "registry";
1108
+ /** Default `release.managed` for unconfigured packages. Default: `false`. */
1109
+ defaultManaged?: boolean;
1110
+ /** Default dep-bump rules (overridable per-package). */
1111
+ dependencyBumpRules?: DependencyBumpRules;
1112
+ /**
1113
+ * Opt-in cascade for `pnpm-workspace.yaml` catalog version bumps
1114
+ * (changesets #1707 parity).
1115
+ *
1116
+ * pnpm's `catalog:` / `catalogs:` blocks let multiple packages
1117
+ * share a single version range. When the operator bumps a catalog
1118
+ * entry (e.g. `react: ^18.2.0` → `react: ^18.3.0`) every consumer
1119
+ * package pulls the new version on its next `pnpm install`. Without
1120
+ * detection, vis sees no change to the consumer's `package.json`
1121
+ * and skips it — so the published tarball ends up shipping a stale
1122
+ * `"react": "catalog:"` reference that resolves differently across
1123
+ * machines.
1124
+ *
1125
+ * When `true`, vis diffs `pnpm-workspace.yaml` between `HEAD~1`
1126
+ * (the previous release commit) and `HEAD` (working tree). Every
1127
+ * catalog dep that moved triggers a `patch` bump on each consumer
1128
+ * package, attributed as `BumpReason.CATALOG_CHANGED` in the
1129
+ * release plan. Set on the consumer's dep cascade rules to widen
1130
+ * the bump level via the same `dependencyBumpRules` knob used for
1131
+ * direct dependency bumps.
1132
+ *
1133
+ * Default: `false` (backwards-compat — the prior behaviour was to
1134
+ * silently ignore catalog changes during plan assembly).
1135
+ */
1136
+ detectCatalogChanges?: boolean;
1137
+ /**
1138
+ * Fixed groups: members share the same version, all bump on any change.
1139
+ *
1140
+ * Two accepted shapes (backwards-compatible — the original
1141
+ * `string[][]` keeps working):
1142
+ *
1143
+ * - `string[]` — bare list of package names / globs.
1144
+ * Implicitly `{ changelog: { mode: "per-package" } }`.
1145
+ * - `{ packages, changelog }` — object form, lets you opt into a
1146
+ * SHARED changelog file for the group
1147
+ * (changesets #1059 parity). When
1148
+ * `changelog.mode === "shared"`, every
1149
+ * member's entry is rendered into one
1150
+ * group file (default
1151
+ * `&lt;first-member-dir>/GROUP-CHANGELOG.md`).
1152
+ */
1153
+ fixed?: ReleaseGroupConfig[];
1154
+ /**
1155
+ * Floating major-version tag. When `true`, every non-prerelease,
1156
+ * non-private release also force-updates a `&lt;safe-name>-v&lt;major>`
1157
+ * tag to point at the release commit. `safe-name` is the package
1158
+ * name with the leading `@` stripped and `/` replaced by `-`:
1159
+ *
1160
+ * - `@acme/action` → `acme-action-v1`
1161
+ * - `@vendor/cli` → `vendor-cli-v1`
1162
+ * - unscoped `cli` → `cli-v1`
1163
+ *
1164
+ * Useful for reusable GitHub Actions consumers who pin to
1165
+ * `acme/action@acme-action-v1` and expect automatic patch / minor
1166
+ * delivery without a tag-rev migration. The scope is included so
1167
+ * two packages with the same unscoped name from different scopes
1168
+ * (`@acme/cli` + `@vendor/cli`) don't both retarget the same
1169
+ * floating tag.
1170
+ *
1171
+ * Skipped on:
1172
+ * - Prereleases (per-channel `prerelease` configured). The float
1173
+ * would otherwise yank the major pointer across an unstable
1174
+ * pre-release boundary.
1175
+ * - Packages whose `releaseTagPattern` already includes `{major}`
1176
+ * (the pattern is already serving the same role).
1177
+ * - Private packages (`package.json#private === true`) and
1178
+ * packages that set `skipNpmPublish: true` — there's no
1179
+ * published artifact for a consumer to pin against, so a
1180
+ * floating tag would just clutter the tag history.
1181
+ *
1182
+ * Default: `false`. Semantic-release parity: #1515.
1183
+ */
1184
+ floatingMajorTag?: boolean;
1185
+ /**
1186
+ * Run the project's Prettier over the files the version step writes
1187
+ * (package.json bumps + CHANGELOG.md entries) before committing them
1188
+ * (RFC §14 step 7). Scoped to the changed files only — never the whole
1189
+ * tree. Resolves the project's own Prettier from the workspace root;
1190
+ * soft-fails if Prettier isn't installed.
1191
+ *
1192
+ * Default: `false` (opt-in — a project that doesn't use Prettier, or
1193
+ * whose Prettier config conflicts with how vis writes JSON, leaves this
1194
+ * off).
1195
+ */
1196
+ formatChangedFiles?: boolean;
1197
+ /**
1198
+ * Self-hosted GitHub Enterprise host (e.g. `"github.acme.com"` — no
1199
+ * scheme). Translates to the `GH_HOST` env var that the `gh` CLI
1200
+ * consumes natively, so all adapter calls land on the right
1201
+ * instance. Operators can also export `GH_HOST` directly; this
1202
+ * config knob is the typed, vis.config.ts-discoverable equivalent.
1203
+ * Ignored when `provider` resolves to anything other than `github`.
1204
+ */
1205
+ githubHost?: string;
1206
+ /**
1207
+ * Self-hosted GitLab host (e.g. `"gitlab.example.com"`). Translates to
1208
+ * the `GITLAB_HOST` env var that `glab` consumes natively, so all
1209
+ * adapter calls land on the right instance. Ignored when `provider`
1210
+ * resolves to anything other than `gitlab`.
1211
+ */
1212
+ gitlabHost?: string;
1213
+ /**
1214
+ * Sign release-flow commits with `git commit -S`. Set to `true` in
1215
+ * workspaces that enforce `commit.gpgsign = true`. The active git
1216
+ * identity must have a configured signing key (gpg, ssh, x509).
1217
+ * Default `false`.
1218
+ */
1219
+ gitSignCommits?: boolean;
1220
+ /** Git committer identity used by CI workflows. */
1221
+ gitUser?: GitUserConfig;
1222
+ /**
1223
+ * Group-scoped preVersion command. Runs once before any package in the
1224
+ * group is versioned. `groupName` matches a `fixed`/`linked` array's index
1225
+ * (group-0, group-1, …) or a named entry (future).
1226
+ */
1227
+ groupPreVersionCommands?: Record<string, string>;
1228
+ /**
1229
+ * HTTPS proxy URL (e.g. `"http://proxy.acme.com:8080"`) for
1230
+ * enterprise networks that route outbound HTTPS through a proxy.
1231
+ *
1232
+ * Wired through to two surfaces:
1233
+ *
1234
+ * 1. `gh` / `glab` CLI subprocesses get `HTTPS_PROXY` and
1235
+ * `HTTP_PROXY` set on their env so they tunnel through the
1236
+ * proxy exactly as if the operator had exported the vars
1237
+ * manually.
1238
+ *
1239
+ * 2. Every internal `fetch()` call (registry probes in
1240
+ * version-actions/{cargo,python,maven,container}.ts and the
1241
+ * shared `safeFetchVersionMetadata` helper) attaches an undici
1242
+ * `ProxyAgent` via the `dispatcher` option, so Node's built-in
1243
+ * fetch routes through the proxy as well.
1244
+ *
1245
+ * Node 22's bundled undici handles the proxy plumbing — no
1246
+ * `https-proxy-agent` dep needed.
1247
+ */
1248
+ httpProxy?: string;
1249
+ /** Globs of packages to exclude from release entirely. */
1250
+ ignore?: string[];
1251
+ /** Globs that override `ignore` and `private` exclusion. */
1252
+ include?: string[];
1253
+ /**
1254
+ * Linked groups: members share bump levels but only changed members
1255
+ * publish. Accepts the same dual-shape format as `fixed` — see the
1256
+ * `ReleaseGroupConfig` doc comment for details.
1257
+ */
1258
+ linked?: ReleaseGroupConfig[];
1259
+ /**
1260
+ * Notifications — post-release fan-out to chat / webhook
1261
+ * destinations. See {@link NotificationsConfig}. Each channel
1262
+ * runs in parallel; per-channel failures log a warning but do NOT
1263
+ * fail the publish.
1264
+ */
1265
+ notifications?: NotificationsConfig;
1266
+ /**
1267
+ * Emit one release commit per package (a `release(channel): pkg@version
1268
+ * [skip ci]` message) instead of a single aggregate commit for the whole
1269
+ * wave (RFC §19.5). Mirrors the per-package commit history that
1270
+ * multi-semantic-release produced — useful for projects migrating off it
1271
+ * that want to preserve `git log` shape. Only honoured when
1272
+ * `aggregateRelease` is falsy. Shared artifacts (lockfile + consumed
1273
+ * change-file deletions) ride along in the final package's commit.
1274
+ *
1275
+ * Default: `false` (one aggregate commit per wave).
1276
+ */
1277
+ oneCommitPerPackage?: boolean;
1278
+ /** Per-package overrides (matches `package.json["vis-release"]`). */
1279
+ packages?: Record<string, PerPackageReleaseConfig>;
1280
+ /** Lifecycle plugins (tegami-style hooks: `applyDraft` / `willPublish` / `afterPublish` / `afterPublishAll`). */
1281
+ plugins?: ReleasePlugin[];
1282
+ /** Shell command run after all publishes complete. */
1283
+ postPublishCommand?: string;
1284
+ /** Shell command run after versioning, before publish. */
1285
+ postVersionCommand?: string;
1286
+ /** Shell command run after versioning, before publish. */
1287
+ prePublishCommand?: string;
1288
+ /** Shell command run before any versioning. */
1289
+ preVersionCommand?: string;
1290
+ /** Whether to version + tag private packages. */
1291
+ privatePackages?: {
1292
+ tag: boolean;
1293
+ version: boolean;
1294
+ };
1295
+ /** Forge provider for remote operations (PR comments, releases, version PRs). */
1296
+ provider?: "github" | "gitlab" | "auto";
1297
+ /** Publish-related config. */
1298
+ publish?: PublishConfig;
1299
+ /**
1300
+ * Wrap each per-package GitHub / GitLab release body with operator-
1301
+ * supplied header / footer text. Common use: link a migration guide
1302
+ * above the auto-generated body, or paste a sponsorship blurb below.
1303
+ *
1304
+ * Both fields are template strings supporting tokens:
1305
+ * - `{name}` — package name
1306
+ * - `{version}` — new version
1307
+ * - `{previousVersion}` — previous version
1308
+ * - `{date}` — `YYYY-MM-DD`
1309
+ * - `{repo}` — `owner/repo` slug
1310
+ * - `{contributors}` — bullet list of authors collected from the
1311
+ * entire wave's change-file `author:` frontmatter (release-please
1312
+ * #292). Wave-scoped — every per-package release in the wave
1313
+ * sees the same set, so cascade and dependency-only bumps still
1314
+ * credit the upstream author. Block-only — keep this token on
1315
+ * its own line, typically under a heading; inline use like
1316
+ * `Thanks {contributors}!` will produce broken markdown.
1317
+ * Authors are de-duplicated case-insensitively, markdown-escaped,
1318
+ * and filtered through the github formatter's `internalAuthors`
1319
+ * list (when configured). Empty string when no change file in
1320
+ * the wave declared an author.
1321
+ *
1322
+ * When set, the rendered body is composed as `header\n\n&lt;body>\n\nfooter`.
1323
+ * Empty / unset fields are skipped (no leading / trailing blank line).
1324
+ *
1325
+ * > **Aggregate-release mode (`release.aggregateRelease: true`)**: the
1326
+ * > header and footer are NOT applied. The aggregate release body is
1327
+ * > already operator-templated via `release.aggregateRelease.title`
1328
+ * > and the per-package list is auto-rendered. If you want a custom
1329
+ * > prefix/suffix on the aggregate body, override
1330
+ * > `release.aggregateRelease.title` directly.
1331
+ *
1332
+ * Release-please parity: #1274.
1333
+ */
1334
+ releaseNoteTemplate?: {
1335
+ footer?: string;
1336
+ header?: string;
1337
+ };
1338
+ /**
1339
+ * Git tag template — overridable per-package via
1340
+ * `package.json["vis-release"]["releaseTagPattern"]`.
1341
+ * Tokens: `{name}`, `{unscopedName}`, `{version}`, `{major}`, `{minor}`,
1342
+ * `{patch}`, `{date}`, `{channel}`. Default: `"{name}@{version}"`.
1343
+ */
1344
+ releaseTagPattern?: string;
1345
+ /**
1346
+ * Sign release tags. Wraps `git tag -s` / `-u &lt;key>` and adds a
1347
+ * `gitsign`-based code path for sigstore-style keyless signing.
1348
+ *
1349
+ * Modes:
1350
+ * - `"gpg"` — `git tag -s` (or `-u &lt;key>` when `key` is set).
1351
+ * Relies on `user.signingkey` in git config.
1352
+ * - `"ssh"` — Same `-s` flag, but the operator must have
1353
+ * `gpg.format=ssh` + `user.signingkey=&lt;path-to-key>`
1354
+ * configured. Doctor surfaces missing config with a
1355
+ * warning at preflight.
1356
+ * - `"sigstore"` — Experimental ("preview"). Uses `gitsign` when on
1357
+ * PATH, otherwise falls back to GPG with a warning.
1358
+ *
1359
+ * Per-package signing is not supported (release tags are a workspace-
1360
+ * wide artefact). Default: undefined (no signing).
1361
+ *
1362
+ * Release-please parity: #1738, #1314.
1363
+ */
1364
+ signing?: {
1365
+ key?: string;
1366
+ mode: "gpg" | "sigstore" | "ssh";
1367
+ };
1368
+ /** Snapshot config. */
1369
+ snapshot?: SnapshotConfig;
1370
+ /**
1371
+ * Post-release notification walk. Configures the
1372
+ * "🎉 This is included in version X.Y.Z" comment + `released` label
1373
+ * pass that runs after a successful publish wave.
1374
+ *
1375
+ * **Default OFF.** Leave undefined and the walk never runs — vis
1376
+ * will not touch third-party PRs referenced in changelog bodies.
1377
+ * Set to `{}` to opt in with defaults, or pass an object to override
1378
+ * the comment template / labels / prerelease behaviour.
1379
+ */
1380
+ successWalk?: SuccessWalkConfig;
1381
+ /** Dep-propagation mode. Default: `"out-of-range"`. */
1382
+ updateInternalDependencies?: UpdateInternalDependenciesMode;
1383
+ /** Version-PR config. */
1384
+ versionPr?: VersionPrConfig;
1385
+ /**
1386
+ * Workspace-level changelog config (RFC §6.1 / nx parity).
1387
+ * When set, renders one CHANGELOG.md at the workspace root in addition
1388
+ * to per-package files.
1389
+ */
1390
+ workspaceChangelog?: false | {
1391
+ file?: string;
1392
+ waveHeading?: string;
1393
+ };
1394
+ }
1395
+ interface LockInfo {
1396
+ acquiredAt: string;
1397
+ /**
1398
+ * `os.hostname()` of the process that acquired the lock. PIDs are
1399
+ * meaningless across hosts (CI runners reuse PIDs across containers),
1400
+ * so foreign-host lockfiles are treated as automatically stale.
1401
+ */
1402
+ hostname?: string;
1403
+ pid: number;
1404
+ /** `process.platform` — recorded for debugging stale lock takeovers. */
1405
+ platform?: string;
1406
+ }
1407
+ interface StateFile {
1408
+ /** Versions written to disk. */
1409
+ applied: string[];
1410
+ channel?: string;
1411
+ /**
1412
+ * Packages already notified to chat / webhook channels in a prior
1413
+ * wave. Keyed by `${name}@${version}` so a `--resume` after a
1414
+ * partial failure doesn't re-fire Slack pings for releases that
1415
+ * already shipped + notified on run 1. Empty on a fresh wave.
1416
+ */
1417
+ notified?: string[];
1418
+ plan: PlannedRelease[];
1419
+ /** Tarballs uploaded to the registry. */
1420
+ published: string[];
1421
+ /** Whether `git push --tags` succeeded. */
1422
+ pushed: boolean;
1423
+ startedAt: string;
1424
+ /** Local git tags created. */
1425
+ tagged: string[];
1426
+ version: 1;
1427
+ /**
1428
+ * Packages whose successWalk (per-PR sticky comment + label) has
1429
+ * already fired. Tracked alongside `notified` for the same reason:
1430
+ * `--resume` after a partial failure should not re-walk the PRs
1431
+ * for releases already commented on. The sticky-comment marker
1432
+ * provides idempotency at the forge level too, but skipping the
1433
+ * walk entirely saves the rate-limited API calls.
1434
+ */
1435
+ walked?: string[];
1436
+ }
1437
+ /**
1438
+ * One pending staged publish — a tarball uploaded to npm but not yet
1439
+ * approved by a maintainer. Tracked across runs so a follow-up wave
1440
+ * can refuse to re-version the same package, and so
1441
+ * `vis release stage approve --all` can drain everything from a single
1442
+ * file regardless of which CI run created the stage.
1443
+ */
1444
+ interface PendingStage {
1445
+ /** Stage id returned by `npm stage publish`. */
1446
+ id: string;
1447
+ /** Package name (e.g. `@scope/pkg`). */
1448
+ name: string;
1449
+ /** Reason the stage is still pending. */
1450
+ reason: "rejected" | "timeout";
1451
+ /** ISO-8601 timestamp when the stage was recorded. */
1452
+ stagedAt: string;
1453
+ /** dist-tag the stage targets (`latest`, `next`, …). */
1454
+ tag?: string;
1455
+ /** Version being staged. */
1456
+ version: string;
1457
+ }
1458
+ /**
1459
+ * Tracked, committed file: `.vis/release/staged.json`.
1460
+ *
1461
+ * Lives in git so pending stages survive CI runner churn and branch
1462
+ * switches. The release flow auto-commits this file after every publish
1463
+ * wave with `[skip ci]` to avoid loops.
1464
+ */
1465
+ interface StagedRegistryFile {
1466
+ pending: PendingStage[];
1467
+ /**
1468
+ * Packages already notified to chat / webhook channels — survives
1469
+ * CI runner churn (a fresh runner clones the repo and reads this
1470
+ * tracked file, instead of relying on the gitignored `.state.json`
1471
+ * which only the originating runner can see).
1472
+ *
1473
+ * Keyed by `${name}@${version}`. Pruned to the last 30 days OR last
1474
+ * 100 entries per write, whichever is smaller, so the registry
1475
+ * doesn't grow unboundedly on long-lived workspaces.
1476
+ */
1477
+ recentlyNotified?: {
1478
+ at: string;
1479
+ key: string;
1480
+ }[];
1481
+ /**
1482
+ * Packages already walked (PR/issue sticky comment + `released`
1483
+ * label posted) — same cross-runner concern as `recentlyNotified`.
1484
+ */
1485
+ recentlyWalked?: {
1486
+ at: string;
1487
+ key: string;
1488
+ }[];
1489
+ /** ISO-8601 timestamp of the last write. */
1490
+ updatedAt: string;
1491
+ version: 1;
1492
+ }
1493
+ export { BUMP_LEVELS, BumpAs, BumpLevel, BumpReason, BumpSource, CatalogResolutionMode, ChangeFile, ChangeFileNested, ChangeFileSimple, ChannelConfig, ChannelMode, CleanPackageJsonConfig, DependencyBumpRule, DependencyBumpRules, DependencyKind, DependentInfo, DiscordConfig, ExtraFileAnnotationRule, ExtraFileRegexRule, ExtraFileRule, GitUserConfig, LockInfo, NotificationsConfig, PackManager, PackageManifest, PendingStage, PerPackageReleaseConfig, PlannedRelease, PluginPackageInfo, PluginPublishSummary, ProtocolResolutionMode, PublishConfig, PublishGuardsConfig, PublishStrategy, ReleaseAssetsConfig, ReleaseGroupChangelogConfig, ReleaseGroupConfig, ReleasePlan, ReleasePlugin, ReleasePluginContext, ReplayCondition, SlackConfig, SnapshotBackend, SnapshotConfig, SnapshotTagKind, StagedRegistryFile, StateFile, SuccessWalkConfig, UpdateInternalDependenciesMode, VersionPrConfig, VisReleaseConfig, WebhookConfig, WorkspacePackage, bumpRank, maxBump, normaliseGroup };