@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
@@ -23,9 +23,10 @@
23
23
  * (`@intentius/chant-lexicon-terraform/registry`, #4916), loaded with
24
24
  * `import()` where a `catch` is near (`try { await import(specifier) }
25
25
  * catch { return undefined }`, or `.catch(`), the shape of a chant-next.ts
26
- * loader. Its floor is the lowest floor the subpath serves: a chant with
27
- * that floor has the subpath. Lexicons release with chant at the same
28
- * version, so a lexicon subpath is checked against the chant pin too.
26
+ * loader. Its floor is the lowest floor the subpath serves: a package at
27
+ * that floor has the subpath. Each package has its own version (#5138), so
28
+ * a lexicon subpath is checked against the pin on that lexicon's package,
29
+ * and a chant subpath against the `@intentius/chant` pin.
29
30
  * - `product-floor`: a product's own constant for the chant it needs,
30
31
  * `const CHANT_CI_FLOOR = "0.124.67"`, whose checks the pin meets.
31
32
  *
@@ -50,12 +51,12 @@ export function pinOf(range) {
50
51
  return undefined;
51
52
  return /(\d+\.\d+\.\d+)/.exec(r)?.[1];
52
53
  }
53
- /** The `@intentius/chant` range a package.json names, if any. */
54
- function chantRange(file) {
54
+ /** The range a package.json names for `name` (`@intentius/chant` by default), if any. */
55
+ function chantRange(file, name = "@intentius/chant") {
55
56
  try {
56
57
  const pkg = JSON.parse(readFileSync(file, "utf8"));
57
58
  for (const k of CHANT_DEPS) {
58
- const v = pkg[k]?.["@intentius/chant"];
59
+ const v = pkg[k]?.[name];
59
60
  if (typeof v === "string")
60
61
  return v;
61
62
  }
@@ -269,6 +270,10 @@ export function insideTry(code, offset) {
269
270
  }
270
271
  return false;
271
272
  }
273
+ /** The lexicon package a subpath belongs to (`@intentius/chant-lexicon-terraform/registry`), if it is one. */
274
+ function lexiconPackageOf(spec) {
275
+ return /^(@intentius\/chant-lexicon-[a-z0-9-]+)(?:\/|$)/.exec(spec)?.[1];
276
+ }
272
277
  /**
273
278
  * The feature-detects on a floor in one source file. `table` gives each
274
279
  * floor's version; a name two files declare takes the higher one.
@@ -277,8 +282,8 @@ export function guardsIn(src, table = FLOOR_TABLE) {
277
282
  const floors = new Map();
278
283
  for (const r of table) {
279
284
  const had = floors.get(r.name);
280
- if (had === undefined || compareChantVersions(r.version, had) > 0)
281
- floors.set(r.name, r.version);
285
+ if (had === undefined || compareChantVersions(r.version, had.version) > 0)
286
+ floors.set(r.name, { version: r.version, package: r.package });
282
287
  }
283
288
  // The lowest floor each subpath serves.
284
289
  const modules = new Map();
@@ -295,7 +300,7 @@ export function guardsIn(src, table = FLOOR_TABLE) {
295
300
  const lines = src.split("\n");
296
301
  const out = [];
297
302
  const seen = new Set();
298
- const push = (offset, kind, floor, version) => {
303
+ const push = (offset, kind, floor, version, pkg) => {
299
304
  const line = lineAt(starts, offset);
300
305
  const key = `${line}|${kind}|${floor}`;
301
306
  if (seen.has(key))
@@ -303,7 +308,7 @@ export function guardsIn(src, table = FLOOR_TABLE) {
303
308
  if (lines[line - 1]?.includes(KEEP) || /^\s*(?:\/\/|\/?\*).*chant-dead-guards: keep/.test(lines[line - 2] ?? ""))
304
309
  return;
305
310
  seen.add(key);
306
- out.push({ line, kind, floor, version });
311
+ out.push({ line, kind, floor, version, ...(pkg ? { package: pkg } : {}) });
307
312
  };
308
313
  // Names bound by a static import or re-export, from anywhere: using one is
309
314
  // using the part. And the spans of those statements, which hold no check.
@@ -327,26 +332,27 @@ export function guardsIn(src, table = FLOOR_TABLE) {
327
332
  for (const m of code.matchAll(/\b[A-Z][A-Z0-9_]*_FLOOR\b/g)) {
328
333
  const at = m.index;
329
334
  const name = m[0];
330
- const version = floors.get(name);
331
- if (version === undefined || inStatement(at))
335
+ const found = floors.get(name);
336
+ if (found === undefined || inStatement(at))
332
337
  continue;
338
+ const { version, package: pkg } = found;
333
339
  if (inString[at]) {
334
340
  // A name in a string is a check when the line asks a module for it:
335
341
  // names a chant subpath or an import(), `"X_FLOOR" in m`, `m["X_FLOOR"]`.
336
342
  const text = codeLines[lineAt(starts, at) - 1] ?? "";
337
343
  if (/@intentius\/chant|\bimport\(|["'`]\s+in\s+[A-Za-z_$]/.test(text) || /[\w$\])]\s*\[\s*$/.test(code.slice(Math.max(0, at - 24), at - 1)))
338
- push(at, "floor", name, version);
344
+ push(at, "floor", name, version, pkg);
339
345
  continue;
340
346
  }
341
347
  const owner = /([A-Za-z_$][\w$]*)\s*\??\.\s*$/.exec(code.slice(Math.max(0, at - 64), at));
342
348
  if (owner || /\.\s*$/.test(code.slice(Math.max(0, at - 2), at))) {
343
349
  if (!owner || !namespaces.has(owner[1]))
344
- push(at, "floor", name, version);
350
+ push(at, "floor", name, version, pkg);
345
351
  continue;
346
352
  }
347
353
  if (imported.has(name) || declared.has(name))
348
354
  continue;
349
- push(at, "floor", name, version);
355
+ push(at, "floor", name, version, pkg);
350
356
  }
351
357
  // module: a chant or lexicon subpath loaded with import() inside a try, or with .catch( on the load.
352
358
  for (const m of src.matchAll(/(["'`])(@intentius\/chant(?:-lexicon-[a-z0-9-]+)?(?:\/[A-Za-z0-9_./-]+)?)\1/g)) {
@@ -375,7 +381,7 @@ export function guardsIn(src, table = FLOOR_TABLE) {
375
381
  const after = code.slice(site, site + 400);
376
382
  const caught = /^[^;\n]*?\)\s*\.catch\(/.test(after) || insideTry(code, site);
377
383
  if (caught)
378
- push(at, "module", spec, version);
384
+ push(at, "module", spec, version, lexiconPackageOf(spec));
379
385
  }
380
386
  // product-floor: the product's own constant for the chant it needs.
381
387
  for (const m of code.matchAll(/\b(?:const|let|var)\s+([A-Z0-9_]*CHANT[A-Z0-9_]*_FLOOR)\s*(?::\s*string\s*)?=\s*/g)) {
@@ -387,13 +393,14 @@ export function guardsIn(src, table = FLOOR_TABLE) {
387
393
  return out.sort((a, b) => a.line - b.line || a.floor.localeCompare(b.floor));
388
394
  }
389
395
  /** The chant pin over `file` (relative to `productDir`): the nearest package.json with one, up to the product's root. */
390
- function pinFor(productDir, file, cache) {
396
+ function pinFor(productDir, file, cache, name = "@intentius/chant") {
391
397
  for (let dir = dirname(join(productDir, file));; dir = dirname(dir)) {
392
398
  const manifest = join(dir, "package.json");
393
- let range = cache.get(manifest);
399
+ const key = `${name}|${manifest}`;
400
+ let range = cache.get(key);
394
401
  if (range === undefined) {
395
- range = existsSync(manifest) ? (chantRange(manifest) ?? null) : null;
396
- cache.set(manifest, range);
402
+ range = existsSync(manifest) ? (chantRange(manifest, name) ?? null) : null;
403
+ cache.set(key, range);
397
404
  }
398
405
  if (range !== null)
399
406
  return { pin: pinOf(range), manifest };
@@ -426,8 +433,12 @@ export function findDeadGuards(options) {
426
433
  const src = readFileSync(join(productDir, file), "utf8");
427
434
  const lines = src.split("\n");
428
435
  for (const g of guardsIn(src, table)) {
429
- const row = { file, ...g, pin, text: (lines[g.line - 1] ?? "").trim() };
430
- (compareChantVersions(pin, g.version) >= 0 ? dead : live).push(row);
436
+ // #5138: a lexicon's floor is a version of that lexicon, so its pin is the product's range on it.
437
+ const own = g.package ? pinFor(productDir, file, cache, g.package).pin : pin;
438
+ if (own === undefined)
439
+ continue;
440
+ const row = { file, ...g, pin: own, text: (lines[g.line - 1] ?? "").trim() };
441
+ (compareChantVersions(own, g.version) >= 0 ? dead : live).push(row);
431
442
  }
432
443
  }
433
444
  return { ok: dead.length === 0, dead, live, pins: [...pins].map(([file, pin]) => ({ file, pin })).sort((a, b) => a.file.localeCompare(b.file)), files: files.length, unpinned };
@@ -435,5 +446,5 @@ export function findDeadGuards(options) {
435
446
  /** One dead guard as a line: `file:line: ...`. */
436
447
  export function deadGuardLine(g) {
437
448
  const what = g.kind === "module" ? `loads ${g.floor} behind a catch` : g.kind === "product-floor" ? `declares ${g.floor}` : `checks ${g.floor}`;
438
- return `${g.file}:${g.line}: ${what}, which chant ${g.version} has; the pin ${g.pin} meets it`;
449
+ return `${g.file}:${g.line}: ${what}, which ${g.package ?? "chant"} ${g.version} has; the pin ${g.pin} meets it`;
439
450
  }
@@ -32,7 +32,7 @@ import { chantModule, chantSourceDir } from "../../ts-loader.js";
32
32
  // #3878: the TypeScript source, also when this module runs compiled from dist/.
33
33
  const HERE = chantSourceDir(import.meta.url);
34
34
  const DISCOVERY_DIR = join(HERE, "..");
35
- /** Absolute paths to chant's OWN trusted modules the generated driver imports — always resolved relative to THIS file's own location on disk, so this works whether chant is running from the monorepo or from a consumer's `node_modules` (both route runtime resolution at `src/*.ts` — see `packages/core/package.json`'s `development`/`default` export conditions). */
35
+ /** Absolute paths to chant's OWN trusted modules the generated driver imports — always resolved relative to THIS file's own location on disk, so this works whether chant is running from the monorepo or from a consumer's `node_modules` (both route runtime resolution at `src/*.ts` — see `packages/core/package.json`'s `@intentius/chant-source`/`default` export conditions). */
36
36
  const COLLECT_MODULE = chantModule(join(DISCOVERY_DIR, "collect.ts"));
37
37
  const RESOLVE_MODULE = chantModule(join(DISCOVERY_DIR, "resolve.ts"));
38
38
  // The pure codec, NOT `entity-wire.ts` — that file also exports
@@ -90,7 +90,7 @@ export function splitBareSpecifier(specifier) {
90
90
  }
91
91
  /**
92
92
  * The conditions an ESM import in Node matches, which is what the run path
93
- * does. From source, `development` too (#3981): the run path there resolves a
93
+ * does. From source, `@intentius/chant-source` too (#3981): the run path there resolves a
94
94
  * chant package to its `src/*.ts`, not to the compiled `dist/*.js` its
95
95
  * `default` names.
96
96
  */
@@ -2,8 +2,10 @@
2
2
  export interface FloorRow {
3
3
  /** The constant's name, `CI_IMAGE_FLOOR`. */
4
4
  name: string;
5
- /** The first chant release with the part. A floor not yet released has the next release's number. */
5
+ /** The first release of `package` with the part. A floor not yet released has the next release's number. */
6
6
  version: string;
7
+ /** The npm package `version` belongs to. Absent for chant core, `@intentius/chant`. */
8
+ package?: string;
7
9
  /** What the floor gates: the first sentence of the constant's doc comment. */
8
10
  gates: string;
9
11
  /** The issue that added it, `#4784`, or a product's (`terragucci issue 1303`). */
@@ -1,3 +1,8 @@
1
+ // Written by scripts/floor-table.ts (#4792) from the floor constants under
2
+ // packages/core/src and in each lexicon's src/chant-floors.ts (#4916); run
3
+ // `npx tsx scripts/floor-table.ts` after adding one.
4
+ // scripts/release-floors.ts fails while this file is stale.
5
+ import { NEXT_RELEASE } from "./release-floors.js";
1
6
  export const FLOOR_ROWS = [
2
7
  { name: "CACHE4_PIN_FLOOR", version: "0.124.78", gates: "The first chant whose table has the `cache4` row (#4816).", issue: "#4816", file: "action-pins.ts", modules: ["@intentius/chant/action-pins"] },
3
8
  { name: "AGENT_GUARD_FLOOR", version: "0.124.77", gates: "The first chant with the shared agent guard (#4770).", issue: "#4770", file: "agent-guard.ts", modules: ["@intentius/chant/agent-guard", "@intentius/chant/ci-product"] },
@@ -66,6 +71,7 @@ export const FLOOR_ROWS = [
66
71
  { name: "FORGEJO_RUN_GROUP_FLOOR", version: "0.124.77", gates: "The Forgejo generators write a workflow-level run group a product asks for (#4771): `runGroup: \"pull-request\"` on the components pipeline (`chant build --components --generate forgejo --run-group pull-request`) and `runGroup: \"commit\"` on an op waves spec (its `options`, or `chant run --generate forgejo --spec <file> --run-group commit`).", issue: "#4771", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
67
72
  { name: "PR_LOOP_CONTROL_FLOOR", version: "0.124.77", gates: "`chant build --pr-loop` takes the control repo (#4772): `--control <repo>` and `--control-setting <key>=<value>` (op, member, readTokenSecret, and the rest of the control settings) are the pull request loop's `control`, so the note job the build writes reads the control repo's records itself, the step `productPipelineJobs(...).post.control` returns.", issue: "#4772", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
68
73
  { name: "PRODUCT_MCP_HOOK_FLOOR", version: "0.124.55", gates: "Telemetry and MCP (#4555).", issue: "#4555", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
74
+ { name: "FORGE_CI_FLOOR", version: "0.124.101", gates: "The first chant with `@intentius/chant/ci-system`, `ci.forge` and `ci.system` in the workspace declaration, an environment executor's `ci`, forge reads from a Prow job's environment (#5170), and `--generate prow` with `--repo` for `chant build --components` and `chant run` (#5189).", issue: "#5189", file: "ci-system.ts", modules: ["@intentius/chant/ci-system"] },
69
75
  { name: "APPROVE_CONFIRM_FLOOR", version: "0.124.55", gates: "The first chant with `confirmApproval` here, the type-the-name confirmation a product's approve word asks through (#4575).", issue: "#4575", file: "cli/handlers/approve-confirm.ts", modules: ["@intentius/chant/cli/handlers/approve-confirm"] },
70
76
  { name: "PRODUCT_MCP_PROPOSE_FLOOR", version: "0.124.58", gates: "The first chant whose `chant serve mcp` has the `--propose` tier and serves `forgeWrite` product tools on it (chant#4655).", issue: "#4655", file: "cli/mcp/product-tools.ts", modules: ["@intentius/chant/ci-product", "@intentius/chant/cli/mcp/product-tools"] },
71
77
  { name: "MCP_TOOL_ANNOTATIONS_FLOOR", version: "0.124.79", gates: "The first chant whose `tools/list` gives MCP tool annotations: a tool's `annotations`, and `readOnlyHint`/`destructiveHint` from `readOnly: true` or `forgeWrite: true` (chant#4823).", issue: "#4823", file: "cli/mcp/product-tools.ts", modules: ["@intentius/chant/ci-product", "@intentius/chant/cli/mcp/product-tools"] },
@@ -93,13 +99,18 @@ export const FLOOR_ROWS = [
93
99
  { name: "INDEX_DOCUMENT_FLOOR", version: "0.124.54", gates: "The first chant that writes an index document to the store.", file: "lifecycle/index-document.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/lifecycle/index", "@intentius/chant/lifecycle/index-document"] },
94
100
  { name: "MEMBER_LEDGER_FLOOR", version: "0.81.0", gates: "The first chant that writes member ledgers.", issue: "#2524", file: "lifecycle/member-ledger.ts", modules: ["@intentius/chant/lifecycle/member-ledger"] },
95
101
  { name: "PLAN_STALE_FLOOR", version: "0.124.63", gates: "The first chant that answers `chant plan stale` (#4648).", issue: "#4648", file: "lifecycle/plan-stale.ts", modules: ["@intentius/chant/lifecycle/plan-stale"] },
102
+ { name: "PUBLISH_CARGO_FLOOR", version: "0.124.101", gates: "The first chant that publishes a `cargo` target (#5167).", issue: "#5167", file: "lifecycle/publish-cargo.ts", modules: ["@intentius/chant/lifecycle/publish-cargo"] },
96
103
  { name: "PUBLISH_FORGE_LATEST_FLOOR", version: "0.124.63", gates: "The first chant that reads `latest` on a forge target and sends it as GitHub's `make_latest` (#4676).", issue: "#4676", file: "lifecycle/publish-forge.ts", modules: ["@intentius/chant/lifecycle/publish-forge"] },
97
104
  { name: "PUBLISH_FORGE_NOTES_FLOOR", version: "0.124.71", gates: "The first chant whose forge target reads `notes` and may have no assets (#4658).", issue: "#4658", file: "lifecycle/publish-forge.ts", modules: ["@intentius/chant/lifecycle/publish-forge"] },
105
+ { name: "PUBLISH_FORGE_GENERATED_NOTES_FLOOR", version: "0.124.101", gates: "The first chant whose forge target generates notes, `notes.generate` (#5153).", issue: "#5153", file: "lifecycle/publish-forge.ts", modules: ["@intentius/chant/lifecycle/publish-forge"] },
98
106
  { name: "PUBLISH_HOMEBREW_FLOOR", version: "0.124.63", gates: "The first chant that publishes a `homebrew` target (#4676).", issue: "#4676", file: "lifecycle/publish-homebrew.ts", modules: ["@intentius/chant/lifecycle/publish-homebrew"] },
99
107
  { name: "PUBLISH_HOMEBREW_SSH_KEY_FLOOR", version: "0.124.64", gates: "The first chant that reads a homebrew target's `sshKeyEnv` (#4699).", issue: "#4699", file: "lifecycle/publish-homebrew.ts", modules: ["@intentius/chant/lifecycle/publish-homebrew"] },
108
+ { name: "PUBLISH_INDEX_FLOOR", version: "0.124.101", gates: "The first chant that publishes an `index` target (#5158).", issue: "#5158", file: "lifecycle/publish-index.ts", modules: ["@intentius/chant/lifecycle/publish-index"] },
100
109
  { name: "PUBLISH_MARKETPLACE_FLOOR", version: "0.124.63", gates: "The first chant that publishes a `marketplace` target (#4676).", issue: "#4676", file: "lifecycle/publish-marketplace.ts", modules: ["@intentius/chant/lifecycle/publish-marketplace"] },
101
110
  { name: "PUBLISH_MARKETPLACE_AUTH_FLOOR", version: "0.124.64", gates: "The first chant that reads a marketplace target's `auth` (#4698).", issue: "#4698", file: "lifecycle/publish-marketplace.ts", modules: ["@intentius/chant/lifecycle/publish-marketplace"] },
102
111
  { name: "PUBLISH_MARKETPLACE_ON_REFUSAL_FLOOR", version: "0.124.64", gates: "The first chant that reads a marketplace target's `onRefusal` (#4698).", issue: "#4698", file: "lifecycle/publish-marketplace.ts", modules: ["@intentius/chant/lifecycle/publish-marketplace"] },
112
+ { name: "PUBLISH_MCP_REGISTRY_FLOOR", version: NEXT_RELEASE, gates: "The first chant with the `mcp-registry` publish target: a `server.json` published to the MCP Registry after the packages it names, with GitHub OIDC, and the `mcp-registry-*` checks of `chant release doctor` (#5162).", issue: "#5162", file: "lifecycle/publish-mcp-registry.ts", modules: ["@intentius/chant/lifecycle/publish-mcp-registry"] },
113
+ { name: "PUBLISH_PYPI_FLOOR", version: "0.124.101", gates: "The first chant that publishes a `pypi` target (#5167).", issue: "#5167", file: "lifecycle/publish-pypi.ts", modules: ["@intentius/chant/lifecycle/publish-pypi"] },
103
114
  { name: "PUBLISH_TAURI_UPDATER_FLOOR", version: "0.124.63", gates: "The first chant that publishes a `tauri-updater` target (#4676).", issue: "#4676", file: "lifecycle/publish-tauri.ts", modules: ["@intentius/chant/lifecycle/publish-tauri"] },
104
115
  { name: "LEDGER_ROOT_MEMBER_FLOOR", version: "0.124.54", gates: "The first chant that writes `root_member` on a `runs` row, in `chant query` and in `chant ledger runs --json` (#4482, #4500).", issue: "#4482", file: "lifecycle/query.ts", modules: ["@intentius/chant/lifecycle/query"] },
105
116
  { name: "QUERY_OWNERSHIP_COLUMNS_FLOOR", version: "0.124.54", gates: "The first chant that writes `marker_stack`, `marker_env`, `engine_ownership` and `engine_owned_by` on a `resources` row, in `chant query` and in `chant ledger resources --json` (#4534).", issue: "#4534", file: "lifecycle/query.ts", modules: ["@intentius/chant/lifecycle/query"] },
@@ -107,17 +118,23 @@ export const FLOOR_ROWS = [
107
118
  { name: "LEDGER_APPLIES_FLOOR", version: "0.124.55", gates: "The first chant with the `applies` and `pr_envs` tables (#4551), added within version 1.", issue: "#4551", file: "lifecycle/query.ts", modules: ["@intentius/chant/lifecycle/query"] },
108
119
  { name: "LEDGER_CONTROL_ENTRIES_FLOOR", version: "0.124.55", gates: "The first chant with the `control_entries` table (#4593), added within version 1.", issue: "#4593", file: "lifecycle/query.ts", modules: ["@intentius/chant/lifecycle/query"] },
109
120
  { name: "LEDGER_RELEASE_STATUS_FLOOR", version: "0.124.55", gates: "The first chant with the `release_status` table (#4596), added within version 1 (chant#4551's ruling C).", issue: "#4551", file: "lifecycle/query.ts", modules: ["@intentius/chant/lifecycle/query"] },
121
+ { name: "RELEASE_ARTIFACTS_FLOOR", version: "0.124.101", gates: "The first chant with `release.artifacts`, `chant release artifacts` and `artifact:<name>` in a forge or homebrew target's `assets` (#5151).", issue: "#5151", file: "lifecycle/release-artifacts.ts", modules: ["@intentius/chant/lifecycle/release-artifacts"] },
110
122
  { name: "RELEASE_CATALOG_FLOOR", version: "0.124.55", gates: "The first chant that writes and reads a release catalog (#4595).", issue: "#4595", file: "lifecycle/release-catalog.ts", modules: ["@intentius/chant/lifecycle/release-catalog"] },
111
123
  { name: "RELEASE_CUT_LANE_FLOOR", version: "0.124.64", gates: "The first chant that cuts from a lane's green tag and writes `lane` on the cut line (#4692).", issue: "#4692", file: "lifecycle/release-cut.ts", modules: ["@intentius/chant/lifecycle/release-cut"] },
112
124
  { name: "RELEASE_CUT_OVERRIDE_FLOOR", version: "0.124.64", gates: "The first chant that cuts a commit that is not green under an override and writes `override` on the cut line (#4693).", issue: "#4693", file: "lifecycle/release-cut.ts", modules: ["@intentius/chant/lifecycle/release-cut"] },
125
+ { name: "RELEASE_DOCTOR_FLOOR", version: NEXT_RELEASE, gates: "The first chant with `chant release doctor`, which checks each `release.publish` target before a cut, and whose `chant release workflow` runs it in a dispatched release's cut job (`release.workflow.doctor`) (#5161).", issue: "#5161", file: "lifecycle/release-doctor.ts", modules: ["@intentius/chant/lifecycle/release-doctor"] },
113
126
  { name: "RELEASE_IMAGES_FLOOR", version: "0.124.71", gates: "The first chant with `release.images`, `CHANT_RELEASE_DIGESTS`, `chant release images` and an npm target's `pins` (#4657).", issue: "#4657", file: "lifecycle/release-images.ts", modules: ["@intentius/chant/lifecycle/release-images"] },
114
127
  { name: "RELEASE_IMAGE_DOCKERFILE_FLOOR", version: "0.124.78", gates: "The first chant whose `release.images` takes a Dockerfile entry, with `releaseImagePins` and `writeReleaseImagePins` for a product's package build (#4819).", issue: "#4819", file: "lifecycle/release-images.ts", modules: ["@intentius/chant/lifecycle/release-images"] },
115
128
  { name: "RELEASE_IMAGE_ARGS_FLOOR", version: "0.124.88", gates: "The first chant whose Dockerfile entry in `release.images` takes `args`, build arguments beside the two chant passes (#4908).", issue: "#4908", file: "lifecycle/release-images.ts", modules: ["@intentius/chant/lifecycle/release-images"] },
116
129
  { name: "RUN_ORIGIN_CHANT_FLOOR", version: "0.124.30", gates: "The first chant that writes `runOrigin.forge: \"chant\"`, for a job `chant ci run` ran (#4094).", issue: "#4094", file: "lifecycle/release-ledger.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/lifecycle/index", "@intentius/chant/lifecycle/release-ledger"] },
117
130
  { name: "RUN_ORIGIN_JOB_FLOOR", version: "0.124.32", gates: "The first chant that writes `runOrigin.jobId` and `runOrigin.attempt`, for a forge job that ran `chant ci run` (#4156).", issue: "#4156", file: "lifecycle/release-ledger.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/lifecycle/index", "@intentius/chant/lifecycle/release-ledger"] },
118
131
  { name: "RELEASE_RECORD_VERSION_FLOOR", version: "0.124.55", gates: "The first chant that writes and reads `releaseVersion` on a release record (#4595).", issue: "#4595", file: "lifecycle/release-ledger.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/lifecycle/index", "@intentius/chant/lifecycle/release-ledger"] },
132
+ { name: "RELEASE_NEXT_FLOOR", version: NEXT_RELEASE, gates: "The first chant with `chant release next` and `chant release cut auto`, the label from the conventional commits and the `.chant/release/*.md` intent files since the member's previous release; a cut records the intent files it consumed (`intents` on its cut line), `release changed` computes each member's bump from them (`bumpFrom`, `intents`, `intent-pending`), notes generated from commits lead with their summaries, and a dispatched release workflow takes the label `auto` (#5159); with no release in the ledger the previous one is the newest version tag `release.tag` or `release.legacyTags` matches (#5200), and on 0.x a breaking commit bumps minor unless `release.breakingOnZero` is `major` (#5191).", issue: "#5191", file: "lifecycle/release-next.ts", modules: ["@intentius/chant/lifecycle/release-next"] },
119
133
  { name: "RELEASE_STATUS_FLOOR", version: "0.124.55", gates: "The first chant that writes and reads `<env>/release-status.jsonl`, and lists the `release_status` table (#4596).", issue: "#4596", file: "lifecycle/release-status.ts", modules: ["@intentius/chant/lifecycle/release-status"] },
120
134
  { name: "RELEASE_IMAGE_REF_FLOOR", version: "0.124.65", gates: "The first chant that writes and reads an artifact's `ref` (#4694).", issue: "#4694", file: "lifecycle/release-store.ts", modules: ["@intentius/chant/lifecycle/release-store"] },
135
+ { name: "RELEASE_PUBLISHES_FLOOR", version: "0.124.101", gates: "The first chant that writes and reads a release's `publishes` (#5149).", issue: "#5149", file: "lifecycle/release-store.ts", modules: ["@intentius/chant/lifecycle/release-store"] },
136
+ { name: "RELEASE_GATE_SEAL_FLOOR", version: "0.124.101", gates: "The first chant that signs a cut's green-gate record and writes and reads `sealVersion` (#5177).", issue: "#5177", file: "lifecycle/release-store.ts", modules: ["@intentius/chant/lifecycle/release-store"] },
137
+ { name: "RELEASE_TAG_FLOOR", version: NEXT_RELEASE, gates: "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).", issue: "#5150", file: "lifecycle/release-tag.ts", modules: ["@intentius/chant/lifecycle/release-tag"] },
121
138
  { name: "RELEASE_VERSION_FLOOR", version: "0.124.79", gates: "The first chant with `release.version` and `chant release stamp` (#4840).", issue: "#4840", file: "lifecycle/release-version.ts", modules: ["@intentius/chant/lifecycle/release-version"] },
122
139
  { name: "SNAPSHOT_STORE_FLOOR", version: "0.124.54", gates: "The first chant that writes snapshots through the store, to `refs/chant/snapshots` by default.", file: "lifecycle/snapshot-store.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/lifecycle/index", "@intentius/chant/lifecycle/snapshot-store"] },
123
140
  { name: "NOTIFY_MESSAGE_WORDS_FLOOR", version: "0.124.78", gates: "The first chant whose Slack and Teams messages take a product's words, a drift event's `rerunUrl` and the relay's name (#4818): `notify.message` in the words, `message` in sendNotify's options, and the third argument of `slackMessage` and `teamsMessage`.", issue: "#4818", file: "notify-product.ts", modules: ["@intentius/chant/ci-product", "@intentius/chant/notify-product"] },
@@ -244,6 +261,7 @@ export const FLOOR_ROWS = [
244
261
  { name: "GITLAB_WAVE_EVIDENCE_RETRY_FLOOR", version: "0.124.89", gates: "The first chant whose `chant run resume` (`resumeGateRun`) on GitLab retries a wave job's `<wave job>-evidence` with the wave job when the evidence job already ran, and whose `ci evidence sign --from-job` waits for a job it reads to finish, so a resumed wave's evidence job signs from the new try (#4978).", issue: "#4978", file: "release-floors.ts", modules: ["@intentius/chant/ci-evidence-jobs", "@intentius/chant/release-floors"] },
245
262
  { name: "TERRAFORM_COMMAND_TRACE_FLOOR", version: "0.124.91", gates: "The first chant whose terraform lexicon's engine runs carry what a product's own command tracing read: `runBinary` and the engine runner's `exec` and `execSync` answer stderr apart (`Ran.stderr`) and a spawn failure's message (`Ran.error`), a hook's `after` gets a binary that could not be started as a null code with `error`, `commandTrace` ends that span with the message, and `composeCommandHooks` runs a product's own hook and `commandTrace` as one `onCommand` (#5007).", issue: "#5007", file: "release-floors.ts", modules: ["@intentius/chant/release-floors"] },
246
263
  { name: "COMMENT_ALLOW_FLOOR", version: "0.124.98", gates: "The first chant whose product pipeline limits comment commands to logins and teams on GitHub and Forgejo (INTENTIUS/terragucci#1461): `commentAllow: { allow, tokenSecret? }` in `productPipelineJobs`, where `allow` maps `plan`, `apply`, `lock`, `unlock`, `agent` and `default` to logins and `team:<org>/<team>` entries.", issue: "#1461", file: "release-floors.ts", modules: ["@intentius/chant/ci-product", "@intentius/chant/release-floors"] },
264
+ { name: "RELEASE_CHANGED_FLOOR", version: "0.124.100", gates: "The first chant with `chant release changed`, the members to release at a commit with their dependency closure, and `release.legacyTags` in `chant.config.ts` (#5134).", issue: "#5134", file: "release-floors.ts", modules: ["@intentius/chant/release-floors"] },
247
265
  { name: "RUN_EVENT_FLOOR", version: "0.124.28", gates: "The first chant that writes contract version 1 of the run-event stream.", file: "run-event.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/run-event"] },
248
266
  { name: "RUN_EVENT_FAILURE_FLOOR", version: "0.124.30", gates: "The first chant that writes `failure` on `run-settle` (#4094).", issue: "#4094", file: "run-event.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/run-event"] },
249
267
  { name: "RUN_EVENT_COMPONENT_SKIP_FLOOR", version: "0.124.29", gates: "The first chant that writes `blocked`, `already-applied` and `blockedBy` on `component-settle` (#4007).", issue: "#4007", file: "run-event.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/run-event"] },
@@ -268,7 +286,9 @@ export const FLOOR_ROWS = [
268
286
  { name: "RELEASE_CANDIDATES_CLOSES_FLOOR", version: "0.124.63", gates: "The first chant whose candidates carry `changes[].closes` and `groups[].issue` (#4649).", issue: "#4649", file: "workspace/release-candidates.ts", modules: ["@intentius/chant/workspace/release-candidates"] },
269
287
  { name: "RELEASE_CANDIDATES_LANE_FLOOR", version: "0.124.64", gates: "The first chant whose candidates document carries `lane` and reads a lane's tags (#4692).", issue: "#4692", file: "workspace/release-candidates.ts", modules: ["@intentius/chant/workspace/release-candidates"] },
270
288
  { name: "TRAIN_PROMOTE_FLOOR", version: "0.124.98", gates: "The first chant that writes ReleaseTrainRecord.trainDigest and has `chant workspace train promote` (#4037).", issue: "#4037", file: "workspace/release-train.ts", modules: ["@intentius/chant/workspace/release-train"] },
271
- { name: "MODULE_CONSUMERS_FLOOR", version: "0.124.55", gates: "The first chant whose terraform lexicon has `moduleConsumers`, the scan of every registry module call a root makes, with `readRegistryCatalog` and `deprecatedPins` beside it on `./registry` (#4599).", issue: "#4599", file: "lexicons/terraform/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-terraform/chant-floors", "@intentius/chant-lexicon-terraform/registry", "@intentius/chant-lexicon-terraform/registry/index"] },
272
- { name: "USED_SOURCES_FLOOR", version: "0.124.55", gates: "The first chant whose terraform lexicon has `usedSources`, every module source and provider address a root uses, with `moduleSourceForms`, `providerAddressForms` and `lockedProviders` on `./registry` (#3924).", issue: "#3924", file: "lexicons/terraform/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-terraform/chant-floors", "@intentius/chant-lexicon-terraform/registry", "@intentius/chant-lexicon-terraform/registry/index"] },
273
- { name: "MODULE_CATALOG_FLOOR", version: "0.124.55", gates: "The first chant whose terraform lexicon has `./module-catalog`, the known-module catalog TF047 reads (#4560).", issue: "#4560", file: "lexicons/terraform/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-terraform/chant-floors", "@intentius/chant-lexicon-terraform/module-catalog", "@intentius/chant-lexicon-terraform/module-catalog/index"] },
289
+ { name: "TRAIN_PUBLISH_TARGETS_FLOOR", version: NEXT_RELEASE, gates: "The first chant whose `chant workspace train publish` orders and resumes members of every target kind (#5165): the oci, forge, homebrew, index, marketplace, pypi, cargo, mcp-registry and tauri-updater targets name what they publish and need, say whether a pinned release is published, and wait until a reveal is served before the next layer; a member's `release.dependsOn` names members a manifest doesn't show.", issue: "#5165", file: "workspace/train-publish.ts", modules: ["@intentius/chant/workspace/train-publish"] },
290
+ { name: "PROW_LEXICON_FLOOR", version: NEXT_RELEASE, package: "@intentius/chant-lexicon-prow", gates: "The first prow lexicon release: `Presubmit`, `Postsubmit`, `Periodic` and `JobConfig`, `emitJobConfig` for plain job data, `forgeJobConfig` for one repository's jobs keyed by its owner/name (#5170), the generators behind `chant build --components --generate prow` and `chant run --generate prow` (#5189), `chant import` of a job config, and the PROW rules (#5169).", issue: "#5169", file: "lexicons/prow/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-prow", "@intentius/chant-lexicon-prow/chant-floors", "@intentius/chant-lexicon-prow/index"] },
291
+ { name: "MODULE_CONSUMERS_FLOOR", version: "0.124.55", package: "@intentius/chant-lexicon-terraform", gates: "The first terraform lexicon release that has `moduleConsumers`, the scan of every registry module call a root makes, with `readRegistryCatalog` and `deprecatedPins` beside it on `./registry` (#4599).", issue: "#4599", file: "lexicons/terraform/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-terraform/chant-floors", "@intentius/chant-lexicon-terraform/registry", "@intentius/chant-lexicon-terraform/registry/index"] },
292
+ { name: "USED_SOURCES_FLOOR", version: "0.124.55", package: "@intentius/chant-lexicon-terraform", gates: "The first terraform lexicon release that has `usedSources`, every module source and provider address a root uses, with `moduleSourceForms`, `providerAddressForms` and `lockedProviders` on `./registry` (#3924).", issue: "#3924", file: "lexicons/terraform/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-terraform/chant-floors", "@intentius/chant-lexicon-terraform/registry", "@intentius/chant-lexicon-terraform/registry/index"] },
293
+ { name: "MODULE_CATALOG_FLOOR", version: "0.124.55", package: "@intentius/chant-lexicon-terraform", gates: "The first terraform lexicon release that has `./module-catalog`, the known-module catalog TF047 reads (#4560).", issue: "#4560", file: "lexicons/terraform/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-terraform/chant-floors", "@intentius/chant-lexicon-terraform/module-catalog", "@intentius/chant-lexicon-terraform/module-catalog/index"] },
274
294
  ];
@@ -4,9 +4,10 @@
4
4
  * with.
5
5
  *
6
6
  * A floor is a constant `<NAME>_FLOOR` in chant core, or in a lexicon's
7
- * src/chant-floors.ts (#4916), naming the first chant release with a part
8
- * (an export, a field chant writes, a flag). Lexicons release with chant at
9
- * the same version, so a lexicon's floor is a chant version too. A product
7
+ * src/chant-floors.ts (#4916), naming the first release with a part (an
8
+ * export, a field chant writes, a flag). Packages have their own versions
9
+ * (#5138): a core floor is a version of `@intentius/chant`, and a lexicon's
10
+ * floor is a version of that lexicon, named by the row's `package`. A product
10
11
  * that runs on several chant releases checks one before it calls the part. The
11
12
  * rows are written by scripts/floor-table.ts from the constants themselves
12
13
  * (./floor-table.data.ts), and scripts/release-floors.ts fails while a floor
@@ -44,3 +44,16 @@ export declare function forgeOfCheckout(cwd: string, opts?: {
44
44
  kind?: ForgeKind;
45
45
  remoteUrl?: (cwd: string, remote: string) => string | undefined;
46
46
  }): RemoteForge | undefined;
47
+ /**
48
+ * The GitHub repository a Prow job config is keyed by (#5189): `given` (a
49
+ * command's `--repo`), else the `owner/name` the checkout's origin remote
50
+ * names. Prow runs jobs for GitHub repositories, so the remote is read as
51
+ * GitHub's whatever its host is called.
52
+ */
53
+ export declare function prowRepoOf(cwd: string, given?: string, opts?: {
54
+ remoteUrl?: (cwd: string, remote: string) => string | undefined;
55
+ }): {
56
+ repo: string;
57
+ } | {
58
+ error: string;
59
+ };
@@ -67,3 +67,18 @@ export function forgeOfCheckout(cwd, opts = {}) {
67
67
  const url = (opts.remoteUrl ?? gitRemoteUrl)(cwd, opts.remote ?? "origin");
68
68
  return forgeOfRemote(url, opts.kind ? { kind: opts.kind } : {});
69
69
  }
70
+ /**
71
+ * The GitHub repository a Prow job config is keyed by (#5189): `given` (a
72
+ * command's `--repo`), else the `owner/name` the checkout's origin remote
73
+ * names. Prow runs jobs for GitHub repositories, so the remote is read as
74
+ * GitHub's whatever its host is called.
75
+ */
76
+ export function prowRepoOf(cwd, given, opts = {}) {
77
+ const ownerName = /^[^/\s]+\/[^/\s]+$/;
78
+ if (given !== undefined)
79
+ return ownerName.test(given) ? { repo: given } : { error: `--repo needs the GitHub repository as owner/name, and ${JSON.stringify(given)} is not one` };
80
+ const remote = forgeOfCheckout(cwd, { kind: "github", ...(opts.remoteUrl ? { remoteUrl: opts.remoteUrl } : {}) });
81
+ if (remote && ownerName.test(remote.repo))
82
+ return { repo: remote.repo };
83
+ return { error: "--generate prow keys the jobs by the GitHub repository's owner/name, and this checkout's origin remote names none; pass --repo <owner/name>" };
84
+ }
package/dist/lexicon.d.ts CHANGED
@@ -552,6 +552,44 @@ export interface ComponentPipelineOptions {
552
552
  * gate op, note and statuses on the pull request.
553
553
  */
554
554
  member?: PipelineMember;
555
+ /**
556
+ * The repository's `owner/name` on its forge (#5189). The prow generator
557
+ * keys the presubmits and postsubmits by it, as Prow's job config does,
558
+ * and `chant build --components --generate prow` reads it from `--repo`
559
+ * or the checkout's origin remote. The forge generators read the
560
+ * repository from the job and ignore it.
561
+ */
562
+ forgeRepo?: string;
563
+ /** Where the Prow jobs run and the Secrets they read (#5189). The prow generator alone reads it. */
564
+ prow?: ProwPipelineSettings;
565
+ }
566
+ /**
567
+ * The Prow side of a generated job config (#5189). Presubmits run a pull
568
+ * request's code, so they run on `untrustedCluster` with no Secret and no
569
+ * service account. Postsubmits and periodics run merged code on
570
+ * `trustedCluster`, read the GitHub token from `tokenSecret`, and take their
571
+ * cloud identity from a service account the cluster binds to one.
572
+ */
573
+ export interface ProwPipelineSettings {
574
+ /** The build cluster presubmits run on. Default `untrusted`. It must not be `trustedCluster`. */
575
+ untrustedCluster?: string;
576
+ /** The build cluster postsubmits and periodics run on. Default `trusted`. */
577
+ trustedCluster?: string;
578
+ /** The Secret and key the GitHub token is read from. Default `chant-github-token`, key `token`. */
579
+ tokenSecret?: {
580
+ name: string;
581
+ key: string;
582
+ };
583
+ /** The Secret and key `CHANT_RUNNER_KEY` is read from when it exists. Default `chant-runner-key`, key `key`. */
584
+ runnerKeySecret?: {
585
+ name: string;
586
+ key: string;
587
+ };
588
+ /** The service accounts of the jobs that plan after merge (`plan`) and that apply or deploy (`apply`). Absent: the namespace's default, with no token mounted. */
589
+ serviceAccounts?: {
590
+ plan?: string;
591
+ apply?: string;
592
+ };
555
593
  }
556
594
  /** Where a workspace member sits, for a generated pipeline (#2542). */
557
595
  export interface PipelineMember {
@@ -1684,7 +1722,7 @@ export interface LexiconPlugin {
1684
1722
  /**
1685
1723
  * Generate a CI pipeline from the discovered component graph — the
1686
1724
  * `chant build --components --generate <name>` seam. Only CI-provider
1687
- * lexicons (gitlab, github, forgejo) implement this; core owns the generic
1725
+ * lexicons (gitlab, github, forgejo, and prow since #5189) implement this; core owns the generic
1688
1726
  * driver (discovery + graph waves) and dispatches here. Omit for lexicons
1689
1727
  * that are not CI providers.
1690
1728
  */
@@ -1696,7 +1734,8 @@ export interface LexiconPlugin {
1696
1734
  * workflow-scoped in every CI provider chant targets), invoking `chant run
1697
1735
  * <name>` on the local executor — the same one-shot invocation `chant run
1698
1736
  * <op>` runs by hand. Only CI-provider lexicons (gitlab, github, forgejo)
1699
- * implement this; omit for lexicons that are not CI providers.
1737
+ * implement this; omit for lexicons that are not CI providers. The prow
1738
+ * lexicon writes every Op's job to one job config (#5189).
1700
1739
  */
1701
1740
  generateOpPipeline?(ops: ScheduledOpSpec[], options?: ComponentPipelineOptions): OpPipelineResult;
1702
1741
  /**
@@ -53,6 +53,7 @@ export interface FakeNpmRegistry {
53
53
  packages: Record<string, {
54
54
  versions: string[];
55
55
  distTags: Record<string, string>;
56
+ deprecated?: Record<string, string>;
56
57
  }>;
57
58
  }
58
59
  /** The registry file a fake npm writing calls to `log` keeps its state in. */
@@ -71,8 +72,15 @@ export declare function seedFakeNpmRegistry(log: string, registry: FakeNpmRegist
71
72
  * registry does, a package's first version is also `latest`. It exits 1
72
73
  * when the package path contains `$FAKE_NPM_FAIL`.
73
74
  * - `view <name>@<version> version` prints the version when it is there.
75
+ * - `view <name> versions --json` (#5154) prints every version it holds, as
76
+ * npm does: a string for one, an array for several; E404 for none.
77
+ * - `view <name> dist-tags.<tag>` (#5136) prints the version the tag names.
78
+ * `$FAKE_NPM_TAG_LAG`, `<name>=<n>[,...]`: the first `n` such views of that
79
+ * name print nothing, as a registry whose tag has not propagated yet.
74
80
  * - `dist-tag add <name>@<version> <tag>` points the tag at a version that is
75
81
  * there. It exits 1 when the name contains `$FAKE_NPM_FAIL_TAG`.
82
+ * - `deprecate <name>@<version> <message>` (#5163) keeps the message on the
83
+ * version, and an empty message clears it.
76
84
  * - `install` (#4049) checks that every dependency in `./package.json` is in
77
85
  * its registry at that version, and installs nothing.
78
86
  * - `audit signatures` (#4049) prints what npm prints for verified
@@ -135,6 +143,8 @@ export interface FakeForge {
135
143
  failOnce(prefix: string): void;
136
144
  /** GitHub and Forgejo: the repository's tags, each the commit it names. Publishing a release makes its tag at its target when there is none. */
137
145
  tags: Map<string, string>;
146
+ /** The notes the forge generates (#5153): GitHub's `generate-notes` body, GitLab's changelog. Default: one naming the request. */
147
+ generatedNotes?: (req: Record<string, string>) => string;
138
148
  }
139
149
  /** A forge fake at `api` for `repo`, which holds `releases` to begin with. */
140
150
  export declare function startFakeForge(forge: "github" | "forgejo" | "gitlab", api: string, repo: string, releases?: FakeForgeRelease[]): FakeForge;
@@ -159,3 +169,55 @@ export interface FakeGitHubRepo {
159
169
  }
160
170
  /** A repository fake at `api` for `repo` whose `branch` holds `files`. */
161
171
  export declare function startFakeGitHubRepo(api: string, repo: string, branch: string, files: Record<string, string>): FakeGitHubRepo;
172
+ /** One entry of a fake GitHub tree: a file's text, or a submodule's commit. */
173
+ export type FakeEntry = {
174
+ text: string;
175
+ } | {
176
+ gitlink: string;
177
+ };
178
+ /** GitHub with several repositories over one object store, as a fork network has (#5158). */
179
+ export interface FakeGitHub {
180
+ fetch: FakeForge["fetch"];
181
+ calls: FakeForge["calls"];
182
+ /** Make `repo` with `branch` holding `files` (a string is a file's text, `{ gitlink }` a submodule). */
183
+ repo(repo: string, branch: string, files: Record<string, string | {
184
+ gitlink: string;
185
+ }>): void;
186
+ /** The head of `branch` of `repo`, or undefined. */
187
+ head(repo: string, branch: string): string | undefined;
188
+ /** The file at `path` on `ref` (a branch of `repo`, or a commit), or undefined. */
189
+ read(repo: string, ref: string, path: string): string | undefined;
190
+ /** The submodule's commit at `path` on `ref`, or undefined. */
191
+ gitlink(repo: string, ref: string, path: string): string | undefined;
192
+ /** The commit's message and parent. */
193
+ commit(sha: string): {
194
+ message: string;
195
+ parent: string | null;
196
+ } | undefined;
197
+ /** Commit `files` onto `branch` of `repo` as someone else would. */
198
+ push(repo: string, branch: string, files: Record<string, string>): void;
199
+ /** Every repository's name. */
200
+ repos(): string[];
201
+ pulls: Array<{
202
+ number: number;
203
+ repo: string;
204
+ head: string;
205
+ base: string;
206
+ title: string;
207
+ body: string;
208
+ state: "open" | "closed";
209
+ merged: boolean;
210
+ }>;
211
+ }
212
+ /**
213
+ * A GitHub fake for the index target (#5158): `GET /user` names `user`; the
214
+ * repository, refs, contents (files and submodules), git data (blobs, trees,
215
+ * commits), fork and pull request APIs. A fork made by `POST .../forks`
216
+ * answers 404 to its first `forkDelay` reads, as GitHub makes forks in the
217
+ * background.
218
+ */
219
+ export declare function startFakeGitHub(api: string, opts: {
220
+ user: string;
221
+ forkDelay?: number;
222
+ scopes?: string | null;
223
+ }): FakeGitHub;