@intentius/chant 0.124.99 → 0.124.101

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 (245) hide show
  1. package/bin/chant +3 -3
  2. package/dist/action-pins.d.ts +2 -0
  3. package/dist/action-pins.js +3 -0
  4. package/dist/ci-detect.d.ts +13 -0
  5. package/dist/ci-detect.js +12 -0
  6. package/dist/ci-system.d.ts +66 -0
  7. package/dist/ci-system.js +61 -0
  8. package/dist/cli/commands/carve-emit.js +2 -2
  9. package/dist/cli/commands/check-lexicon-plugin.d.ts +2 -2
  10. package/dist/cli/commands/check-lexicon-plugin.js +3 -3
  11. package/dist/cli/commands/check-lexicon.js +4 -4
  12. package/dist/cli/commands/init-lexicon/templates/project.d.ts +1 -1
  13. package/dist/cli/commands/init-lexicon/templates/project.js +4 -4
  14. package/dist/cli/commands/init.d.ts +13 -0
  15. package/dist/cli/commands/init.js +30 -2
  16. package/dist/cli/handlers/build.js +27 -0
  17. package/dist/cli/handlers/release-doctor.d.ts +12 -0
  18. package/dist/cli/handlers/release-doctor.js +118 -0
  19. package/dist/cli/handlers/release-init.d.ts +10 -0
  20. package/dist/cli/handlers/release-init.js +342 -0
  21. package/dist/cli/handlers/release.d.ts +50 -1
  22. package/dist/cli/handlers/release.js +688 -30
  23. package/dist/cli/handlers/run-generate.js +11 -0
  24. package/dist/cli/main.d.ts +2 -0
  25. package/dist/cli/main.js +45 -97
  26. package/dist/cli/parse-args.js +55 -0
  27. package/dist/cli/registry.d.ts +18 -0
  28. package/dist/cli/release-commands/artifacts.d.ts +3 -0
  29. package/dist/cli/release-commands/artifacts.js +14 -0
  30. package/dist/cli/release-commands/candidates.d.ts +3 -0
  31. package/dist/cli/release-commands/candidates.js +16 -0
  32. package/dist/cli/release-commands/changed.d.ts +3 -0
  33. package/dist/cli/release-commands/changed.js +14 -0
  34. package/dist/cli/release-commands/compose.d.ts +3 -0
  35. package/dist/cli/release-commands/compose.js +16 -0
  36. package/dist/cli/release-commands/cut.d.ts +3 -0
  37. package/dist/cli/release-commands/cut.js +49 -0
  38. package/dist/cli/release-commands/doctor.d.ts +3 -0
  39. package/dist/cli/release-commands/doctor.js +14 -0
  40. package/dist/cli/release-commands/export.d.ts +3 -0
  41. package/dist/cli/release-commands/export.js +12 -0
  42. package/dist/cli/release-commands/images.d.ts +3 -0
  43. package/dist/cli/release-commands/images.js +13 -0
  44. package/dist/cli/release-commands/index.d.ts +8 -0
  45. package/dist/cli/release-commands/index.js +52 -0
  46. package/dist/cli/release-commands/init.d.ts +3 -0
  47. package/dist/cli/release-commands/init.js +16 -0
  48. package/dist/cli/release-commands/list.d.ts +3 -0
  49. package/dist/cli/release-commands/list.js +10 -0
  50. package/dist/cli/release-commands/next.d.ts +3 -0
  51. package/dist/cli/release-commands/next.js +13 -0
  52. package/dist/cli/release-commands/publish.d.ts +3 -0
  53. package/dist/cli/release-commands/publish.js +22 -0
  54. package/dist/cli/release-commands/stamp.d.ts +3 -0
  55. package/dist/cli/release-commands/stamp.js +15 -0
  56. package/dist/cli/release-commands/status.d.ts +3 -0
  57. package/dist/cli/release-commands/status.js +17 -0
  58. package/dist/cli/release-commands/tag.d.ts +3 -0
  59. package/dist/cli/release-commands/tag.js +12 -0
  60. package/dist/cli/release-commands/types.d.ts +20 -0
  61. package/dist/cli/release-commands/types.js +1 -0
  62. package/dist/cli/release-commands/verify.d.ts +3 -0
  63. package/dist/cli/release-commands/verify.js +15 -0
  64. package/dist/cli/release-commands/workflow.d.ts +3 -0
  65. package/dist/cli/release-commands/workflow.js +13 -0
  66. package/dist/codegen/pinned-upgrade.js +1 -1
  67. package/dist/components/capability-plugin.d.ts +1 -1
  68. package/dist/components/capability-plugin.js +1 -1
  69. package/dist/components/cli-support.d.ts +1 -1
  70. package/dist/components/cli-support.js +1 -1
  71. package/dist/config-environments.d.ts +8 -1
  72. package/dist/config-environments.js +2 -0
  73. package/dist/config.d.ts +299 -6
  74. package/dist/config.js +102 -5
  75. package/dist/dead-guards.d.ts +5 -1
  76. package/dist/dead-guards.js +34 -23
  77. package/dist/discovery/sandbox/driver.js +1 -1
  78. package/dist/discovery/specifier-resolve.js +1 -1
  79. package/dist/floor-table.d.ts +3 -1
  80. package/dist/floor-table.data.js +23 -3
  81. package/dist/floor-table.js +4 -3
  82. package/dist/forge-remote.d.ts +13 -0
  83. package/dist/forge-remote.js +15 -0
  84. package/dist/lexicon.d.ts +41 -2
  85. package/dist/lifecycle/__fixtures__/publish-fakes.d.ts +62 -0
  86. package/dist/lifecycle/__fixtures__/publish-fakes.js +270 -3
  87. package/dist/lifecycle/publish-attachments.d.ts +2 -1
  88. package/dist/lifecycle/publish-attachments.js +19 -2
  89. package/dist/lifecycle/publish-cargo.d.ts +99 -0
  90. package/dist/lifecycle/publish-cargo.js +412 -0
  91. package/dist/lifecycle/publish-credentials.d.ts +1 -1
  92. package/dist/lifecycle/publish-credentials.js +8 -0
  93. package/dist/lifecycle/publish-declaration.d.ts +199 -4
  94. package/dist/lifecycle/publish-declaration.js +200 -9
  95. package/dist/lifecycle/publish-forge.d.ts +45 -2
  96. package/dist/lifecycle/publish-forge.js +434 -34
  97. package/dist/lifecycle/publish-git-ssh.d.ts +15 -0
  98. package/dist/lifecycle/publish-git-ssh.js +30 -4
  99. package/dist/lifecycle/publish-github.d.ts +40 -2
  100. package/dist/lifecycle/publish-github.js +100 -3
  101. package/dist/lifecycle/publish-homebrew.d.ts +7 -9
  102. package/dist/lifecycle/publish-homebrew.js +34 -197
  103. package/dist/lifecycle/publish-index.d.ts +141 -0
  104. package/dist/lifecycle/publish-index.js +719 -0
  105. package/dist/lifecycle/publish-marketplace.js +77 -0
  106. package/dist/lifecycle/publish-mcp-registry.d.ts +66 -0
  107. package/dist/lifecycle/publish-mcp-registry.js +306 -0
  108. package/dist/lifecycle/publish-npm.js +165 -2
  109. package/dist/lifecycle/publish-oci.d.ts +34 -1
  110. package/dist/lifecycle/publish-oci.js +246 -7
  111. package/dist/lifecycle/publish-pypi.d.ts +136 -0
  112. package/dist/lifecycle/publish-pypi.js +657 -0
  113. package/dist/lifecycle/publish-record.d.ts +6 -3
  114. package/dist/lifecycle/publish-record.js +6 -3
  115. package/dist/lifecycle/publish-signing.d.ts +147 -0
  116. package/dist/lifecycle/publish-signing.js +257 -0
  117. package/dist/lifecycle/publish-targets.d.ts +27 -1
  118. package/dist/lifecycle/publish-targets.js +80 -0
  119. package/dist/lifecycle/publish-tauri.js +43 -0
  120. package/dist/lifecycle/publish-train-names.d.ts +54 -0
  121. package/dist/lifecycle/publish-train-names.js +118 -0
  122. package/dist/lifecycle/publish-verify.d.ts +121 -0
  123. package/dist/lifecycle/publish-verify.js +130 -0
  124. package/dist/lifecycle/query.js +8 -0
  125. package/dist/lifecycle/release-artifacts.d.ts +212 -0
  126. package/dist/lifecycle/release-artifacts.js +571 -0
  127. package/dist/lifecycle/release-changelog.d.ts +13 -1
  128. package/dist/lifecycle/release-changelog.js +35 -2
  129. package/dist/lifecycle/release-cut.d.ts +58 -3
  130. package/dist/lifecycle/release-cut.js +132 -34
  131. package/dist/lifecycle/release-doctor.d.ts +113 -0
  132. package/dist/lifecycle/release-doctor.js +996 -0
  133. package/dist/lifecycle/release-green.d.ts +86 -0
  134. package/dist/lifecycle/release-green.js +286 -0
  135. package/dist/lifecycle/release-init.d.ts +255 -0
  136. package/dist/lifecycle/release-init.js +859 -0
  137. package/dist/lifecycle/release-intents.d.ts +73 -0
  138. package/dist/lifecycle/release-intents.js +128 -0
  139. package/dist/lifecycle/release-next.d.ts +111 -0
  140. package/dist/lifecycle/release-next.js +252 -0
  141. package/dist/lifecycle/release-prerelease.d.ts +19 -0
  142. package/dist/lifecycle/release-prerelease.js +30 -0
  143. package/dist/lifecycle/release-publish.d.ts +256 -10
  144. package/dist/lifecycle/release-publish.js +246 -34
  145. package/dist/lifecycle/release-status-change.d.ts +226 -0
  146. package/dist/lifecycle/release-status-change.js +478 -0
  147. package/dist/lifecycle/release-status.d.ts +11 -0
  148. package/dist/lifecycle/release-status.js +1 -1
  149. package/dist/lifecycle/release-store.d.ts +73 -2
  150. package/dist/lifecycle/release-store.js +32 -1
  151. package/dist/lifecycle/release-tag.d.ts +142 -0
  152. package/dist/lifecycle/release-tag.js +323 -0
  153. package/dist/lifecycle/release-verify.d.ts +73 -1
  154. package/dist/lifecycle/release-verify.js +117 -2
  155. package/dist/lifecycle/release-version-formats.d.ts +73 -0
  156. package/dist/lifecycle/release-version-formats.js +570 -0
  157. package/dist/lifecycle/release-version.d.ts +58 -10
  158. package/dist/lifecycle/release-version.js +164 -36
  159. package/dist/lifecycle/release-workstation.d.ts +3 -2
  160. package/dist/lifecycle/release-workstation.js +3 -2
  161. package/dist/module-source.d.ts +2 -2
  162. package/dist/module-source.js +8 -8
  163. package/dist/op/generate-pipeline.js +1 -1
  164. package/dist/pr-forge-base.js +4 -2
  165. package/dist/pr-forge.d.ts +20 -2
  166. package/dist/pr-forge.js +46 -10
  167. package/dist/release-floors.d.ts +10 -1
  168. package/dist/release-floors.js +10 -1
  169. package/dist/tool-pins.d.ts +38 -0
  170. package/dist/tool-pins.js +54 -0
  171. package/dist/ts-loader.d.ts +1 -1
  172. package/dist/ts-loader.js +6 -6
  173. package/dist/wave-runtime.mjs +337 -334
  174. package/dist/workspace/ci-forge.d.ts +17 -0
  175. package/dist/workspace/ci-forge.js +17 -0
  176. package/dist/workspace/ci-init.js +1 -1
  177. package/dist/workspace/composites.schema.json +1 -0
  178. package/dist/workspace/declaration.d.ts +8 -0
  179. package/dist/workspace/declaration.js +12 -0
  180. package/dist/workspace/declaration.schema.json +8 -0
  181. package/dist/workspace/environments.d.ts +2 -0
  182. package/dist/workspace/environments.js +1 -1
  183. package/dist/workspace/identity-gate-rule.d.ts +61 -5
  184. package/dist/workspace/identity-gate-rule.js +81 -12
  185. package/dist/workspace/member-pipeline.d.ts +2 -1
  186. package/dist/workspace/member-pipeline.js +5 -2
  187. package/dist/workspace/reason-codes.d.ts +6 -0
  188. package/dist/workspace/reason-codes.js +8 -1
  189. package/dist/workspace/release-changed.d.ts +179 -0
  190. package/dist/workspace/release-changed.js +625 -0
  191. package/dist/workspace/release-changed.schema.json +206 -0
  192. package/dist/workspace/release-steps/artifacts.d.ts +7 -0
  193. package/dist/workspace/release-steps/artifacts.js +45 -0
  194. package/dist/workspace/release-steps/builds.d.ts +12 -0
  195. package/dist/workspace/release-steps/builds.js +38 -0
  196. package/dist/workspace/release-steps/doctor.d.ts +8 -0
  197. package/dist/workspace/release-steps/doctor.js +14 -0
  198. package/dist/workspace/release-steps/goreleaser.d.ts +16 -0
  199. package/dist/workspace/release-steps/goreleaser.js +36 -0
  200. package/dist/workspace/release-steps/green.d.ts +3 -0
  201. package/dist/workspace/release-steps/green.js +6 -0
  202. package/dist/workspace/release-steps/images.d.ts +22 -0
  203. package/dist/workspace/release-steps/images.js +59 -0
  204. package/dist/workspace/release-steps/index.d.ts +9 -0
  205. package/dist/workspace/release-steps/index.js +46 -0
  206. package/dist/workspace/release-steps/pypi.d.ts +15 -0
  207. package/dist/workspace/release-steps/pypi.js +21 -0
  208. package/dist/workspace/release-steps/qemu.d.ts +21 -0
  209. package/dist/workspace/release-steps/qemu.js +35 -0
  210. package/dist/workspace/release-steps/signing.d.ts +18 -0
  211. package/dist/workspace/release-steps/signing.js +30 -0
  212. package/dist/workspace/release-steps/stamp.d.ts +3 -0
  213. package/dist/workspace/release-steps/stamp.js +4 -0
  214. package/dist/workspace/release-steps/targets.d.ts +31 -0
  215. package/dist/workspace/release-steps/targets.js +40 -0
  216. package/dist/workspace/release-steps/types.d.ts +104 -0
  217. package/dist/workspace/release-steps/types.js +2 -0
  218. package/dist/workspace/release-steps/verify.d.ts +3 -0
  219. package/dist/workspace/release-steps/verify.js +4 -0
  220. package/dist/workspace/release-toolchains.d.ts +59 -0
  221. package/dist/workspace/release-toolchains.js +133 -0
  222. package/dist/workspace/release-train-workflow.d.ts +29 -0
  223. package/dist/workspace/release-train-workflow.js +85 -0
  224. package/dist/workspace/release-train.d.ts +3 -1
  225. package/dist/workspace/release-train.js +20 -3
  226. package/dist/workspace/release-workflow.d.ts +160 -61
  227. package/dist/workspace/release-workflow.js +539 -193
  228. package/dist/workspace/releases.schema.json +70 -1
  229. package/dist/workspace/search-contract.d.ts +1 -1
  230. package/dist/workspace/security.js +9 -2
  231. package/dist/workspace/train-cut.d.ts +182 -0
  232. package/dist/workspace/train-cut.js +482 -0
  233. package/dist/workspace/train-prepare.d.ts +61 -0
  234. package/dist/workspace/train-prepare.js +267 -0
  235. package/dist/workspace/train-publish.d.ts +177 -0
  236. package/dist/workspace/train-publish.js +575 -0
  237. package/dist/workspace/train-range-labels.d.ts +33 -0
  238. package/dist/workspace/train-range-labels.js +109 -0
  239. package/dist/workspace/trust/seal.d.ts +13 -3
  240. package/dist/workspace/trust/seal.js +14 -4
  241. package/dist/workspace/work-cli.d.ts +3 -2
  242. package/dist/workspace/work-cli.js +3 -2
  243. package/dist/workspace/workspace-ledger.d.ts +14 -1
  244. package/dist/workspace/workspace-ledger.js +33 -7
  245. package/package.json +26 -26
@@ -53,6 +53,26 @@ export const TEMPLATES_SUBDIR = "templates";
53
53
  export const RELEASE_DIGEST_KIND = "release";
54
54
  /** The first chant that writes and reads an artifact's `ref` (#4694). */
55
55
  export const RELEASE_IMAGE_REF_FLOOR = "0.124.65";
56
+ /** The first chant that writes and reads a release's `publishes` (#5149). */
57
+ export const RELEASE_PUBLISHES_FLOOR = "0.124.101";
58
+ /** The first chant that signs a cut's green-gate record and writes and reads `sealVersion` (#5177). */
59
+ export const RELEASE_GATE_SEAL_FLOOR = "0.124.101";
60
+ /** Whether `v` reads as a list of {@link ReleaseCutIntent}. */
61
+ function isCutIntents(v) {
62
+ return (Array.isArray(v) &&
63
+ v.every((i) => i && typeof i === "object" && typeof i.path === "string" && typeof i.added === "string" && ["major", "minor", "patch"].includes(i.bump)));
64
+ }
65
+ /** Whether `v` reads as a {@link ReleaseCutGreen}. */
66
+ export function isCutGreen(v) {
67
+ if (!v || typeof v !== "object")
68
+ return false;
69
+ const g = v;
70
+ if (g.source === "chant")
71
+ return typeof g.tag === "string";
72
+ if (g.source === "forge-checks")
73
+ return typeof g.forge === "string" && Array.isArray(g.checks) && g.checks.every((c) => typeof c === "string");
74
+ return g.source === "none";
75
+ }
56
76
  /** Whether `v` reads as a {@link ReleaseCutOverride}. */
57
77
  function isCutOverride(v) {
58
78
  if (!v || typeof v !== "object")
@@ -80,6 +100,8 @@ export function normalizeRelease(release) {
80
100
  : {}),
81
101
  }))
82
102
  .sort((a, b) => byString(a.env, b.env)),
103
+ // #5149: the declared order is the publish order, so it is kept.
104
+ ...(release.publishes ? { publishes: release.publishes.map(({ target, kind, destination }) => ({ target, kind, destination })) } : {}),
83
105
  };
84
106
  }
85
107
  /** The hash input of ws-104 question 3: a param's `source` is left out. */
@@ -95,6 +117,7 @@ export function releaseHashInput(release) {
95
117
  params: t.params.map(({ name, value }) => ({ name, value })),
96
118
  ...(t.trees ? { trees: t.trees } : {}),
97
119
  })),
120
+ ...(n.publishes ? { publishes: n.publishes } : {}),
98
121
  };
99
122
  }
100
123
  /** `computePlanDigest("release", input)` over {@link releaseHashInput}. */
@@ -209,7 +232,9 @@ export function parseRelease(text) {
209
232
  (x.encoding === undefined || x.encoding === "base64")) &&
210
233
  (t.trees === undefined || (Array.isArray(t.trees) && t.trees.every((x) => x && (x.component === null || typeof x.component === "string") && typeof x.path === "string"))) &&
211
234
  Array.isArray(t.params) &&
212
- t.params.every((p) => p && typeof p.name === "string" && ["string", "number", "boolean"].includes(typeof p.value) && typeof p.source === "string"));
235
+ t.params.every((p) => p && typeof p.name === "string" && ["string", "number", "boolean"].includes(typeof p.value) && typeof p.source === "string")) &&
236
+ (r.publishes === undefined ||
237
+ (Array.isArray(r.publishes) && r.publishes.every((p) => p && typeof p.target === "string" && typeof p.kind === "string" && typeof p.destination === "string")));
213
238
  return ok ? r : null;
214
239
  }
215
240
  /** Read one release by digest. Null when none is stored, or when the file is not a release whose content hashes to its digest. */
@@ -253,10 +278,13 @@ export function parseCuts(text) {
253
278
  typeof c.timestamp === "string" &&
254
279
  (c.runOrigin === null || (typeof c.runOrigin === "object" && typeof c.runOrigin?.forge === "string")) &&
255
280
  (c.signature === null || c.signature === undefined || typeof c.signature === "string") &&
281
+ (c.sealVersion === undefined || c.sealVersion === 2) &&
256
282
  (c.runId === null || c.runId === undefined || typeof c.runId === "string") &&
257
283
  (c.channel === undefined || typeof c.channel === "string") &&
258
284
  (c.lane === undefined || typeof c.lane === "string") &&
259
285
  (c.override === undefined || isCutOverride(c.override)) &&
286
+ (c.green === undefined || isCutGreen(c.green)) &&
287
+ (c.intents === undefined || isCutIntents(c.intents)) &&
260
288
  (c.composed === undefined || (typeof c.composed === "object" && c.composed !== null && typeof c.composed.base === "string" && Array.isArray(c.composed.sources)));
261
289
  if (!ok) {
262
290
  malformed++;
@@ -327,10 +355,13 @@ export async function appendCut(input, opts) {
327
355
  runId: input.runId ?? null,
328
356
  runOrigin: input.runOrigin,
329
357
  signature: input.signature ?? null,
358
+ ...(input.signature && input.sealVersion ? { sealVersion: input.sealVersion } : {}),
330
359
  ...(input.composed ? { composed: input.composed } : {}),
331
360
  ...(input.channel ? { channel: input.channel } : {}),
332
361
  ...(input.lane ? { lane: input.lane } : {}),
333
362
  ...(input.override ? { override: input.override } : {}),
363
+ ...(input.green ? { green: input.green } : {}),
364
+ ...(input.intents && input.intents.length > 0 ? { intents: input.intents } : {}),
334
365
  };
335
366
  const content = `${existing ? `${existing.replace(/\n$/, "")}\n` : ""}${JSON.stringify(cut, sortedJsonReplacer)}\n`;
336
367
  try {
@@ -0,0 +1,142 @@
1
+ /**
2
+ * The tag a release cut makes, from `release.tag` in the member's
3
+ * `chant.config.ts` (#5150).
4
+ *
5
+ * `release.tag` is a template: `v{version}`, `cli-v{version}`,
6
+ * `{member}/v{version}` or `{path}/v{version}` for a Go module in a
7
+ * subdirectory. Its placeholders:
8
+ *
9
+ * - `{version}`: the label, with one leading `v` dropped when a digit
10
+ * follows it, so `v{version}` gives `v1.4.0` for the labels `1.4.0` and
11
+ * `v1.4.0` alike;
12
+ * - `{label}`: the label as given;
13
+ * - `{member}`: the member's ledger name, outermost first and joined by `/`
14
+ * (`npm/core` for the member `core` of a nested workspace `npm`);
15
+ * - `{path}`: the member's directory from the repository root.
16
+ *
17
+ * The object form adds `floating`, a second template with `{major}` (and
18
+ * `{member}`, `{path}`) for a tag that `chant release publish` moves to the
19
+ * release's commit once every target has revealed, such as `v1` for a
20
+ * GitHub Action. The cut never makes it.
21
+ *
22
+ * A member that sets no `release.tag` gets the tag it always got,
23
+ * `release/<label>`, or `release/<member>/<label>` in a workspace member.
24
+ * That default is written here as the template `release/{label}` or
25
+ * `release/{member}/{label}`, so the rest of the code has one shape.
26
+ *
27
+ * The ledger names a release by its record, not by its tag: a tag is found
28
+ * from a label by rendering the template, and a label from a tag by
29
+ * rendering the template for each label the member's ledger holds
30
+ * ({@link labelOfTag}). Nothing parses a tag.
31
+ */
32
+ /** The first chant with `release.tag` in `chant.config.ts`: the cut makes the tag the template renders (`{version}`, `{label}`, `{member}`, `{path}`), refuses one another member's template can render (`release-tag-collision`), `chant release tag` reads a release back from its tag through the ledger, `chant release publish` moves a `floating` tag at reveal, and `chant release workflow` triggers on the template's tags (#5150). */
33
+ export declare const RELEASE_TAG_FLOOR = "0.124.101";
34
+ /** `release.tag` in `chant.config.ts`. */
35
+ export type ReleaseTagConfig = string | {
36
+ name: string;
37
+ floating?: string;
38
+ };
39
+ export type ReleaseTagCode = "release-tag-template-invalid" | "release-tag-collision";
40
+ /** A template refused. */
41
+ export declare class ReleaseTagError extends Error {
42
+ readonly code: ReleaseTagCode;
43
+ readonly fix?: string | undefined;
44
+ constructor(code: ReleaseTagCode, message: string, fix?: string | undefined);
45
+ }
46
+ /** A member's tag templates, checked. */
47
+ export interface ReleaseTagTemplate {
48
+ /** The release's own tag. */
49
+ name: string;
50
+ /** The floating tag publish moves, or null. */
51
+ floating: string | null;
52
+ /** True when the config sets no `release.tag` and the tag is the one chant always made. */
53
+ legacy: boolean;
54
+ }
55
+ /** Where a member's templates are rendered: its ledger name and its directory from the repository root. */
56
+ export interface TagPlace {
57
+ member: string | null;
58
+ path: string | null;
59
+ }
60
+ /** The default template for a member that sets no `release.tag`. */
61
+ export declare function legacyTagTemplate(member: string | null): string;
62
+ /**
63
+ * The templates `release.tag` declares, checked, or the legacy default when
64
+ * it declares none. Throws {@link ReleaseTagError} `release-tag-template-invalid`.
65
+ */
66
+ export declare function resolveTagTemplate(config: ReleaseTagConfig | undefined, member: string | null): ReleaseTagTemplate;
67
+ /** The label as `{version}` gives it: one leading `v` dropped when a digit follows. */
68
+ export declare function versionOfLabel(label: string): string;
69
+ /** The tag a release labelled `label` gets. */
70
+ export declare function renderReleaseTag(t: ReleaseTagTemplate, place: TagPlace, label: string): string;
71
+ /** The stable MAJOR.MINOR.PATCH a label names, or null for a prerelease or anything else. */
72
+ export declare function stableVersionOf(label: string): [number, number, number] | null;
73
+ /**
74
+ * The floating tag of the major line a label belongs to, prerelease or not,
75
+ * or null: no `floating`, or a label that names no MAJOR.MINOR.PATCH.
76
+ */
77
+ export declare function floatingTagOfLine(t: ReleaseTagTemplate, place: TagPlace, label: string): string | null;
78
+ /**
79
+ * The floating tag a release labelled `label` moves, or null: no `floating`,
80
+ * a prerelease label (#5166, the same check every publish target makes), or
81
+ * a label that is not a stable version.
82
+ */
83
+ export declare function renderFloatingTag(t: ReleaseTagTemplate, place: TagPlace, label: string): string | null;
84
+ /**
85
+ * Which of `labels` has the tag `tag` (or, for `floating`, moves it), read
86
+ * through the template: the ledger names the release, and the tag is only
87
+ * its rendering. Null when none does.
88
+ */
89
+ export declare function labelOfTag(t: ReleaseTagTemplate, place: TagPlace, tag: string, labels: Iterable<string>): string | null;
90
+ /** A template with its placeholders other than the variable filled in: the literal before and after the variable. */
91
+ export interface TagShape {
92
+ prefix: string;
93
+ suffix: string;
94
+ }
95
+ /** The literal around a template's one variable (`{version}`, `{label}` or `{major}`), with `{member}` and `{path}` filled in. */
96
+ export declare function tagShape(template: string, place: TagPlace): TagShape;
97
+ /**
98
+ * Whether two shapes can render the same tag: whether some tag is
99
+ * `prefix + x + suffix` for both, with each `x` a non-empty run of label
100
+ * characters (which never hold `/`). Worked as the intersection of two
101
+ * small automata, so `release/{label}` and `release/core/{label}` are
102
+ * apart (the label would need a `/`) and `v{version}` and `v{version}-cli`
103
+ * are not (the label `1.0.0-cli`).
104
+ */
105
+ export declare function shapesOverlap(a: TagShape, b: TagShape): boolean;
106
+ /** One member's templates, where they render. */
107
+ export interface MemberTags {
108
+ place: TagPlace;
109
+ template: ReleaseTagTemplate;
110
+ }
111
+ /**
112
+ * The first pair of tag templates, across members, that can render the same
113
+ * tag, or null. Each member's release tag and floating tag are checked
114
+ * against every other member's; a member's own two are not, since only a
115
+ * stable version moves the floating tag.
116
+ */
117
+ export declare function findTagCollision(members: readonly MemberTags[]): {
118
+ a: {
119
+ member: string | null;
120
+ template: string;
121
+ };
122
+ b: {
123
+ member: string | null;
124
+ template: string;
125
+ };
126
+ } | null;
127
+ /** A directory's path from the repository root, or null at the root or outside a repository. */
128
+ export declare function pathFromTop(cwd: string, top?: string | null): string | null;
129
+ /** The member's place and checked templates, from its `chant.config.ts` at `cwd` and its ledger. */
130
+ export declare function memberTags(cwd: string, opts?: {
131
+ config?: ReleaseTagConfig | undefined;
132
+ top?: string | null;
133
+ }): Promise<MemberTags>;
134
+ /**
135
+ * Refuse a member's templates that can render a tag another member's can
136
+ * (`release-tag-collision`). The other members are the `chant` members of
137
+ * the workspace the member sits in, each read from its own `chant.config.ts`;
138
+ * one whose config can't be read is left out. A member that sets no
139
+ * `release.tag` is not checked, since the legacy tags hold the member's name
140
+ * and never collide; the member that sets one checks itself against them.
141
+ */
142
+ export declare function checkTagCollisions(cwd: string, own: MemberTags): Promise<void>;
@@ -0,0 +1,323 @@
1
+ /**
2
+ * The tag a release cut makes, from `release.tag` in the member's
3
+ * `chant.config.ts` (#5150).
4
+ *
5
+ * `release.tag` is a template: `v{version}`, `cli-v{version}`,
6
+ * `{member}/v{version}` or `{path}/v{version}` for a Go module in a
7
+ * subdirectory. Its placeholders:
8
+ *
9
+ * - `{version}`: the label, with one leading `v` dropped when a digit
10
+ * follows it, so `v{version}` gives `v1.4.0` for the labels `1.4.0` and
11
+ * `v1.4.0` alike;
12
+ * - `{label}`: the label as given;
13
+ * - `{member}`: the member's ledger name, outermost first and joined by `/`
14
+ * (`npm/core` for the member `core` of a nested workspace `npm`);
15
+ * - `{path}`: the member's directory from the repository root.
16
+ *
17
+ * The object form adds `floating`, a second template with `{major}` (and
18
+ * `{member}`, `{path}`) for a tag that `chant release publish` moves to the
19
+ * release's commit once every target has revealed, such as `v1` for a
20
+ * GitHub Action. The cut never makes it.
21
+ *
22
+ * A member that sets no `release.tag` gets the tag it always got,
23
+ * `release/<label>`, or `release/<member>/<label>` in a workspace member.
24
+ * That default is written here as the template `release/{label}` or
25
+ * `release/{member}/{label}`, so the rest of the code has one shape.
26
+ *
27
+ * The ledger names a release by its record, not by its tag: a tag is found
28
+ * from a label by rendering the template, and a label from a tag by
29
+ * rendering the template for each label the member's ledger holds
30
+ * ({@link labelOfTag}). Nothing parses a tag.
31
+ */
32
+ import { execFileSync } from "node:child_process";
33
+ import { existsSync } from "node:fs";
34
+ import { join, relative, resolve, sep } from "node:path";
35
+ import { prereleaseOf } from "./release-prerelease.js";
36
+ import { NEXT_RELEASE } from "../release-floors.js";
37
+ /** The first chant with `release.tag` in `chant.config.ts`: the cut makes the tag the template renders (`{version}`, `{label}`, `{member}`, `{path}`), refuses one another member's template can render (`release-tag-collision`), `chant release tag` reads a release back from its tag through the ledger, `chant release publish` moves a `floating` tag at reveal, and `chant release workflow` triggers on the template's tags (#5150). */
38
+ export const RELEASE_TAG_FLOOR = NEXT_RELEASE;
39
+ /** A template refused. */
40
+ export class ReleaseTagError extends Error {
41
+ constructor(code, message, fix) {
42
+ super(message);
43
+ this.code = code;
44
+ this.fix = fix;
45
+ this.name = "ReleaseTagError";
46
+ }
47
+ }
48
+ const NAME_PLACEHOLDERS = ["version", "label", "member", "path"];
49
+ const FLOATING_PLACEHOLDERS = ["major", "member", "path"];
50
+ /** What a label may hold (`release-store.ts` LABEL_PATTERN): letters, digits and `. _ + -`, so never `/`. */
51
+ const LABEL_CHAR = /^[A-Za-z0-9._+-]$/;
52
+ /** The default template for a member that sets no `release.tag`. */
53
+ export function legacyTagTemplate(member) {
54
+ return member ? "release/{member}/{label}" : "release/{label}";
55
+ }
56
+ function placeholdersOf(template) {
57
+ return [...template.matchAll(/\{([^{}]*)\}/g)].map((m) => m[1]);
58
+ }
59
+ function checkTemplate(field, template, allowed, variables) {
60
+ const fail = (why, fix) => {
61
+ throw new ReleaseTagError("release-tag-template-invalid", `${field} "${template}" ${why}`, fix);
62
+ };
63
+ const literal = template.replace(/\{[^{}]*\}/g, "");
64
+ if (/[{}]/.test(literal))
65
+ fail("has a brace that opens or closes no placeholder");
66
+ for (const p of placeholdersOf(template))
67
+ if (!allowed.includes(p))
68
+ fail(`names {${p}}, which is not one of ${allowed.map((a) => `{${a}}`).join(", ")}`);
69
+ const vars = placeholdersOf(template).filter((p) => variables.includes(p));
70
+ if (vars.length !== 1) {
71
+ fail(vars.length === 0 ? `has no ${variables.map((v) => `{${v}}`).join(" or ")}, so every release would get the same tag` : `names ${vars.map((v) => `{${v}}`).join(" and ")}; a tag holds one`, `Name it once, as in ${field.endsWith("floating") ? "v{major}" : "v{version}"}.`);
72
+ }
73
+ if (!/^[A-Za-z0-9._+/{}-]+$/.test(template))
74
+ fail("holds a character a tag name can't: use letters, digits and . _ + - /");
75
+ if (template.startsWith("/") || template.endsWith("/") || template.includes("//"))
76
+ fail("starts or ends with /, or holds //");
77
+ if (template.includes("..") || template.endsWith(".") || template.endsWith(".lock") || /(^|\/)\./.test(template))
78
+ fail("makes a tag name git refuses: no .., no component that starts with a dot, and no trailing . or .lock");
79
+ }
80
+ /**
81
+ * The templates `release.tag` declares, checked, or the legacy default when
82
+ * it declares none. Throws {@link ReleaseTagError} `release-tag-template-invalid`.
83
+ */
84
+ export function resolveTagTemplate(config, member) {
85
+ if (config === undefined)
86
+ return { name: legacyTagTemplate(member), floating: null, legacy: true };
87
+ const name = typeof config === "string" ? config : config.name;
88
+ const floating = typeof config === "string" ? null : (config.floating ?? null);
89
+ checkTemplate("release.tag", name, NAME_PLACEHOLDERS, ["version", "label"]);
90
+ if (floating !== null)
91
+ checkTemplate("release.tag.floating", floating, FLOATING_PLACEHOLDERS, ["major"]);
92
+ return { name, floating, legacy: false };
93
+ }
94
+ /** The label as `{version}` gives it: one leading `v` dropped when a digit follows. */
95
+ export function versionOfLabel(label) {
96
+ return /^v\d/.test(label) ? label.slice(1) : label;
97
+ }
98
+ function fill(template, place, values) {
99
+ return template.replace(/\{([^{}]*)\}/g, (_, p) => {
100
+ if (p === "member") {
101
+ if (!place.member)
102
+ throw new ReleaseTagError("release-tag-template-invalid", `release.tag "${template}" names {member}, and this project is not a workspace member`, "Use a literal prefix, or {path}.");
103
+ return place.member;
104
+ }
105
+ if (p === "path") {
106
+ if (!place.path)
107
+ throw new ReleaseTagError("release-tag-template-invalid", `release.tag "${template}" names {path}, and this project is at the repository root`, "Use a literal prefix, or drop {path}.");
108
+ return place.path;
109
+ }
110
+ const v = values[p];
111
+ if (v === undefined)
112
+ throw new ReleaseTagError("release-tag-template-invalid", `release.tag "${template}" names {${p}}, which has no value here`);
113
+ return v;
114
+ });
115
+ }
116
+ /** The tag a release labelled `label` gets. */
117
+ export function renderReleaseTag(t, place, label) {
118
+ return fill(t.name, place, { version: versionOfLabel(label), label });
119
+ }
120
+ /** The stable MAJOR.MINOR.PATCH a label names, or null for a prerelease or anything else. */
121
+ export function stableVersionOf(label) {
122
+ const m = /^(\d+)\.(\d+)\.(\d+)$/.exec(versionOfLabel(label));
123
+ return m ? [Number(m[1]), Number(m[2]), Number(m[3])] : null;
124
+ }
125
+ /**
126
+ * The floating tag of the major line a label belongs to, prerelease or not,
127
+ * or null: no `floating`, or a label that names no MAJOR.MINOR.PATCH.
128
+ */
129
+ export function floatingTagOfLine(t, place, label) {
130
+ if (t.floating === null)
131
+ return null;
132
+ const m = /^(\d+)\.\d+\.\d+(?:[-+].*)?$/.exec(versionOfLabel(label));
133
+ return m ? fill(t.floating, place, { major: String(Number(m[1])) }) : null;
134
+ }
135
+ /**
136
+ * The floating tag a release labelled `label` moves, or null: no `floating`,
137
+ * a prerelease label (#5166, the same check every publish target makes), or
138
+ * a label that is not a stable version.
139
+ */
140
+ export function renderFloatingTag(t, place, label) {
141
+ if (prereleaseOf(label) !== null || stableVersionOf(label) === null)
142
+ return null;
143
+ return floatingTagOfLine(t, place, label);
144
+ }
145
+ /**
146
+ * Which of `labels` has the tag `tag` (or, for `floating`, moves it), read
147
+ * through the template: the ledger names the release, and the tag is only
148
+ * its rendering. Null when none does.
149
+ */
150
+ export function labelOfTag(t, place, tag, labels) {
151
+ for (const label of labels) {
152
+ try {
153
+ if (renderReleaseTag(t, place, label) === tag)
154
+ return label;
155
+ }
156
+ catch {
157
+ return null;
158
+ }
159
+ }
160
+ return null;
161
+ }
162
+ /** The literal around a template's one variable (`{version}`, `{label}` or `{major}`), with `{member}` and `{path}` filled in. */
163
+ export function tagShape(template, place) {
164
+ const m = /\{(version|label|major)\}/.exec(template);
165
+ if (!m)
166
+ throw new ReleaseTagError("release-tag-template-invalid", `release.tag "${template}" has no {version}, {label} or {major}`);
167
+ const fillFixed = (s) => fill(s, place, {});
168
+ return { prefix: fillFixed(template.slice(0, m.index)), suffix: fillFixed(template.slice(m.index + m[0].length)) };
169
+ }
170
+ /**
171
+ * Whether two shapes can render the same tag: whether some tag is
172
+ * `prefix + x + suffix` for both, with each `x` a non-empty run of label
173
+ * characters (which never hold `/`). Worked as the intersection of two
174
+ * small automata, so `release/{label}` and `release/core/{label}` are
175
+ * apart (the label would need a `/`) and `v{version}` and `v{version}-cli`
176
+ * are not (the label `1.0.0-cli`).
177
+ */
178
+ export function shapesOverlap(a, b) {
179
+ const nfa = (s) => {
180
+ const p = s.prefix.length;
181
+ const varState = p + 1;
182
+ const accept = varState + s.suffix.length;
183
+ const step = (state, c) => {
184
+ const out = [];
185
+ if (state < p) {
186
+ if (s.prefix[state] === c)
187
+ out.push(state + 1);
188
+ }
189
+ else if (state === p) {
190
+ if (LABEL_CHAR.test(c))
191
+ out.push(varState);
192
+ }
193
+ else {
194
+ // In the variable (state === varState) or in the suffix (state > varState).
195
+ if (state === varState && LABEL_CHAR.test(c))
196
+ out.push(varState);
197
+ const k = state - varState;
198
+ if (k < s.suffix.length && s.suffix[k] === c)
199
+ out.push(state + 1);
200
+ }
201
+ return out;
202
+ };
203
+ return { step, accept };
204
+ };
205
+ const na = nfa(a);
206
+ const nb = nfa(b);
207
+ const literals = new Set([...a.prefix, ...a.suffix, ...b.prefix, ...b.suffix]);
208
+ const other = [..."abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._+-"].find((c) => !literals.has(c));
209
+ const alphabet = [...literals, ...(other ? [other] : [])];
210
+ const seen = new Set(["0,0"]);
211
+ const queue = [[0, 0]];
212
+ while (queue.length > 0) {
213
+ const [x, y] = queue.shift();
214
+ if (x === na.accept && y === nb.accept)
215
+ return true;
216
+ for (const c of alphabet) {
217
+ for (const x2 of na.step(x, c)) {
218
+ for (const y2 of nb.step(y, c)) {
219
+ const key = `${x2},${y2}`;
220
+ if (!seen.has(key)) {
221
+ seen.add(key);
222
+ queue.push([x2, y2]);
223
+ }
224
+ }
225
+ }
226
+ }
227
+ }
228
+ return false;
229
+ }
230
+ /**
231
+ * The first pair of tag templates, across members, that can render the same
232
+ * tag, or null. Each member's release tag and floating tag are checked
233
+ * against every other member's; a member's own two are not, since only a
234
+ * stable version moves the floating tag.
235
+ */
236
+ export function findTagCollision(members) {
237
+ const shapes = members.flatMap((m) => [m.template.name, ...(m.template.floating ? [m.template.floating] : [])].map((template) => ({ member: m.place.member, template, shape: tagShape(template, m.place) })));
238
+ for (let i = 0; i < shapes.length; i++) {
239
+ for (let j = i + 1; j < shapes.length; j++) {
240
+ const a = shapes[i];
241
+ const b = shapes[j];
242
+ if (a.member === b.member)
243
+ continue;
244
+ if (shapesOverlap(a.shape, b.shape))
245
+ return { a: { member: a.member, template: a.template }, b: { member: b.member, template: b.template } };
246
+ }
247
+ }
248
+ return null;
249
+ }
250
+ function gitTopOf(cwd) {
251
+ try {
252
+ return execFileSync("git", ["rev-parse", "--show-toplevel"], { cwd, encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }).trim();
253
+ }
254
+ catch {
255
+ return null;
256
+ }
257
+ }
258
+ /** A directory's path from the repository root, or null at the root or outside a repository. */
259
+ export function pathFromTop(cwd, top = gitTopOf(cwd)) {
260
+ if (!top)
261
+ return null;
262
+ const rel = relative(resolve(top), resolve(cwd)).split(sep).join("/");
263
+ return rel === "" || rel.startsWith("..") ? null : rel;
264
+ }
265
+ /** The member's place and checked templates, from its `chant.config.ts` at `cwd` and its ledger. */
266
+ export async function memberTags(cwd, opts = {}) {
267
+ const { resolveMemberLedger } = await import("./member-ledger.js");
268
+ const ledger = await resolveMemberLedger(cwd);
269
+ const member = ledger.members.length > 0 ? ledger.members.join("/") : null;
270
+ let config = opts.config;
271
+ if (!("config" in opts)) {
272
+ const { loadChantConfig } = await import("../config.js");
273
+ config = (await loadChantConfig(cwd)).config.release?.tag;
274
+ }
275
+ return { place: { member, path: pathFromTop(cwd, opts.top === undefined ? gitTopOf(cwd) : opts.top) }, template: resolveTagTemplate(config, member) };
276
+ }
277
+ /**
278
+ * Refuse a member's templates that can render a tag another member's can
279
+ * (`release-tag-collision`). The other members are the `chant` members of
280
+ * the workspace the member sits in, each read from its own `chant.config.ts`;
281
+ * one whose config can't be read is left out. A member that sets no
282
+ * `release.tag` is not checked, since the legacy tags hold the member's name
283
+ * and never collide; the member that sets one checks itself against them.
284
+ */
285
+ export async function checkTagCollisions(cwd, own) {
286
+ if (own.template.legacy)
287
+ return;
288
+ const { findWorkspaceRoot } = await import("../project-root.js");
289
+ const found = findWorkspaceRoot(cwd);
290
+ if (!found)
291
+ return;
292
+ const { readDeclaration } = await import("../workspace/declaration.js");
293
+ const { workingTree } = await import("../workspace/tree.js");
294
+ let dirs;
295
+ try {
296
+ dirs = readDeclaration(workingTree(found.dir))
297
+ .members.filter((m) => m.kind === "chant")
298
+ .map((m) => resolve(found.dir, m.dir));
299
+ }
300
+ catch {
301
+ return;
302
+ }
303
+ const self = resolve(cwd);
304
+ const top = gitTopOf(cwd);
305
+ const others = [];
306
+ for (const dir of dirs) {
307
+ if (dir === self || !existsSync(join(dir, "chant.config.ts")))
308
+ continue;
309
+ try {
310
+ const m = await memberTags(dir, { top });
311
+ if (m.place.member !== own.place.member)
312
+ others.push(m);
313
+ }
314
+ catch {
315
+ // A member whose config can't be read, or whose own template is refused, is checked when it cuts.
316
+ }
317
+ }
318
+ const hit = findTagCollision([own, ...others]);
319
+ if (hit) {
320
+ const who = (m) => (m ? `member ${m}` : "the workspace root");
321
+ throw new ReleaseTagError("release-tag-collision", `release.tag "${hit.a.template}" of ${who(hit.a.member)} and "${hit.b.template}" of ${who(hit.b.member)} can make the same tag, so one member's release could take the other's tag`, "Give each member a template the others can't render: put {member} or {path} in it, or a literal prefix of its own, such as cli-v{version}.");
322
+ }
323
+ }
@@ -12,6 +12,13 @@
12
12
  * time (`releaseSealPayload`), and, when the declaration at that commit has an
13
13
  * `identity.gates.release` entry naming a class, the actor is in it.
14
14
  *
15
+ * The gate a cut claims (#5177): a cut signed by chant 0.124.101 or newer
16
+ * signs its green-gate record (`green`, `override`, `lane`) with the digest
17
+ * (`releaseGateSealPayload`, `sealVersion: 2`), so a verified signature
18
+ * vouches for the gate too, and `gate` reads `signed`. An older signature
19
+ * still verifies over its four lines, and its gate reads `unsigned`: the
20
+ * cut line's gate could have been changed after it was signed.
21
+ *
15
22
  * Reading the signers at the release's commit means a key added later does
16
23
  * not make an old release verify, and one removed later does not unmake it.
17
24
  */
@@ -39,7 +46,17 @@ export interface ReleaseVerification {
39
46
  key: string | null;
40
47
  } | null;
41
48
  reason: string;
42
- cuts: Array<Pick<ReleaseCut, "label" | "actor" | "timestamp" | "runId"> & {
49
+ /**
50
+ * Whether the gate the verified cut records is covered by its signature
51
+ * (#5177): `signed`, or `unsigned` for a cut signed before chant signed the
52
+ * gate, and for a release with no verified cut. `reason` says which.
53
+ */
54
+ gate: {
55
+ status: "signed" | "unsigned";
56
+ reason: string;
57
+ };
58
+ /** Each cut, with the green gate it passed or the override it ran under (#5149, #4693) when it recorded one. */
59
+ cuts: Array<Pick<ReleaseCut, "label" | "actor" | "timestamp" | "runId" | "green" | "override"> & {
43
60
  signatureCheck: ReleaseSignatureCheck;
44
61
  }>;
45
62
  }
@@ -58,3 +75,58 @@ export declare function verifyRelease(req: {
58
75
  }): Promise<ReleaseVerification | {
59
76
  error: ReleaseVerifyError;
60
77
  }>;
78
+ /** One Sigstore bundle a publish recorded, and how its check went (#5164). */
79
+ export interface SigstoreCheck {
80
+ /** The bundle: `<file>.sigstore.json`, `release.slsa.sigstore.json`, or an image's `cosign signature` or `SLSA provenance`. */
81
+ name: string;
82
+ /** The publish target's kind and name. */
83
+ kind: string;
84
+ target: string;
85
+ attachment: "signature" | "attestation";
86
+ /** What it signs, each name and digest. */
87
+ signs: Array<{
88
+ name: string;
89
+ digest: string;
90
+ }>;
91
+ /** The identity it was checked against. */
92
+ identity: {
93
+ issuer: string;
94
+ identity: string;
95
+ } | null;
96
+ status: "verified" | "failed" | "unchecked";
97
+ reason: string;
98
+ }
99
+ /** What `release verify --sigstore` adds: each bundle's check, and the outcome. */
100
+ export interface SigstoreVerification {
101
+ /** `verified` when every bundle verifies; `failed` when one does not or can't be checked; `none` when the publish record holds none. */
102
+ status: "verified" | "failed" | "none";
103
+ checks: SigstoreCheck[];
104
+ reason: string;
105
+ }
106
+ /**
107
+ * The Sigstore bundles the publish record holds for `releaseDigest` (#5164):
108
+ * each signature or attestation item of the newest revealed line of each
109
+ * target, with its target's kind and name.
110
+ */
111
+ export declare function recordedSignatures(cwd: string, releaseDigest: string): Promise<Array<{
112
+ kind: string;
113
+ target: string;
114
+ item: import("./release-publish.js").PublishItem;
115
+ }>>;
116
+ /**
117
+ * Check the Sigstore bundles a publish recorded for `releaseDigest`
118
+ * (#5164). An image's are read from its registry by cosign. A forge
119
+ * release's are read from `assetsDir`, where its assets were downloaded
120
+ * (such as `gh release download <tag> -D <dir>`): each bundle must be the
121
+ * bytes the record names, and a file beside it must be the digest it signs.
122
+ * The identity is `release.signing.identity` and `issuer` when the config
123
+ * names them, else the one the publish recorded: a workflow of the
124
+ * repository the publish ran in.
125
+ */
126
+ export declare function verifySigstore(req: {
127
+ cwd: string;
128
+ releaseDigest: string;
129
+ assetsDir?: string;
130
+ verifier?: import("./publish-signing.js").SigstoreVerifier;
131
+ env?: NodeJS.ProcessEnv;
132
+ }): Promise<SigstoreVerification>;