@mark1russell7/conventions 0.40.4 → 0.40.5

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-CFCxbx_x.js","names":["isObject","SEMVER","WORKFLOW","indentOf","valueOf","indentOf","WORKFLOW","indentOf","WORKFLOW","indentOf","valueOf","WORKFLOW","indentOf","WORKFLOW","ACTION","WORKFLOW","WORKFLOW","DECLARATION","MAX_BYTES","indentOf","WORKFLOW","RELEASE_FILE","valueOf","indentOf","WORKFLOW","indentOf","WORKFLOW","indentOf","WORKFLOW","indentOf","WORKFLOW","placeOf"],"sources":["../src/config.ts","../src/rule.ts","../../site-pages/src/data/versions.ts","../../site-pages/src/data/changelog.ts","../../site-pages/src/data/status.ts","../../site-pages/src/render/releases.ts","../../site-pages/src/render/status.ts","../../site-pages/src/check/freshness.ts","../src/rules/changelog-version.ts","../src/rules/cue-preset.ts","../src/workflow.ts","../src/rules/gate-after-cancel.ts","../src/rules/main-runs-finish.ts","../src/rules/gate-trigger.ts","../src/rules/security-one-job.ts","../src/rules/setup-cue.ts","../src/rules/shared-ci.ts","../src/rules/tsconfig-test.ts","../src/rules/service-run-main.ts","../src/change.ts","../src/home-exports.ts","../src/map.ts","../src/rules/home-package.ts","../src/rules/license-file.ts","../src/rules/main-check.ts","../src/rules/no-build-output.ts","../src/private-names.ts","../src/rules/no-local-paths.ts","../src/tsconfig.ts","../src/rules/pack-no-buildinfo.ts","../src/rules/api-report-script.ts","../src/rules/pages-site.ts","../src/rules/push-main-only.ts","../src/rules/runner-budget.ts","../src/rules/pages-after-release.ts","../src/rules/pinned-git-deps.ts","../src/rules/pipe-fails.ts","../src/rules/unreleased-change.ts","../src/rules/published-minor.ts","../src/rules/release-files.ts","../src/rules/required-scripts.ts","../src/rules/roadmap-parses.ts","../src/rules/shared-docs.ts","../src/rules/source-main.ts","../src/rules/tests-required.ts","../src/rules/typed-files.ts","../src/rules/typed-scripts.ts","../src/rules/trust-policy.ts","../src/rules/version-title.ts","../src/rules/workflow-parses.ts","../src/rules/workspace-protocol.ts","../src/rules/index.ts","../src/pre-push.ts","../src/run.ts"],"sourcesContent":["/**\n * The configuration of the check: the field `conventions` of the root `package.json`. Each exception\n * needs a reason: a rule that is off, files that a rule ignores, and a changed option. Thus each\n * exception is visible.\n */\nimport type { OptionValue, Options, Rule } from \"./rule.ts\";\n\n/** The configuration of one rule, after the check of its fields. */\nexport interface RuleConfig {\n /** The reason why the rule is off. The rule is on when this field is missing. */\n readonly off?: string;\n /** The globs of files that the rule does not report. */\n readonly ignore: readonly string[];\n /**\n * The globs of build output that the rule does not report, for example `dist/**`. A build makes these files\n * from source that the rules examine, so a file that the change adds is also not reported.\n */\n readonly generated?: readonly string[];\n /** The reason of `ignore`, of `generated` or of the changed options. */\n readonly reason?: string;\n /** The options of the rule, with the defaults. */\n readonly options: Options;\n}\n\n/** The configuration of the check. */\nexport interface ConventionsConfig {\n /** The globs of the package folders. The default is the globs of the workspace. */\n readonly packages?: readonly string[];\n /** The configuration of each rule, by its id. */\n readonly rules: Readonly<Record<string, RuleConfig>>;\n}\n\n/** The fields of the configuration of a rule that are not options. */\nconst RULE_FIELDS = [\"off\", \"ignore\", \"generated\", \"reason\"];\n\nconst isObject = (value: unknown): value is Record<string, unknown> => typeof value === \"object\" && value !== null && !Array.isArray(value);\n\nconst isStrings = (value: unknown): value is string[] => Array.isArray(value) && value.every((item) => typeof item === \"string\");\n\n/** This function gives the options of a rule with their defaults. */\nexport function defaultOptions(rule: Rule): Options {\n return Object.fromEntries(Object.entries(rule.options).map(([name, spec]) => [name, spec.default]));\n}\n\n/**\n * This function reads the field `conventions` of the root `package.json` (`value`), and gives the\n * configuration of each rule of `rules`.\n *\n * @throws Error when the field has a wrong shape, an unknown rule or option, or an exception or a changed option without a reason\n */\nexport function parseConfig(value: unknown, rules: readonly Rule[]): ConventionsConfig {\n const byId = new Map(rules.map((rule) => [rule.id, rule]));\n const result: Record<string, RuleConfig> = {};\n for (const rule of rules) result[rule.id] = { ignore: [], options: defaultOptions(rule) };\n if (value === undefined) return { rules: result };\n if (!isObject(value)) throw new Error(\"The field conventions of package.json must be an object.\");\n const unknown = Object.keys(value).filter((key) => key !== \"packages\" && key !== \"rules\" && key !== \"$comment\");\n if (unknown.length > 0) throw new Error(`conventions has unknown fields: ${unknown.join(\", \")}.`);\n const packages = value[\"packages\"];\n if (packages !== undefined && !isStrings(packages)) throw new Error(\"conventions.packages must be an array of globs.\");\n const rulesValue = value[\"rules\"] ?? {};\n if (!isObject(rulesValue)) throw new Error(\"conventions.rules must be an object, with a rule id for each key.\");\n for (const [id, entry] of Object.entries(rulesValue)) {\n const rule = byId.get(id);\n if (rule === undefined) throw new Error(`conventions.rules has an unknown rule: ${id}. The rules are: ${[...byId.keys()].join(\", \")}.`);\n const where = `conventions.rules[\"${id}\"]`;\n if (!isObject(entry)) throw new Error(`${where} must be an object, for example { \"off\": \"<reason>\" }.`);\n const off = entry[\"off\"];\n if (off !== undefined && (typeof off !== \"string\" || off.trim() === \"\")) throw new Error(`${where}.off must be the reason why the rule is off, as text.`);\n const ignore = entry[\"ignore\"] ?? [];\n if (!isStrings(ignore)) throw new Error(`${where}.ignore must be an array of globs.`);\n const reason = entry[\"reason\"];\n if (reason !== undefined && (typeof reason !== \"string\" || reason.trim() === \"\")) throw new Error(`${where}.reason must be text.`);\n if (ignore.length > 0 && reason === undefined) throw new Error(`${where}.ignore needs a reason: add \"reason\": \"<why these files are an exception>\".`);\n const generated = entry[\"generated\"] ?? [];\n if (!isStrings(generated)) throw new Error(`${where}.generated must be an array of globs.`);\n if (generated.length > 0 && reason === undefined) throw new Error(`${where}.generated needs a reason: add \"reason\": \"<which build makes these files>\".`);\n const options: Record<string, OptionValue> = { ...defaultOptions(rule) };\n const changed: string[] = [];\n for (const [name, option] of Object.entries(entry)) {\n if (RULE_FIELDS.includes(name)) continue;\n const spec = rule.options[name];\n if (spec === undefined) {\n const known = [...RULE_FIELDS, ...Object.keys(rule.options)].join(\", \");\n throw new Error(`${where} has an unknown field: ${name}. The fields are: ${known}.`);\n }\n const good = spec.type === \"strings\" ? isStrings(option) : typeof option === spec.type;\n if (!good) throw new Error(`${where}.${name} must be ${spec.type === \"strings\" ? \"an array of strings\" : `a ${spec.type}`}.`);\n options[name] = option as OptionValue;\n changed.push(name);\n }\n // A changed option can make a rule weaker, so it needs a reason, as `ignore` does\n if (changed.length > 0 && reason === undefined && off === undefined) {\n throw new Error(`${where} changes the option${changed.length > 1 ? \"s\" : \"\"} ${changed.join(\", \")}, and needs a reason: add \"reason\": \"<why this repository changes the default>\".`);\n }\n result[id] = {\n ...(off === undefined ? {} : { off }),\n ignore,\n ...(generated.length === 0 ? {} : { generated }),\n ...(reason === undefined ? {} : { reason }),\n options,\n };\n }\n return { ...(packages === undefined ? {} : { packages }), rules: result };\n}\n","/**\n * The shape of a rule, the facts that a rule reads (the context), and small helpers for the rules.\n */\nimport { spawnSync } from \"node:child_process\";\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { globToRegExp } from \"./workspace.ts\";\n\n/** A row of the invariants audit that a rule comes from: the repository, the id of the rule in that audit, and the document line. */\nexport interface AuditSource {\n readonly repo: string;\n readonly rule: string;\n readonly doc: string;\n}\n\n/** A break of a rule: the file, the line when the rule knows it, and what is wrong. */\nexport interface Break {\n /** The file, relative to the root, with `/`. */\n readonly file: string;\n /** The line in the file, from 1. */\n readonly line?: number;\n readonly message: string;\n /** A fix for this break. The fix of the rule applies when this field is missing. */\n readonly fix?: string;\n /** The changes of files that fix this break, for `conventions fix`. A break with no edits needs a person. */\n readonly edits?: readonly Edit[];\n}\n\n/**\n * A change of one file that `conventions fix` writes. The file must still have the text `before`, else the edit does\n * not apply. An edit that an earlier edit made stale waits for the next check.\n */\nexport interface Edit {\n /** The file, relative to the root, with `/`. */\n readonly file: string;\n /** The whole text of the file before the change. An empty text makes a file that does not exist. */\n readonly before: string;\n /** The whole text of the file after the change. */\n readonly after: string;\n}\n\n/** This function gives `text` with the line `line` (from 1) replaced by `lines`, with the line ends of `text`. An empty `lines` removes the line. */\nexport function replaceLine(text: string, line: number, lines: readonly string[]): string {\n const eol = text.includes(\"\\r\\n\") ? \"\\r\\n\" : \"\\n\";\n const all = text.split(/\\r?\\n/);\n all.splice(line - 1, 1, ...lines);\n return all.join(eol);\n}\n\n/** A value of an option of a rule. */\nexport type OptionValue = string | number | boolean | readonly string[];\n\n/** The options of a rule, after the defaults. */\nexport type Options = Readonly<Record<string, OptionValue>>;\n\n/** The description of one option of a rule. */\nexport interface OptionSpec {\n readonly type: \"string\" | \"number\" | \"boolean\" | \"strings\";\n readonly default: OptionValue;\n readonly description: string;\n}\n\n/** A field of `package.json`, as the rules read it. */\nexport type Manifest = Readonly<Record<string, unknown>>;\n\n/** A `package.json` file of the repository. */\nexport interface PackageInfo {\n /** The folder, relative to the root, with `/`. The root is `\"\"`. */\n readonly folder: string;\n /** The absolute path of the folder. */\n readonly dir: string;\n /** The path of the `package.json` file, relative to the root, with `/`. */\n readonly file: string;\n /** The text of the `package.json` file. */\n readonly text: string;\n readonly manifest: Manifest;\n}\n\n/** The facts of the repository that a rule reads. */\nexport interface RuleContext {\n /** The absolute path of the root. */\n readonly root: string;\n /** The root `package.json`. */\n readonly rootPackage: PackageInfo;\n /** The packages of the workspace, without the root. A repository with no workspace has no packages here. */\n readonly packages: readonly PackageInfo[];\n /** The environment variables. */\n readonly env: Readonly<Record<string, string | undefined>>;\n /** The base commit that `--base` gives, if any. */\n readonly base?: string;\n /** This function gives the files that git tracks, relative to the root, or undefined when the root is not in a git repository. */\n gitFiles(): readonly string[] | undefined;\n /** This function starts git in the root, and gives its output, or undefined when git fails. */\n git(args: readonly string[]): string | undefined;\n}\n\n/** The result of a rule: a list of breaks (empty when the rule passes), or the reason why the rule did not start. */\nexport type RuleOutcome = readonly Break[] | { readonly skipped: string };\n\n/** The days from the release of a new rule to its day `failsFrom`, at the least. In this time the owners fix the breaks. */\nexport const RULE_WARN_DAYS = 14;\n\n/** One convention, as a machine check. */\nexport interface Rule {\n /** A short id in kebab case. The configuration names the rule with this id. */\n readonly id: string;\n /** The rule in one sentence. */\n readonly title: string;\n /** Why the rule exists. */\n readonly reason: string;\n /** How to correct a break. */\n readonly fix: string;\n /** The rows of the invariants audit that the rule comes from. */\n readonly sources: readonly AuditSource[];\n /** The options of the rule, with their defaults. */\n readonly options: Readonly<Record<string, OptionSpec>>;\n /**\n * The value `true` tells that the breaks of the rule depend on the change (the files that a pull request changes).\n * Then an entry of `ignore` that matches no break is not stale, because a later change can match it.\n */\n readonly changeScoped?: boolean;\n /**\n * The first day (`YYYY-MM-DD`, UTC) on which a break of the rule fails the check. Before that day, a break is a\n * warning: the check shows it, and it passes. A new version of this package reaches each repository through an\n * update pull request. A new rule that fails at once blocks that pull request in each repository that breaks it.\n * Thus each new rule gives this field, a day at least 14 days after its release (`RULE_WARN_DAYS`).\n */\n readonly failsFrom?: string;\n check(context: RuleContext, options: Options): RuleOutcome;\n}\n\n/** The fields of `package.json` that hold dependencies. */\nexport const DEPENDENCY_FIELDS = [\"dependencies\", \"devDependencies\", \"peerDependencies\", \"optionalDependencies\"] as const;\n\n/** This function gives each entry of a field of `package.json` that maps names to specifiers. */\nexport function specifiersOf(manifest: Manifest, field: string): [string, string][] {\n const value = manifest[field];\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) return [];\n return Object.entries(value as Record<string, unknown>).filter((entry): entry is [string, string] => typeof entry[1] === \"string\");\n}\n\n/** This function gives the line (from 1) of the first line of `text` that contains `needle`, from the line `from`. */\nexport function lineOf(text: string, needle: string, from = 1): number | undefined {\n const lines = text.split(/\\r?\\n/);\n for (let index = Math.max(0, from - 1); index < lines.length; index++) if ((lines[index] ?? \"\").includes(needle)) return index + 1;\n return undefined;\n}\n\n/** This function gives the line of the key `\"name\":` in `package.json`, after the line of the field `field`. */\nexport function keyLine(text: string, field: string, name: string): number | undefined {\n const start = lineOf(text, `\"${field}\"`) ?? 1;\n return lineOf(text, `${JSON.stringify(name)}:`, start) ?? lineOf(text, JSON.stringify(name), start);\n}\n\n/** This function joins a folder and a file name as a path relative to the root. */\nexport const inFolder = (folder: string, file: string): string => (folder === \"\" ? file : `${folder}/${file}`);\n\n/** This function removes `./` at the start of a path. */\nexport const cleanPath = (path: string): string => path.replace(/^\\.\\//, \"\");\n\n/** This function tells if a path matches one of the globs. */\nexport function matchesAny(path: string, globs: readonly string[]): boolean {\n return globs.some((glob) => globToRegExp(cleanPath(glob)).test(path));\n}\n\n/**\n * This function reads a JSON file with comments and commas at the end of a list (a `tsconfig.json`).\n *\n * @throws SyntaxError when the text is not JSON after the comments are removed\n */\nexport function parseJsonc(text: string): unknown {\n let out = \"\";\n let inString = false;\n for (let index = 0; index < text.length; index++) {\n const char = text.charAt(index);\n const next = text.charAt(index + 1);\n if (inString) {\n out += char;\n if (char === \"\\\\\") {\n out += next;\n index++;\n } else if (char === '\"') inString = false;\n } else if (char === '\"') {\n inString = true;\n out += char;\n } else if (char === \"/\" && next === \"/\") {\n while (index < text.length && text.charAt(index) !== \"\\n\") index++;\n out += \"\\n\";\n } else if (char === \"/\" && next === \"*\") {\n const end = text.indexOf(\"*/\", index + 2);\n index = end < 0 ? text.length : end + 1;\n } else out += char;\n }\n return JSON.parse(out.replace(/,(\\s*[}\\]])/g, \"$1\"));\n}\n\n/** This function reads a JSON file with comments, or gives undefined when the file does not exist or is not JSON. */\nexport function readJsonc(file: string): unknown {\n if (!existsSync(file)) return undefined;\n try {\n return parseJsonc(readFileSync(file, \"utf8\"));\n } catch {\n return undefined;\n }\n}\n\n/** This function starts git in `root` with `args`, and gives its output, or undefined when git fails. */\nexport function runGit(root: string, args: readonly string[]): string | undefined {\n const result = spawnSync(\"git\", [...args], { cwd: root, encoding: \"utf8\", maxBuffer: 256 * 1024 * 1024, windowsHide: true });\n if (result.error || result.status !== 0) return undefined;\n return result.stdout;\n}\n\n/** This function tells if `file` exists in the folder `dir`. */\nexport const hasFile = (dir: string, file: string): boolean => existsSync(join(dir, file));\n\n/**\n * This function gives the packages that hold code: the packages of the workspace, or the root\n * package when the repository has no workspace packages (a repository of one package).\n */\nexport function codePackages(context: Pick<RuleContext, \"rootPackage\" | \"packages\">): readonly PackageInfo[] {\n return context.packages.length > 0 ? context.packages : [context.rootPackage];\n}\n\n/**\n * This function gives the root package and the code packages, each one time. The root counts also when the globs of the\n * workspace leave it out. A repository can publish its root and keep a private site in its workspace.\n */\nexport function rootAndCodePackages(context: Pick<RuleContext, \"rootPackage\" | \"packages\">): readonly PackageInfo[] {\n const all = [context.rootPackage, ...codePackages(context)];\n return all.filter((pkg, index) => all.findIndex((other) => other.file === pkg.file) === index);\n}\n\n/**\n * This function gives the packages with a release version. These are the packages of `rootAndCodePackages` that are not\n * private and have a name and a version.\n */\nexport function versionedPackages(context: Pick<RuleContext, \"rootPackage\" | \"packages\">): readonly PackageInfo[] {\n return rootAndCodePackages(context).filter(\n (pkg) => pkg.manifest[\"private\"] !== true && typeof pkg.manifest[\"name\"] === \"string\" && typeof pkg.manifest[\"version\"] === \"string\",\n );\n}\n","/**\n * Versions: the SemVer parser, the sort, the kind of a version and the version of a git tag.\n */\n\nimport type { ReleaseKind } from \"./types.ts\";\n\n/** The parts of a SemVer 2.0.0 version. */\nexport interface ParsedVersion {\n major: number;\n minor: number;\n patch: number;\n prerelease: string[];\n}\n\nconst SEMVER = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$/;\n\n/** This function gives the parts of a version, or null when the text is not a SemVer version. */\nexport function parseVersion(version: string): ParsedVersion | null {\n const match = SEMVER.exec(version);\n if (!match) return null;\n return {\n major: Number(match[1]),\n minor: Number(match[2]),\n patch: Number(match[3]),\n prerelease: match[4] ? match[4].split(\".\") : [],\n };\n}\n\n/**\n * This function compares two versions by the SemVer precedence. It gives a negative number when `a`\n * is older, a positive number when `a` is newer, and 0 for the same version. A text that is not a\n * version comes before each version.\n */\nexport function compareVersions(a: string, b: string): number {\n const x = parseVersion(a);\n const y = parseVersion(b);\n if (!x || !y) return x ? 1 : y ? -1 : a.localeCompare(b);\n const core = x.major - y.major || x.minor - y.minor || x.patch - y.patch;\n if (core !== 0) return core;\n // A prerelease comes before its release: 1.0.0-rc.1 < 1.0.0\n if (x.prerelease.length === 0 || y.prerelease.length === 0) return y.prerelease.length - x.prerelease.length;\n for (let index = 0; index < Math.max(x.prerelease.length, y.prerelease.length); index++) {\n const p = x.prerelease[index];\n const q = y.prerelease[index];\n if (p === undefined) return -1;\n if (q === undefined) return 1;\n if (p === q) continue;\n const pNumber = /^\\d+$/.test(p);\n const qNumber = /^\\d+$/.test(q);\n if (pNumber && qNumber) return Number(p) - Number(q);\n if (pNumber !== qNumber) return pNumber ? -1 : 1;\n return p < q ? -1 : 1;\n }\n return 0;\n}\n\n/**\n * This function gives the kind of a version. The oldest version of the list is \"first\". The caller\n * tells if the version is the oldest.\n */\nexport function kindOf(version: string, oldest: boolean): ReleaseKind {\n if (oldest) return \"first\";\n const parsed = parseVersion(version);\n if (!parsed) return \"patch\";\n if (parsed.major > 0 && parsed.minor === 0 && parsed.patch === 0) return \"major\";\n return parsed.patch === 0 ? \"minor\" : \"patch\";\n}\n\n/** The version of a git tag, and the package that the tag names (null for a tag like `v1.2.3`). */\nexport interface TagVersion {\n version: string;\n package: string | null;\n}\n\n/**\n * This function reads the version of a git tag. It knows `1.2.3`, `v1.2.3` and the tags of Changesets:\n * `name@1.2.3` and `@scope/name@1.2.3`. It gives null for another tag.\n */\nexport function versionOfTag(tag: string): TagVersion | null {\n const match = /^(?:(.+)@)?v?(\\d+\\.\\d+\\.\\d+(?:[-+][0-9A-Za-z.+-]*)?)$/.exec(tag.trim());\n if (!match || match[2] === undefined || !parseVersion(match[2])) return null;\n return { version: match[2], package: match[1] ?? null };\n}\n","/**\n * The changelog parser. Changesets writes a section for each version in the `CHANGELOG.md` of each\n * package. The section has a `## 0.13.2` heading and a `###` heading for each kind of change. Each\n * change is one `- <short sha>: <text>` entry. The next lines of an entry have an indent.\n */\n\nimport type { ChangelogFileFault, ChangelogReading } from \"./types.ts\";\n\n/** One entry of a changelog section or of a release text. */\nexport interface ChangelogEntry {\n /** The short SHA of the commit, or null for an entry without a commit. */\n commit: string | null;\n /** The first sentence of the entry, with its code spans. */\n text: string;\n}\n\n/** The entries of one version of a changelog. */\nexport interface ChangelogSection {\n version: string;\n /** The text of the version heading, without the `##` marks. */\n heading: string;\n entries: ChangelogEntry[];\n}\n\n// \"## 1.2.3\", \"## v1.2.3\", \"## [1.2.3] - 2026-10-18\" or \"## 1.2.3-rc.1\"\nconst VERSION_HEADING = /^##\\s+\\[?v?(\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?)\\]?(?:\\s.*)?$/;\nconst COMMIT_ENTRY = /^([0-9a-f]{7,40}):\\s+([\\s\\S]*)$/;\n// The lines of Changesets for a new version of a dependency: no change of the package itself\nconst DEPENDENCY_ENTRY = /^(?:Updated dependencies\\b|@?[\\w.-]+(?:\\/[\\w.-]+)?@\\S+\\s*$)/;\n// The generated release notes of GitHub: \"Fix it by @ann in https://github.com/o/r/pull/12\". The\n// pattern starts with one whitespace character, not \"\\s+\": with \"\\s+\", each space of a long run is\n// a start, and the time grows with the square of the length. entryOf removes the rest of the run.\nconst GENERATED_NOTE = /\\sby\\s+@[\\w-]+(?:\\[bot\\])?\\s+in\\s+(https:\\/\\/github\\.com\\/[\\w.-]+\\/[\\w.-]+\\/pull\\/(\\d+))\\s*$/;\nconst FIRST_CONTRIBUTION = /\\bmade their first contribution\\b/;\n\n/**\n * This function gives the first sentence of a text. A full stop, a question mark or an exclamation\n * mark ends the sentence when a space and no lowercase letter follow it.\n *\n * @remarks A mark in a code span does not end the sentence. A text that ends with a colon (a list\n * follows) ends with a full stop.\n */\nexport function firstSentence(text: string): string {\n const clean = text.replace(/\\s+/g, \" \").trim();\n let code = false;\n for (let index = 0; index < clean.length; index++) {\n const char = clean[index];\n if (char === \"`\") {\n code = !code;\n continue;\n }\n if (code || (char !== \".\" && char !== \"?\" && char !== \"!\")) continue;\n const next = clean[index + 1];\n if (next === undefined) break;\n if (next === \" \" && !/^[a-z]/.test(clean.slice(index + 2))) return clean.slice(0, index + 1);\n }\n return clean.replace(/:$/, \".\");\n}\n\n/**\n * This function makes one entry from the lines of a list item. The text is the first paragraph: the\n * lines before an empty line or a nested list. It gives null for an entry that is not a change.\n */\nfunction entryOf(lines: readonly string[]): ChangelogEntry | null {\n const paragraph: string[] = [];\n for (const [index, line] of lines.entries()) {\n if (index > 0 && (line.trim() === \"\" || /^\\s+[-*+]\\s/.test(line))) break;\n paragraph.push(line.trim());\n }\n const text = paragraph.join(\" \");\n const commit = COMMIT_ENTRY.exec(text);\n let body = (commit ? commit[2] : text) ?? \"\";\n if (body.trim() === \"\" || DEPENDENCY_ENTRY.test(body.trim()) || FIRST_CONTRIBUTION.test(body)) return null;\n const note = GENERATED_NOTE.exec(body);\n if (note) body = `${body.slice(0, note.index).trimEnd()} ([#${note[2] ?? \"\"}](${note[1] ?? \"\"}))`;\n return { commit: commit?.[1] ?? null, text: firstSentence(body) };\n}\n\n/**\n * This function gives the entries of each version of a changelog, in the sequence of the file.\n *\n * @remarks An entry is a line that starts with \"- \" and the indented lines under it. An entry for a\n * new dependency version is not a change.\n */\nexport function parseChangelog(markdown: string): ChangelogSection[] {\n const sections: Array<{ version: string; heading: string; raw: string[][] }> = [];\n let section: { version: string; heading: string; raw: string[][] } | null = null;\n let entry: string[] | null = null;\n const close = (): void => {\n if (entry && section) section.raw.push(entry);\n entry = null;\n };\n for (const line of markdown.split(/\\r?\\n/)) {\n const heading = VERSION_HEADING.exec(line);\n if (heading?.[1] !== undefined) {\n close();\n section = { version: heading[1], heading: line.replace(/^##\\s+/, \"\").trim(), raw: [] };\n sections.push(section);\n continue;\n }\n if (section === null) continue;\n if (line.startsWith(\"- \")) {\n close();\n entry = [line.slice(2)];\n } else if (entry && (line.trim() === \"\" || /^\\s/.test(line))) {\n (entry as string[]).push(line);\n } else {\n // A heading (\"### Patch Changes\") or a paragraph of the section ends the entry\n close();\n if (/^#{1,2}\\s/.test(line)) section = null;\n }\n }\n close();\n return sections.map(({ version, heading, raw }) => ({\n version,\n heading,\n entries: raw.map(entryOf).filter((change): change is ChangelogEntry => change !== null),\n }));\n}\n\n/**\n * The kinds of a fault of a changelog section. `no-statement`: the section is empty, or it has only\n * dependency lines on a break of the version rule.\n * `version-kind-only`: its first statement names the kind of the version, and nothing more.\n * `break-unmarked`: the version rule makes the release a break, and the section has no break mark.\n * `mark-without-break`: the section has a break mark, and the version rule makes the release no break.\n */\nexport type ChangelogFaultKind = \"no-statement\" | \"version-kind-only\" | \"break-unmarked\" | \"mark-without-break\";\n\n/** One fault of one version section of a changelog. */\nexport interface ChangelogFault {\n version: string;\n kind: ChangelogFaultKind;\n /** The first statement of the section, or an empty text when it has none. */\n statement: string;\n}\n\n/** The options of {@link changelogFaults}. */\nexport interface ChangelogFaultOptions {\n /** The oldest version to examine. Older sections can follow older habits, so a caller can leave them out. */\n from?: string;\n /**\n * This option states that all the packages of a fixed group raise one version together. Then the\n * raise of a section with no change or with only PATCH changes comes from another package.\n * Such a section has no break fault, and a section with no change has no statement fault.\n */\n fixedGroup?: boolean;\n}\n\nconst KIND_WORDS: ReadonlySet<string> = new Set([\"major\", \"minor\", \"patch\"]);\nconst FILL_WORDS: ReadonlySet<string> = new Set([\"a\", \"the\", \"this\", \"is\", \"raises\", \"bumps\", \"release\", \"version\", \"bump\"]);\n// The two marks: free words do not count, because a reader cannot tell them from a text that names a break for another reason\nconst BREAK_HEADING = /^### Breaking\\b/m;\nconst BREAK_SENTENCE = /\\bhas breaking changes\\b/;\n\n/**\n * This function tells if the text of a version section marks a break. The marks are the heading\n * `### Breaking` and the words \"has breaking changes\", for a text that goes through Changesets.\n *\n * @remarks A page that counts breaks and {@link changelogFaults} use this one test, so they agree.\n */\nexport function sectionMarksBreak(section: string): boolean {\n return BREAK_HEADING.test(section) || BREAK_SENTENCE.test(section);\n}\n\n/** This function tells if a statement has only the kind of the version and words that state no change. */\nfunction namesOnlyKind(statement: string): boolean {\n const words = statement.toLowerCase().match(/[\\p{L}\\p{N}`]+/gu) ?? [];\n return words.some((word) => KIND_WORDS.has(word)) && words.every((word) => KIND_WORDS.has(word) || FILL_WORDS.has(word));\n}\n\n/** This function gives the three numbers of a version without its pre-release text, or null for another text. */\nfunction versionCore(version: string): readonly [number, number, number] | null {\n const match = /^(\\d+)\\.(\\d+)\\.(\\d+)(?:-|$)/.exec(version);\n return match ? [Number(match[1]), Number(match[2]), Number(match[3])] : null;\n}\n\n/** This function compares two versions without their pre-release texts. */\nfunction compareCores(a: readonly number[], b: readonly number[]): number {\n return (a[0] ?? 0) - (b[0] ?? 0) || (a[1] ?? 0) - (b[1] ?? 0) || (a[2] ?? 0) - (b[2] ?? 0);\n}\n\n/**\n * This function tells if the version rule makes a release a break. Before 1.0.0, a break raises\n * MINOR. From 1.0.0, a break raises MAJOR.\n */\nfunction ruleGivesBreak([major, minor, patch]: readonly [number, number, number]): boolean {\n if (patch !== 0) return false;\n return major === 0 ? minor > 0 : minor === 0;\n}\n\n/** This function gives the version and the body of each version section. Another heading of level 1 or 2 ends a section. */\nfunction versionSections(markdown: string): { version: string; heading: string; body: string[] }[] {\n const sections: { version: string; heading: string; body: string[] }[] = [];\n let section: { version: string; heading: string; body: string[] } | null = null;\n for (const line of markdown.split(/\\r?\\n/)) {\n const heading = VERSION_HEADING.exec(line);\n if (heading?.[1] !== undefined) {\n section = { version: heading[1], heading: line, body: [] };\n sections.push(section);\n } else if (/^#{1,2}\\s/.test(line)) {\n section = null;\n } else {\n section?.body.push(line);\n }\n }\n return sections;\n}\n\n/**\n * This function gives the first statement of a section: the first sentence of its first paragraph,\n * else the first change of its lists. A dependency line is not a change.\n */\nfunction firstStatement(section: { heading: string; body: string[] }): string {\n const blocks = section.body.join(\"\\n\").split(/\\n[ \\t]*\\n/).map((block) => block.trim());\n const first = blocks.find((block) => block !== \"\" && !block.startsWith(\"#\"));\n if (first !== undefined && !/^[-*+]\\s/.test(first)) return firstSentence(first);\n const [parsed] = parseChangelog([section.heading, ...section.body].join(\"\\n\"));\n return parsed?.entries[0]?.text ?? \"\";\n}\n\n/** This function tells if a section of a fixed group has no change of its own above the level of PATCH. */\nfunction raisedByGroup(text: string): boolean {\n if (/^### (?:Minor|Major) Changes\\b/m.test(text)) return false;\n return text.trim() === \"\" || /^### Patch Changes\\b/m.test(text) || /^No changes in this release\\.$/m.test(text);\n}\n\n/** This function tells if a section has a line that names a new version of a dependency. */\nfunction hasDependencyLine(section: { body: string[] }): boolean {\n return section.body.some((line) => {\n const item = /^[-*+]\\s+(.*)$/.exec(line)?.[1];\n return item !== undefined && DEPENDENCY_ENTRY.test((COMMIT_ENTRY.exec(item)?.[2] ?? item).trim());\n });\n}\n\n/**\n * This function gives the faults of the version sections of a changelog, in the order of the file.\n * A section can have two faults: one for its statement and one for its break mark.\n *\n * @remarks The break rule does not read a pre-release or the oldest section of the file, because\n * the oldest section has no earlier release to break. A dependency line does not say why the API\n * broke. Thus a section with only dependency lines has a fault on a break of the version rule. The\n * option `fixedGroup` removes this fault.\n */\nexport function changelogFaults(markdown: string, options: ChangelogFaultOptions = {}): ChangelogFault[] {\n const from = options.from === undefined ? null : versionCore(options.from);\n if (options.from !== undefined && from === null) throw new RangeError(`\"${options.from}\" is not a version.`);\n const sections = versionSections(markdown);\n const cores = sections.map((section) => versionCore(section.version)).filter((core) => core !== null);\n const oldest = cores.reduce<(typeof cores)[number] | null>((low, core) => (low === null || compareCores(core, low) < 0 ? core : low), null);\n const faults: ChangelogFault[] = [];\n for (const section of sections) {\n const core = versionCore(section.version);\n if (core === null || (from !== null && compareCores(core, from) < 0)) continue;\n const statement = firstStatement(section);\n const fault = (kind: ChangelogFaultKind): void => {\n faults.push({ version: section.version, kind, statement });\n };\n if (statement === \"\" && options.fixedGroup === true) continue;\n const ruled = !section.version.includes(\"-\") && oldest !== null && compareCores(core, oldest) !== 0;\n if (statement === \"\" && (!hasDependencyLine(section) || (ruled && ruleGivesBreak(core)))) fault(\"no-statement\");\n else if (statement !== \"\" && namesOnlyKind(statement)) fault(\"version-kind-only\");\n if (!ruled) continue;\n const text = section.body.join(\"\\n\");\n const marked = sectionMarksBreak(text);\n if (!ruleGivesBreak(core)) {\n if (marked) fault(\"mark-without-break\");\n } else if (!marked && !(options.fixedGroup === true && raisedByGroup(text))) {\n fault(\"break-unmarked\");\n }\n }\n return faults;\n}\n\n/**\n * This function reads the changelog files of a repository against the rules of a version section.\n * With a `from` version, it examines the sections of that version and newer. With null, it examines all the sections.\n *\n * @throws RangeError when `from` is not a version\n */\nexport function changelogReading(changelogs: readonly { file: string; markdown: string }[], from: string | null): ChangelogReading {\n const core = from === null ? null : versionCore(from);\n if (from !== null && core === null) throw new RangeError(`\"${from}\" is not a version.`);\n let sections = 0;\n const faults: ChangelogFileFault[] = [];\n for (const { file, markdown } of changelogs) {\n for (const section of versionSections(markdown)) {\n const own = versionCore(section.version);\n if (own !== null && (core === null || compareCores(own, core) >= 0)) sections += 1;\n }\n for (const fault of changelogFaults(markdown, from === null ? {} : { from })) faults.push({ file, ...fault });\n }\n return { from, sections, faults };\n}\n\n/**\n * This function gives the problem of a changelog reading for the build, or null. A reading with a\n * `from` version and a fault fails the build. A reading with no `from` version only reports.\n */\nexport function changelogGateProblem(reading: ChangelogReading, limit = 20): string | null {\n if (reading.from === null || reading.faults.length === 0) return null;\n const lines = reading.faults.slice(0, limit).map((fault) => ` ${fault.file} ${fault.version}: ${fault.kind}${fault.statement === \"\" ? \"\" : ` (\"${fault.statement.slice(0, 80)}\")`}`);\n const more = reading.faults.length > limit ? [` and ${reading.faults.length - limit} more`] : [];\n return [`${reading.faults.length} of ${reading.sections} version sections from ${reading.from} break the rules of a changelog section:`, ...lines, ...more].join(\"\\n\");\n}\n\n/**\n * This function gives the changes of the text of a GitHub release: one change for each top-level\n * list item. Fenced code is not read.\n */\nexport function releaseBodyEntries(body: string): ChangelogEntry[] {\n const entries: ChangelogEntry[] = [];\n let entry: string[] | null = null;\n let fence: string | null = null;\n const close = (): void => {\n const change = entry ? entryOf(entry) : null;\n if (change) entries.push(change);\n entry = null;\n };\n for (const line of body.split(/\\r?\\n/)) {\n const fenceMark = /^\\s*(`{3,}|~{3,})/.exec(line)?.[1];\n if (fenceMark !== undefined) {\n close();\n if (fence === null) fence = fenceMark[0] ?? null;\n else if (fenceMark[0] === fence) fence = null;\n continue;\n }\n if (fence !== null) continue;\n // \"\\s+(\\S.*)?\" and not \"\\s+(.*)\": the two parts cannot share a space, so a failed match does not backtrack\n const item = /^[-*+]\\s+(\\S.*)?$/.exec(line);\n if (item) {\n close();\n entry = [item[1] ?? \"\"];\n } else if (entry && (line.trim() === \"\" || /^\\s/.test(line))) {\n (entry as string[]).push(line);\n } else {\n close();\n }\n }\n close();\n return entries;\n}\n\n/**\n * This function gives the anchor of a heading on GitHub: lowercase, no punctuation, and a hyphen\n * for each space. The anchor of \"0.13.2\" is \"0132\".\n */\nexport function headingAnchor(heading: string): string {\n return heading\n .toLowerCase()\n .trim()\n .replace(/[^\\p{L}\\p{N}\\s_-]/gu, \"\")\n .replace(/\\s/g, \"-\");\n}\n\n/** This function gives the versions of the headings of a changelog, in the order of the file. Another heading is not a version. */\nexport function changelogVersions(markdown: string): string[] {\n return parseChangelog(markdown).map((section) => section.version);\n}\n","/**\n * The status data: the open work of a roadmap file, and the open pull requests and issues of a\n * GitHub repository. The build reads both, so the page shows the state at the time of the build.\n *\n * @remarks The roadmap parser reads two forms. The first form is each Markdown table with an `ID`\n * column and a `Status` column. The second form is each heading \"### `id`: Title\" under a \"##\" heading\n * that gives the status. The parser is strict: a row whose cells do not match the header stops the\n * build with the file and the line.\n */\n\nimport { readFileSync } from \"node:fs\";\nimport { join, posix } from \"node:path\";\nimport { githubOpenWork } from \"./github.ts\";\nimport type { BoardItem, GitHubOpenWork, Link, StatusBoardData, StatusClass } from \"./types.ts\";\n\n/** The classes of a status, in the sequence of the board. The open work comes first. */\nexport const STATUS_CLASSES: readonly StatusClass[] = [\"waiting\", \"blocked\", \"progress\", \"open\", \"later\", \"done\"];\n\n/** The open classes, in the sequence of the board. */\nexport const OPEN_CLASSES: readonly StatusClass[] = [\"waiting\", \"blocked\", \"progress\", \"open\", \"later\"];\n\n/** An error in the roadmap file, with the file and the line. */\nexport class RoadmapParseError extends Error {}\n\n// The keywords of each class. In a status text, the first keyword wins: \"done, needs a release\" is\n// done, and \"blocked, waits for X\" is blocked. A negation (\"not started\") comes first, so that the\n// word after it does not count.\nconst STATUS_KEYWORDS: ReadonlyArray<[StatusClass, RegExp]> = [\n [\"open\", /\\bnot\\s+(?:yet\\s+)?(?:started|done|fixed|merged|shipped|released)\\b|\\bto[ -]?do\\b/],\n // A closed item that did not ship (\"never\", \"dropped\") is not open work either\n [\"done\", /\\b(?:done|shipped|merged|fixed|released|complete|completed|closed|never|dropped|cancell?ed|wontfix)\\b|\\bwon't do\\b/],\n [\"progress\", /\\bin[ -]progress\\b|\\b(?:active|ongoing|started|wip)\\b/],\n [\"waiting\", /\\b(?:waiting|waits|awaiting|needs)\\b/],\n [\"blocked\", /\\bblocked\\b/],\n [\"later\", /\\b(?:later|deferred|postponed|someday)\\b/],\n];\n\n/**\n * This function gives the class of a free-text status: done, progress, waiting, blocked, later or\n * open. The first keyword of the text decides. A text without a keyword (\"next\", \"open\") is open.\n */\nexport function statusClassOf(text: string | null | undefined): StatusClass {\n const lower = String(text ?? \"\").toLowerCase();\n let best: { index: number; value: StatusClass } = { index: Infinity, value: \"open\" };\n for (const [value, pattern] of STATUS_KEYWORDS) {\n const match = pattern.exec(lower);\n if (match && match.index < best.index) best = { index: match.index, value };\n }\n return best.value;\n}\n\n/** This function gives the cells of a table row. A \"|\" in a code span or after \"\\\" is text. */\nexport function splitRow(line: string): string[] {\n const cells: string[] = [];\n let cell = \"\";\n let code = false;\n const text = line.trim().replace(/^\\|/, \"\").replace(/\\|$/, \"\");\n for (let index = 0; index < text.length; index++) {\n const char = text[index];\n if (char === \"\\\\\" && text[index + 1] === \"|\") {\n cell += \"|\";\n index++;\n } else if (char === \"`\") {\n code = !code;\n cell += char;\n } else if (char === \"|\" && !code) {\n cells.push(cell.trim());\n cell = \"\";\n } else {\n cell += char;\n }\n }\n cells.push(cell.trim());\n return cells;\n}\n\n/** A whitespace character, as `\\s` of a regular expression and `String.prototype.trim` read it. */\nconst SPACE = /\\s/;\n/** A character that `.` of a regular expression does not match. */\nconst LINE_TERMINATOR = /[\\n\\r\\u2028\\u2029]/;\n/** The first whitespace character at or after `lastIndex`. */\nconst NEXT_SPACE = /\\s/g;\n\n/**\n * This function replaces each Markdown link `[label](target)` of a text with the result of\n * `replace`. The label ends at the first `]`, and the target ends at the first `)`. In `strict`\n * mode, the label and the target are not empty, and the target has no whitespace.\n *\n * @remarks The function reads the text one time. A regular expression for these links can\n * backtrack (CodeQL `js/polynomial-redos`). For a long text with many `[` characters, its time\n * grows with the square of the length.\n */\nfunction replaceLinks(text: string, strict: boolean, replace: (label: string, target: string) => string): string {\n let result = \"\";\n let copied = 0;\n // The first \"]\" after the current \"[\", the first \")\" after its \"](\", and the first whitespace\n // after its \"](\". The values only increase, so each search starts where the last one stopped.\n let close = -1;\n let end = -1;\n let space = -1;\n for (let open = text.indexOf(\"[\"); open !== -1; open = text.indexOf(\"[\", open + 1)) {\n if (close <= open) close = text.indexOf(\"]\", open + 1);\n if (close === -1) break;\n if (text[close + 1] !== \"(\" || (strict && close === open + 1)) continue;\n const start = close + 2;\n if (end < start) end = text.indexOf(\")\", start);\n if (end === -1) break;\n if (strict) {\n if (space !== Infinity && space < start) {\n NEXT_SPACE.lastIndex = start;\n space = NEXT_SPACE.exec(text)?.index ?? Infinity;\n }\n if (end === start || space < end) continue;\n }\n result += text.slice(copied, open) + replace(text.slice(open + 1, close), text.slice(start, end));\n copied = end + 1;\n open = end;\n }\n return result + text.slice(copied);\n}\n\n/**\n * This function gives the text of an ATX heading without its closing sequence: the whitespace,\n * then the `#` characters, then the whitespace at the end. It gives null when the rest has a line\n * terminator, as the regular expression `(.*?)\\s*#*\\s*$` does.\n */\nfunction closeHeading(text: string): string | null {\n let end = text.length;\n while (end > 0 && SPACE.test(text[end - 1] ?? \"\")) end--;\n while (end > 0 && text[end - 1] === \"#\") end--;\n while (end > 0 && SPACE.test(text[end - 1] ?? \"\")) end--;\n const rest = text.slice(0, end);\n return LINE_TERMINATOR.test(rest) ? null : rest;\n}\n\n/** The start of an ATX heading. The text after the whitespace goes to `closeHeading`. */\nconst HEADING = /^(#{1,6})\\s+(\\S[\\s\\S]*)?$/;\n\n/** This function gives the level and the text of an ATX heading line, or null for another line. */\nfunction headingOf(line: string): { level: number; text: string } | null {\n const match = HEADING.exec(line);\n const text = match ? closeHeading(match[2] ?? \"\") : null;\n return match && text !== null ? { level: match[1]?.length ?? 0, text } : null;\n}\n\n/** This function gives the plain text of inline Markdown: no code marks, no emphasis, the text of each link. */\nexport function plainText(markdown: string | null | undefined): string {\n return replaceLinks(String(markdown ?? \"\"), false, (label) => label)\n .replace(/[`*_]/g, \"\")\n .replace(/\\s+/g, \" \")\n .trim();\n}\n\n/** A cell with no value: empty, or a dash. */\nfunction isEmpty(cell: string | undefined): boolean {\n return cell === undefined || /^(?:[-–—]|n\\/a)?$/i.test(cell.trim());\n}\n\n/** A table of a Markdown file. */\nexport interface MarkdownTable {\n /** The nearest heading above the table, as plain text. */\n section: string;\n /** The line of the header. */\n line: number;\n /** The header names, in lowercase plain text. */\n header: string[];\n rows: Array<{ line: number; cells: string[] }>;\n}\n\n/**\n * This function gives the tables of a Markdown file. Each table has its header names in lowercase\n * plain text, the nearest heading above it, the line of its header and its rows. Fenced code is not read.\n */\nexport function markdownTables(markdown: string): MarkdownTable[] {\n const lines = String(markdown).split(/\\r?\\n/);\n const tables: MarkdownTable[] = [];\n let section = \"\";\n let fence: string | null = null;\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index] ?? \"\";\n const fenceMark = /^\\s*(`{3,}|~{3,})/.exec(line)?.[1];\n if (fenceMark !== undefined) {\n if (fence === null) fence = fenceMark[0] ?? null;\n else if (fenceMark[0] === fence) fence = null;\n continue;\n }\n if (fence !== null) continue;\n const heading = headingOf(line);\n if (heading) {\n section = plainText(heading.text);\n continue;\n }\n if (!line.trim().startsWith(\"|\")) continue;\n const separator = lines[index + 1] ?? \"\";\n if (!/^\\s*(?:\\|\\s*)?:?-{3,}/.test(separator)) continue;\n const header = splitRow(line).map((name) => plainText(name).toLowerCase());\n const rows: MarkdownTable[\"rows\"] = [];\n let next = index + 2;\n for (; next < lines.length && (lines[next] ?? \"\").trim().startsWith(\"|\"); next++) {\n rows.push({ line: next + 1, cells: splitRow(lines[next] ?? \"\") });\n }\n tables.push({ section, line: index + 1, header, rows });\n index = next - 1;\n }\n return tables;\n}\n\n/** The options of the link functions. */\nexport interface LinkOptions {\n /** The path of the roadmap file in the repository. */\n file?: string;\n /** \"owner/name\" of the repository. */\n repository?: string;\n /** The branch or the commit of the relative links. The default is \"HEAD\". */\n ref?: string;\n}\n\n/** The columns whose cells hold the links of an item. */\nconst LINK_COLUMNS = [\"where\", \"commit\", \"commits\", \"link\", \"links\", \"pr\", \"prs\"];\n/** Words before a reference that do not name a repository. */\nconst NOT_REPOSITORIES = new Set(\n \"a an and also at by commit commits done fixed for from in into issue issues merged of on or plus pr prs run see the then to via with\".split(\" \"),\n);\n\n/** The URL of a link target of the roadmap file: an absolute URL stays, and a relative one goes to GitHub. */\nfunction linkUrl(target: string, { file = \"\", repository = \"\", ref = \"HEAD\" }: LinkOptions): string | null {\n if (/^[a-z][a-z0-9+.-]*:/i.test(target)) return target;\n if (!repository) return null;\n const [path = \"\", anchor = \"\"] = target.split(\"#\", 2);\n const resolved = path === \"\" ? file : posix.normalize(posix.join(posix.dirname(file), path));\n if (resolved.startsWith(\"..\")) return null;\n return `https://github.com/${repository}/blob/${ref}/${resolved}${anchor ? `#${anchor}` : \"\"}`;\n}\n\n/**\n * This function gives the word right before the whitespace that ends `text.slice(0, end)`, as the\n * regular expression `([A-Za-z][\\w.-]*)\\s+$` does. The word starts with a letter. The function\n * reads only the characters of the word and of the whitespace.\n */\nfunction wordBefore(text: string, end: number): string | undefined {\n let stop = end;\n while (stop > 0 && SPACE.test(text[stop - 1] ?? \"\")) stop--;\n if (stop === end) return undefined;\n let start = stop;\n while (start > 0 && /[\\w.-]/.test(text[start - 1] ?? \"\")) start--;\n while (start < stop && !/[A-Za-z]/.test(text[start] ?? \"\")) start++;\n return start < stop ? text.slice(start, stop) : undefined;\n}\n\n/**\n * This function gives the links of a cell: each Markdown link, then each bare reference in the rest\n * of the text. A reference is a pull request (\"PR #12\", \"#12\") or a commit hash in a code span.\n *\n * @remarks A repository name right before a reference (\"systems PR #16\") applies to it and to the\n * next references of the cell. Without a name, a reference belongs to `repository`.\n */\nexport function linksOf(cell: string | null | undefined, options: LinkOptions = {}): Link[] {\n const { repository = \"\" } = options;\n const links: Link[] = [];\n const seen = new Set<string>();\n const add = (label: string, url: string | null): void => {\n if (!url || seen.has(url)) return;\n seen.add(url);\n links.push({ label, url });\n };\n const rest = replaceLinks(String(cell ?? \"\"), true, (label, target) => {\n add(plainText(label), linkUrl(target, options));\n return \" \";\n });\n if (!repository) return links;\n const [owner, defaultRepo] = repository.split(\"/\");\n let current = defaultRepo;\n // After \"PR\", the next numbers of the cell are pull requests too: \"PRs #28, #29 and #30\"\n let pulls = false;\n const reference = /\\bPRs?\\s*#(\\d+)|(?<![\\w/&])#(\\d+)\\b|`([0-9a-f]{7,40})`/g;\n for (let match = reference.exec(rest); match; match = reference.exec(rest)) {\n const word = wordBefore(rest, match.index);\n if (word && !NOT_REPOSITORIES.has(word.toLowerCase())) current = word;\n const prefix = current === defaultRepo ? \"\" : `${current} `;\n if (match[1] !== undefined) pulls = true;\n const number = match[1] ?? match[2];\n if (number !== undefined) add(`${prefix}#${number}`, `https://github.com/${owner}/${current}/${pulls ? \"pull\" : \"issues\"}/${number}`);\n else if (match[3] !== undefined) add(`${prefix}${match[3].slice(0, 7)}`, `https://github.com/${owner}/${current}/commit/${match[3]}`);\n }\n return links;\n}\n\n/**\n * The heading of an item: \"### `id`: Title\". A dash can take the place of the colon. The title goes\n * to `closeHeading`.\n */\nconst ITEM_HEADING = /^###\\s+`([^`]+)`\\s*[:–—-]\\s*(\\S[\\s\\S]*)?$/;\n/** The other heading of an item: \"### S1 · Title\". The ID is one word before the middle dot. */\nconst ITEM_HEADING_DOT = /^###\\s+([A-Za-z0-9][\\w.-]*)\\s+·\\s+(\\S[\\s\\S]*)?$/;\n\n/** This function gives the ID and the title of an item heading, or null for another line. */\nfunction itemHeadingOf(line: string): { id: string; title: string } | null {\n for (const pattern of [ITEM_HEADING, ITEM_HEADING_DOT]) {\n const match = pattern.exec(line);\n const title = match ? closeHeading(match[2] ?? \"\") : null;\n if (match && title !== null) return { id: match[1] ?? \"\", title };\n }\n return null;\n}\n\n/**\n * A field of an item heading: \"- Area: Docs\", \"- **Area:** Docs\" or \"- **Area**: Docs\". The label\n * matches without case.\n */\nconst ITEM_FIELD = /^\\s*[-*]\\s+(\\*\\*|__)?([A-Za-z][A-Za-z ]*?)(?::\\1|\\1:)\\s*(\\S.*)?$/;\n/** The fields of an item heading that give the optional fields of an item. */\nconst ITEM_FIELDS: Readonly<Record<string, \"area\" | \"owner\" | \"needs\">> = {\n area: \"area\",\n owner: \"owner\",\n \"waits for\": \"needs\",\n needs: \"needs\",\n \"depends on\": \"needs\",\n};\n\n/**\n * This function gives the items of the second form of a roadmap: each heading \"### `id`: Title\" or\n * \"### id · Title\". The list item \"Status:\" gives the status. Without it, the \"##\" heading above\n * the item gives the status, for example \"Waiting on Mark\", \"Later\" or \"Shipped\". A heading without\n * a status is not an item.\n *\n * The list items \"Area:\", \"Owner:\" and \"Waits for:\" give the optional fields. The list item\n * \"Links:\" and the other list items give the links. Fenced code is not read.\n */\nfunction headingItems(markdown: string, options: LinkOptions & { file: string }): BoardItem[] {\n const lines = String(markdown).split(/\\r?\\n/);\n const items: BoardItem[] = [];\n let section = \"\";\n let current: BoardItem | undefined;\n let fence: string | null = null;\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index] ?? \"\";\n const fenceMark = /^\\s*(`{3,}|~{3,})/.exec(line)?.[1];\n if (fenceMark !== undefined) {\n if (fence === null) fence = fenceMark[0] ?? null;\n else if (fenceMark[0] === fence) fence = null;\n continue;\n }\n if (fence !== null) continue;\n const heading = headingOf(line);\n if (heading) {\n const { level } = heading;\n if (level > 3) continue;\n current = undefined;\n if (level === 2) section = plainText(heading.text);\n if (level === 1) section = \"\";\n if (level !== 3) continue;\n const item = itemHeadingOf(line);\n const id = plainText(item?.id);\n if (!item || isEmpty(id)) continue;\n current = { id, title: item.title, status: section, statusClass: statusClassOf(section), section, line: index + 1, links: [] };\n items.push(current);\n continue;\n }\n if (!current) continue;\n const field = ITEM_FIELD.exec(line);\n const label = (field?.[2] ?? \"\").trim().toLowerCase();\n const value = (field?.[3] ?? \"\").trim();\n const key = field ? ITEM_FIELDS[label] : undefined;\n if (field && label === \"status\") {\n // The field of the item wins over the section\n if (!isEmpty(value)) {\n current.status = value;\n current.statusClass = statusClassOf(plainText(value));\n }\n } else if (field && key !== undefined) {\n if (!isEmpty(value)) current[key] = value;\n } else if (/^\\s*[-*]\\s+/.test(line)) {\n const seen = new Set(current.links.map((link) => link.url));\n for (const link of linksOf(line, options)) if (!seen.has(link.url)) current.links.push(link);\n }\n }\n // A heading without a section and without a \"Status:\" field has no status: it is not an item\n return items.filter((item) => item.status !== \"\");\n}\n\n/**\n * This function gives the items of a roadmap file in the order of the file. It reads two forms:\n *\n * - Each row of each table with an `ID` column and a `Status` column. The header names match without\n * case. The title comes from `Item`, else from `Title`. `Owner`, `Area` and `Needs` are optional.\n * `Where`, `Commit` and `Links` give the links.\n * - Each heading \"### `id`: Title\" or \"### id · Title\". The list item \"Status:\", else the \"##\"\n * heading above it, gives the status. The list items \"Area:\", \"Owner:\" and \"Waits for:\" give the\n * optional fields, and \"Links:\" and the other list items give the links.\n *\n * @throws RoadmapParseError when the cells of a row do not match the header\n */\nexport function roadmapItems(markdown: string, options: LinkOptions = {}): BoardItem[] {\n const { file = \"ROADMAP.md\" } = options;\n const items: BoardItem[] = [];\n for (const table of markdownTables(markdown)) {\n const column = (...names: string[]): number => names.map((name) => table.header.indexOf(name)).find((index) => index >= 0) ?? -1;\n const id = column(\"id\");\n const status = column(\"status\");\n if (id < 0 || status < 0) continue;\n const title = column(\"item\", \"title\");\n const owner = column(\"owner\");\n const area = column(\"area\");\n const needs = column(\"needs\");\n const linkColumns = LINK_COLUMNS.map((name) => table.header.indexOf(name)).filter((index) => index >= 0);\n for (const row of table.rows) {\n if (row.cells.length !== table.header.length) {\n throw new RoadmapParseError(`${file}:${row.line}: the row has ${row.cells.length} cells, and the header has ${table.header.length}`);\n }\n const idText = plainText(row.cells[id]);\n if (isEmpty(idText)) continue;\n const statusText = row.cells[status] ?? \"\";\n const item: BoardItem = {\n id: idText,\n title: title >= 0 ? (row.cells[title] ?? \"\") : \"\",\n status: statusText,\n statusClass: statusClassOf(plainText(statusText)),\n section: table.section,\n line: row.line,\n links: linkColumns.flatMap((index) => linksOf(row.cells[index], { ...options, file })),\n };\n const optional = (index: number): string | undefined => (index >= 0 && !isEmpty(row.cells[index]) ? row.cells[index] : undefined);\n const ownerText = optional(owner);\n const areaText = optional(area);\n const needsText = optional(needs);\n if (ownerText !== undefined) item.owner = ownerText;\n if (areaText !== undefined) item.area = areaText;\n if (needsText !== undefined) item.needs = needsText;\n items.push(item);\n }\n }\n const headings = headingItems(markdown, { ...options, file });\n return headings.length === 0 ? items : [...items, ...headings].sort((a, b) => a.line - b.line);\n}\n\n// ---------------------------------------------------------------------------\n// The board\n// ---------------------------------------------------------------------------\n\n/** The input of `buildStatusBoard`. */\nexport interface StatusBoardInput {\n items: BoardItem[];\n /** The result of `githubOpenWork`. */\n github: GitHubOpenWork;\n /** The roadmap file in the repository, or null without a roadmap. */\n roadmap: string | null;\n /** \"owner/name\" of the repository. */\n repository: string;\n commit?: string | null;\n generatedAt?: string;\n}\n\n/**\n * This function gives the items of a roadmap file, as the Status page reads them. It fails when the file has no item.\n *\n * @throws RoadmapParseError when the cells of a row do not match the header\n * @throws RoadmapParseError when the roadmap has no item: no table with an ID and a Status column, and no item heading\n */\nexport function parseRoadmap(markdown: string, options: LinkOptions = {}): BoardItem[] {\n const { file = \"ROADMAP.md\" } = options;\n const items = roadmapItems(markdown, options);\n if (items.length === 0) throw new RoadmapParseError(`${file}: no table with an ID column and a Status column, and no heading \"### \\`id\\`: Title\"`);\n return items;\n}\n\n/** This function puts the roadmap items and the GitHub part into the shape of `status.json`. */\nexport function buildStatusBoard(input: StatusBoardInput): StatusBoardData {\n const { items, github, roadmap, repository, commit = null, generatedAt = new Date().toISOString() } = input;\n return {\n generatedAt,\n commit,\n source: { roadmap, github: repository },\n items,\n pullRequests: github.available ? github.pullRequests : [],\n issues: github.available ? github.issues : [],\n github: github.available ? { available: true, totals: github.totals } : { available: false, reason: github.reason },\n };\n}\n\n/** The options of `readStatusBoard`. */\nexport interface ReadStatusBoardOptions {\n repoDir: string;\n /** The path of the roadmap file from `repoDir`, with `/`. Without it, the board has only the GitHub part. */\n roadmap?: string | null | undefined;\n owner: string;\n repo: string;\n token: string | undefined;\n /** The commit of the build. The relative links of the roadmap go to it. */\n commit?: string | null | undefined;\n fetch?: typeof fetch | undefined;\n generatedAt?: string | undefined;\n}\n\n/**\n * This function reads the board of a repository on disk: the roadmap file, and the open work on GitHub.\n *\n * @throws RoadmapParseError when the roadmap has an incorrect row, or no item: no table with an ID\n * and a Status column, and no item heading\n */\nexport async function readStatusBoard(options: ReadStatusBoardOptions): Promise<StatusBoardData> {\n const { repoDir, roadmap = null, owner, repo, token, commit = null } = options;\n const repository = `${owner}/${repo}`;\n let items: BoardItem[] = [];\n if (roadmap) {\n const markdown = readFileSync(join(repoDir, ...roadmap.split(\"/\")), \"utf8\");\n items = parseRoadmap(markdown, { file: roadmap, repository, ref: commit ?? \"HEAD\" });\n }\n const github = await githubOpenWork({ owner, repo, token, ...(options.fetch ? { fetch: options.fetch } : {}) });\n return buildStatusBoard({\n items,\n github,\n roadmap: roadmap || null,\n repository,\n commit,\n ...(options.generatedAt ? { generatedAt: options.generatedAt } : {}),\n });\n}\n","/**\n * The standalone releases page: a lead line, a timeline of the versions and the changes of the\n * selected version. The build renders the HTML, and one small inline module adds the interactions.\n */\n\nimport type { Release, ReleaseChange, ReleaseKind } from \"../data/types.ts\";\nimport { longDate, shortDate } from \"./dates.ts\";\nimport { escapeHtml, inlineMarkdown, link, listText, plural } from \"./html.ts\";\nimport { pageShell, type PageOptions } from \"./theme.ts\";\nimport { laneCenter, oldestFirst, releaseSummary, timelineLayout, type TimelineLayout } from \"./timeline.ts\";\n\n/** The changes and the package chips that the page shows before \"Show all\". */\nconst FIRST_CHANGES = 8;\nconst FIRST_CHIPS = 4;\n/** The y of the mark below the center line of its lane. The label is above the line. */\nconst MARK_Y = 9;\n/** The widths of the two timelines: the narrow one for a phone or a tablet, the wide one for a desktop. */\nconst NARROW_WIDTH = 640;\nconst WIDE_WIDTH = 920;\n\nconst KIND_INFO: Record<ReleaseKind, { label: string; word: string; pill: string; legend: string }> = {\n first: { label: \"First release\", word: \"first release\", pill: \"sp-pill sp-good\", legend: \"The first release\" },\n major: { label: \"MAJOR\", word: \"major\", pill: \"sp-pill sp-strong\", legend: \"MAJOR: a change that breaks the API\" },\n minor: { label: \"MINOR\", word: \"minor\", pill: \"sp-pill sp-accent\", legend: \"MINOR: new features (before 1.0.0, also a change of the API)\" },\n patch: { label: \"PATCH\", word: \"patch\", pill: \"sp-pill\", legend: \"PATCH: fixes and small additions\" },\n};\n\n/** This function gives \"Oct 18, 2026\" for an ISO date. */\nfunction dayWithYear(date: string): string {\n return `${shortDate(date)}, ${new Date(date).getUTCFullYear()}`;\n}\n\n/**\n * This function gives the lead line of the releases page, for example \"23 versions from Oct 12 to\n * Oct 18, 2026. 7 MINOR releases and 15 PATCH releases came after the first release.\"\n */\nexport function releasesLead(releases: readonly Release[]): string {\n const summary = releaseSummary(releases);\n if (!summary.first || !summary.last) return \"The repository has no release yet.\";\n const sameYear = new Date(summary.first).getUTCFullYear() === new Date(summary.last).getUTCFullYear();\n const from = sameYear ? shortDate(summary.first) : dayWithYear(summary.first);\n const range = shortDate(summary.first) === shortDate(summary.last) && sameYear ? `on ${dayWithYear(summary.last)}` : `from ${from} to ${dayWithYear(summary.last)}`;\n if (summary.versions === 1) return `1 version, the first release, ${range}.`;\n const kinds = [\n summary.major > 0 ? plural(summary.major, \"MAJOR release\") : \"\",\n summary.minor > 0 ? plural(summary.minor, \"MINOR release\") : \"\",\n summary.patch > 0 ? plural(summary.patch, \"PATCH release\") : \"\",\n ].filter(Boolean);\n return `${plural(summary.versions, \"version\")} ${range}. ${listText(kinds)} came after the first release.`;\n}\n\n/** The shape of a mark. The first release is a diamond, a MAJOR is a large dot, a MINOR is a dot and a PATCH is a ring. */\nfunction markShape(kind: ReleaseKind, y: number): string {\n if (kind === \"first\") return `<rect class=\"sp-dot\" x=\"-5.5\" y=\"${y - 5.5}\" width=\"11\" height=\"11\" transform=\"rotate(45 0 ${y})\"/>`;\n if (kind === \"major\") return `<circle class=\"sp-dot\" cy=\"${y}\" r=\"8\"/>`;\n if (kind === \"minor\") return `<circle class=\"sp-dot\" cy=\"${y}\" r=\"6.5\"/>`;\n return `<circle class=\"sp-ring\" cy=\"${y}\" r=\"4.5\"/>`;\n}\n\nfunction legend(releases: readonly Release[]): string {\n const kinds = ([\"major\", \"minor\", \"patch\", \"first\"] as const).filter((kind) => releases.some((release) => release.kind === kind));\n const items = kinds.map(\n (kind) =>\n `<li><svg width=\"18\" height=\"18\" viewBox=\"-9 -9 18 18\" aria-hidden=\"true\"><g class=\"sp-kind-${kind}\">${markShape(kind, 0)}</g></svg>${escapeHtml(KIND_INFO[kind].legend)}</li>`,\n );\n return `<ul class=\"sp-legend\">${items.join(\"\")}</ul>`;\n}\n\nconst fixed = (value: number): string => value.toFixed(1).replace(/\\.0$/, \"\");\n\nfunction timelineSvg(releases: readonly Release[], width: number, selected: string): string {\n const layout: TimelineLayout<Release> = timelineLayout(releases, { width });\n const { plotTop, plotBottom } = layout;\n const parts: string[] = [];\n for (const band of layout.bands) {\n const middle = (band.x0 + band.x1) / 2;\n const room = band.x1 - band.x0;\n const count = band.empty ? \"no release\" : plural(band.count, \"release\");\n parts.push(`<g${band.empty ? ' class=\"sp-empty-band\"' : \"\"}>`);\n if (band.empty) parts.push(`<rect class=\"sp-gap\" x=\"${fixed(band.x0)}\" y=\"${plotTop}\" width=\"${fixed(room)}\" height=\"${plotBottom - plotTop}\"/>`);\n parts.push(`<line class=\"sp-grid\" x1=\"${fixed(band.x0)}\" x2=\"${fixed(band.x0)}\" y1=\"${plotTop}\" y2=\"${plotBottom + 6}\"/>`);\n if (room >= band.label.length * 7 + 6) {\n parts.push(`<text class=\"sp-day\" x=\"${fixed(middle)}\" y=\"${plotBottom + 21}\" text-anchor=\"middle\">${escapeHtml(band.label)}</text>`);\n }\n if (room >= count.length * 6 + 6) {\n parts.push(`<text class=\"sp-day-count\" x=\"${fixed(middle)}\" y=\"${plotBottom + 38}\" text-anchor=\"middle\">${escapeHtml(count)}</text>`);\n }\n parts.push(\"</g>\");\n }\n const lastBand = layout.bands[layout.bands.length - 1];\n if (lastBand) parts.push(`<line class=\"sp-grid\" x1=\"${fixed(lastBand.x1)}\" x2=\"${fixed(lastBand.x1)}\" y1=\"${plotTop}\" y2=\"${plotBottom + 6}\"/>`);\n parts.push(`<line class=\"sp-axis\" x1=\"${fixed(layout.bands[0]?.x0 ?? 0)}\" x2=\"${fixed(lastBand?.x1 ?? width)}\" y1=\"${plotBottom}\" y2=\"${plotBottom}\"/>`);\n const axis = `<g aria-hidden=\"true\">${parts.join(\"\")}</g>`;\n\n const marks = layout.marks.map((mark) => {\n const { release } = mark;\n const on = release.version === selected;\n const label = `${release.version}, ${KIND_INFO[release.kind].word}, ${shortDate(release.date)}, ${plural(release.changes.length, \"change\")}`;\n return (\n `<g class=\"sp-mark sp-kind-${release.kind}${on ? \" sp-selected\" : \"\"}\" data-sp-mark data-version=\"${escapeHtml(release.version)}\"` +\n ` data-x=\"${fixed(mark.x)}\" data-half=\"${fixed(mark.half)}\" transform=\"translate(${fixed(mark.x)} ${fixed(laneCenter(layout, mark.lane))})\"` +\n ` role=\"button\" tabindex=\"${on ? 0 : -1}\" aria-pressed=\"${on}\" aria-label=\"${escapeHtml(label)}\">` +\n `<rect class=\"sp-hit\" x=\"${fixed(-mark.half - 4)}\" y=\"${fixed(-layout.laneHeight / 2 + 1)}\" width=\"${fixed(mark.half * 2 + 8)}\" height=\"${layout.laneHeight - 2}\" rx=\"4\"/>` +\n `<circle class=\"sp-halo\" cy=\"${MARK_Y}\" r=\"11\"/>${markShape(release.kind, MARK_Y)}` +\n `<text class=\"sp-label\" y=\"-3\" text-anchor=\"middle\">${escapeHtml(release.version)}</text></g>`\n );\n });\n const name = `The release timeline, ${plural(layout.marks.length, \"version\")}. The arrow keys move between the versions.`;\n return (\n `<svg class=\"sp-timeline\" width=\"${layout.width}\" height=\"${layout.height}\" viewBox=\"0 0 ${layout.width} ${layout.height}\" role=\"group\" aria-label=\"${escapeHtml(name)}\">` +\n `${axis}${marks.join(\"\")}</svg>`\n );\n}\n\n/** The common scope of all the package names (\"@procedures/\"), or \"\" when the names have no common scope. */\nfunction commonScope(releases: readonly Release[]): string {\n const names = new Set(releases.flatMap((release) => release.changes.flatMap((change) => change.packages)));\n const scopes = new Set([...names].map((name) => /^(@[^/]+\\/)/.exec(name)?.[1] ?? \"\"));\n const [scope] = scopes;\n return scopes.size === 1 && scope ? scope : \"\";\n}\n\n/** The counter for the IDs of the lists that a button opens. */\ninterface Ids {\n next: number;\n}\n\nfunction toggleButton(ids: string, more: string, less: string, hidden = \"\"): string {\n return (\n `<button type=\"button\" class=\"sp-ghost\" data-sp-js data-sp-toggle aria-controls=\"${ids}\" aria-expanded=\"false\"` +\n ` data-more=\"${escapeHtml(more)}\" data-less=\"${escapeHtml(less)}\"><span data-sp-label>${escapeHtml(more)}</span>${hidden}</button>`\n );\n}\n\nfunction chips(packages: readonly string[], scope: string, ids: Ids): string {\n if (packages.length === 0) return \"\";\n const id = `k${ids.next++}`;\n const items = packages.map((name, index) => {\n const short = scope && name.startsWith(scope) ? name.slice(scope.length) : name;\n const extra = index >= FIRST_CHIPS;\n return `<span class=\"sp-pill${extra ? \" sp-extra\" : \"\"}\" title=\"${escapeHtml(name)}\"${extra ? \" hidden\" : \"\"}>${escapeHtml(short)}</span>`;\n });\n const more = packages.length - FIRST_CHIPS;\n const button = more > 0 ? toggleButton(id, `+${more} more`, \"Fewer\", '<span class=\"sp-visually-hidden\"> packages</span>') : \"\";\n return `<span class=\"sp-chips\" id=\"${id}\">${items.join(\"\")}${button}</span>`;\n}\n\nfunction changeItem(change: ReleaseChange, index: number, repository: string, scope: string, ids: Ids): string {\n const extra = index >= FIRST_CHANGES;\n const commit = change.commit\n ? link(`https://github.com/${repository}/commit/${change.commit}`, `<code>${escapeHtml(change.commit)}</code>`, `class=\"sp-commit\" title=\"${escapeHtml(`Commit ${change.commit} on GitHub`)}\"`)\n : \"\";\n const meta = commit || change.packages.length > 0 ? `<div class=\"sp-change-meta\">${commit}${chips(change.packages, scope, ids)}</div>` : \"\";\n return `<li class=\"sp-change${extra ? \" sp-extra\" : \"\"}\"${extra ? \" hidden\" : \"\"}><p>${inlineMarkdown(change.text)}</p>${meta}</li>`;\n}\n\nfunction details(release: Release, index: number, selected: boolean, repository: string, scope: string, ids: Ids): string {\n const info = KIND_INFO[release.kind];\n const links = release.links.map((each) => link(each.url, escapeHtml(each.label))).join(\"\");\n const head =\n `<div class=\"sp-release-head\"><h2 id=\"h${index}\">${escapeHtml(release.version)}</h2><span class=\"${info.pill}\">${escapeHtml(info.label)}</span>` +\n `<time class=\"sp-small sp-muted\" datetime=\"${escapeHtml(release.date)}\">${escapeHtml(longDate(release.date))}</time>` +\n (links ? `<span class=\"sp-release-links sp-small\">${links}</span>` : \"\") +\n \"</div>\";\n let body: string;\n if (release.changes.length === 0) {\n body = '<p class=\"sp-small sp-muted\">The sources have no change entry for this version.</p>';\n } else {\n const packages = new Set(release.changes.flatMap((change) => change.packages)).size;\n const count = packages > 0\n ? `${plural(release.changes.length, \"change\")} in ${plural(packages, \"package\")}. The changes with the most packages come first.`\n : `${plural(release.changes.length, \"change\")}.`;\n const listId = `c${index}`;\n const items = release.changes.map((change, position) => changeItem(change, position, repository, scope, ids));\n const all = release.changes.length > FIRST_CHANGES ? toggleButton(listId, `Show all ${release.changes.length} changes`, \"Show fewer changes\") : \"\";\n body = `<p class=\"sp-small sp-muted\">${escapeHtml(count)}</p><ul class=\"sp-changes\" id=\"${listId}\">${items.join(\"\")}</ul>${all}`;\n }\n return (\n `<section class=\"sp-panel sp-release\" id=\"v${escapeHtml(release.version)}\" data-sp-release data-version=\"${escapeHtml(release.version)}\"` +\n ` aria-labelledby=\"h${index}\"${selected ? \"\" : \" hidden\"}>${head}${body}</section>`\n );\n}\n\n/**\n * The inline module of the releases page. It selects a version on a click, with the arrow keys,\n * Home, End, Enter and Space. It also opens the long lists and keeps the version in the URL.\n */\nexport const RELEASES_SCRIPT: string = String.raw`\nconst boxes = Array.from(document.querySelectorAll(\"[data-sp-timeline]\"));\nconst panels = new Map(Array.from(document.querySelectorAll(\"[data-sp-release]\"), (panel) => [panel.dataset.version, panel]));\nconst reduced = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\nlet selected = (document.querySelector(\"[data-sp-release]:not([hidden])\") || {}).dataset?.version;\nconst markIn = (box, version) => Array.from(box.querySelectorAll(\"[data-sp-mark]\")).find((mark) => mark.dataset.version === version);\nfunction reveal(box, version, smooth) {\n const mark = markIn(box, version);\n if (!mark || box.scrollWidth <= box.clientWidth) return;\n const x = Number(mark.dataset.x);\n const margin = Number(mark.dataset.half) + 16;\n if (x - margin >= box.scrollLeft && x + margin <= box.scrollLeft + box.clientWidth) return;\n box.scrollTo({ left: x - box.clientWidth / 2, behavior: smooth && !reduced ? \"smooth\" : \"auto\" });\n}\nfunction select(version, box) {\n const panel = panels.get(version);\n if (!panel) return;\n selected = version;\n for (const each of boxes) {\n for (const mark of each.querySelectorAll(\"[data-sp-mark]\")) {\n const on = mark.dataset.version === version;\n mark.classList.toggle(\"sp-selected\", on);\n mark.setAttribute(\"aria-pressed\", String(on));\n mark.setAttribute(\"tabindex\", on ? \"0\" : \"-1\");\n }\n }\n for (const [key, each] of panels) each.hidden = key !== version;\n if (box) {\n const mark = markIn(box, version);\n if (mark) mark.focus({ preventScroll: true });\n reveal(box, version, true);\n }\n try {\n history.replaceState(null, \"\", \"#\" + encodeURIComponent(panel.id));\n } catch {}\n}\nfor (const box of boxes) {\n box.addEventListener(\"click\", (event) => {\n const mark = event.target.closest(\"[data-sp-mark]\");\n if (mark) select(mark.dataset.version, box);\n });\n box.addEventListener(\"keydown\", (event) => {\n const mark = event.target.closest(\"[data-sp-mark]\");\n if (!mark || event.altKey || event.ctrlKey || event.metaKey) return;\n const marks = Array.from(box.querySelectorAll(\"[data-sp-mark]\"));\n const position = marks.indexOf(mark);\n const targets = { ArrowLeft: position - 1, ArrowRight: position + 1, Home: 0, End: marks.length - 1, Enter: position, \" \": position };\n if (!(event.key in targets)) return;\n event.preventDefault();\n const next = marks[Math.max(0, Math.min(marks.length - 1, targets[event.key]))];\n if (next) select(next.dataset.version, box);\n });\n}\ndocument.addEventListener(\"click\", (event) => {\n const button = event.target.closest(\"[data-sp-toggle]\");\n const list = button && document.getElementById(button.getAttribute(\"aria-controls\"));\n if (!list) return;\n const open = button.getAttribute(\"aria-expanded\") !== \"true\";\n for (const extra of list.querySelectorAll(\":scope > .sp-extra\")) extra.hidden = !open;\n button.setAttribute(\"aria-expanded\", String(open));\n const label = button.querySelector(\"[data-sp-label]\");\n if (label) label.textContent = open ? button.dataset.less : button.dataset.more;\n});\n// A malformed hash, for example \"#100%\", must not stop the module\nlet hashed = \"\";\ntry {\n hashed = decodeURIComponent(location.hash.slice(1));\n} catch {}\nfor (const [version, panel] of panels) if (panel.id === hashed) select(version, null);\nconst revealAll = () => { for (const box of boxes) reveal(box, selected, false); };\nrevealAll();\nwindow.addEventListener(\"resize\", revealAll);\n`;\n\n/** This function renders the complete releases page from the data of `releases.json`. */\nexport function renderReleasesPage(releases: readonly Release[], options: PageOptions): string {\n const newest = releases[0];\n const ordered = oldestFirst(releases);\n const scope = commonScope(releases);\n const ids: Ids = { next: 0 };\n const lead = `<p class=\"sp-lead\">${escapeHtml(releasesLead(releases))}</p>`;\n let content = \"\";\n if (newest) {\n content =\n `<div class=\"sp-panel\"><p class=\"sp-small sp-muted\">Each mark is one version, on a time axis in UTC. Select a mark to show its changes.</p>` +\n legend(releases) +\n `<div class=\"sp-timeline-box sp-timeline-narrow\" data-sp-timeline>${timelineSvg(ordered, NARROW_WIDTH, newest.version)}</div>` +\n `<div class=\"sp-timeline-box sp-timeline-wide\" data-sp-timeline>${timelineSvg(ordered, WIDE_WIDTH, newest.version)}</div></div>` +\n releases.map((release, index) => details(release, index, index === 0, options.repository, scope, ids)).join(\"\");\n }\n const source =\n '<p class=\"sp-small sp-muted\">Source: the <code>CHANGELOG.md</code> files, the git tags, the GitHub releases and npm, read when the site was built.</p>';\n return pageShell(\n {\n title: \"Releases\",\n description: releasesLead(releases),\n current: \"releases\",\n main: `<h1>Releases</h1>${lead}${content}${source}`,\n script: RELEASES_SCRIPT,\n },\n options,\n );\n}\n","/**\n * The standalone status page: the open work of the roadmap file, the open pull requests and the\n * open issues. The build renders the HTML, and one small inline module adds the filters.\n */\n\nimport { OPEN_CLASSES } from \"../data/status.ts\";\nimport type { BoardItem, CheckState, KpiMeasure, StatusBoardData, StatusClass } from \"../data/types.ts\";\nimport { longDate, shortDate } from \"./dates.ts\";\nimport { escapeHtml, inlineMarkdown, link, listText, plural } from \"./html.ts\";\nimport { pageShell, type PageOptions } from \"./theme.ts\";\n\n/** The label, the icon and the meaning of each class. The page always shows a color with an icon and a label. */\nconst CLASS_INFO: Record<StatusClass, { label: string; icon: string; meaning: string }> = {\n waiting: { label: \"Waiting\", icon: \"◷\", meaning: \"It waits for a person or a decision\" },\n blocked: { label: \"Blocked\", icon: \"⊘\", meaning: \"Other work must finish first\" },\n progress: { label: \"In progress\", icon: \"◐\", meaning: \"Work started\" },\n open: { label: \"Open\", icon: \"○\", meaning: \"Nobody started it\" },\n later: { label: \"Later\", icon: \"◌\", meaning: \"It is for later\" },\n done: { label: \"Done\", icon: \"✓\", meaning: \"It is finished\" },\n};\n\nconst CHECK_LABEL: Record<CheckState, string> = {\n success: \"Checks pass\",\n failure: \"Checks fail\",\n pending: \"Checks run\",\n none: \"No checks\",\n};\n\n/**\n * This function gives the lead line of the status page, for example \"12 open roadmap items, 9 open\n * pull requests and 0 open issues, read at Oct 19, 2026, 14:05 UTC from abc1234.\"\n */\nexport function statusLead(data: StatusBoardData): string {\n const parts: string[] = [];\n if (data.source.roadmap) parts.push(plural(data.items.filter((item) => item.statusClass !== \"done\").length, \"open roadmap item\"));\n if (data.github.available) {\n parts.push(plural(data.github.totals?.pullRequests ?? data.pullRequests.length, \"open pull request\"));\n parts.push(plural(data.github.totals?.issues ?? data.issues.length, \"open issue\"));\n }\n const commit = data.commit ? data.commit.slice(0, 7) : null;\n const read = `read at ${longDate(data.generatedAt)}${commit ? ` from ${commit}` : \"\"}`;\n const line = parts.length > 0 ? `${listText(parts)}, ${read}.` : `Read at ${read.slice(\"read at \".length)}.`;\n return data.github.available ? line : `${line} The build could not read GitHub.`;\n}\n\n/** This function gives the part of a URL for a text: \"The server stack (R37)\" gives \"the-server-stack-r37\". */\nexport function slugOf(text: string): string {\n return (\n text\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n // After the line above, no two hyphens are next to each other. \"-+$\" backtracks, and \"-$\" does not.\n .replace(/^-|-$/g, \"\") || \"other\"\n );\n}\n\n/** A section of the roadmap, with the count of its open items and of its done items. */\nexport interface BoardSection {\n slug: string;\n label: string;\n open: number;\n done: number;\n}\n\n/** This function gives the sections of the items, in the sequence of the file. */\nexport function sectionsOf(items: readonly BoardItem[]): BoardSection[] {\n const sections = new Map<string, BoardSection>();\n for (const item of items) {\n const slug = slugOf(item.section);\n const section = sections.get(slug) ?? { slug, label: item.section || \"Other\", open: 0, done: 0 };\n if (item.statusClass === \"done\") section.done++;\n else section.open++;\n sections.set(slug, section);\n }\n return [...sections.values()];\n}\n\n/** A group of items with one class. */\nexport interface ItemGroup {\n statusClass: StatusClass;\n items: BoardItem[];\n}\n\n/** This function gives the groups of the open items in the sequence of `OPEN_CLASSES`, without the empty groups. */\nexport function openGroups(items: readonly BoardItem[]): ItemGroup[] {\n return OPEN_CLASSES.map((statusClass) => ({ statusClass, items: items.filter((item) => item.statusClass === statusClass) })).filter(\n (group) => group.items.length > 0,\n );\n}\n\n/** This function counts the items of each class. */\nexport function classCounts(items: readonly BoardItem[]): Record<StatusClass, number> {\n const counts: Record<StatusClass, number> = { waiting: 0, blocked: 0, progress: 0, open: 0, later: 0, done: 0 };\n for (const item of items) counts[item.statusClass]++;\n return counts;\n}\n\nfunction roadmapUrl(data: StatusBoardData): string {\n return `https://github.com/${data.source.github}/blob/${data.commit ?? \"HEAD\"}/${data.source.roadmap ?? \"\"}`;\n}\n\nfunction meter(items: readonly BoardItem[]): string {\n const counts = classCounts(items);\n const order: StatusClass[] = [\"done\", ...OPEN_CLASSES];\n const present = order.filter((value) => counts[value] > 0);\n const total = Math.max(1, items.length);\n const summary = present.map((value) => `${counts[value]} ${CLASS_INFO[value].label.toLowerCase()}`).join(\", \");\n const parts = present.map((value) => `<span class=\"sp-c-${value}\" style=\"flex-grow:${(counts[value] / total).toFixed(4)}\"></span>`);\n const legend = present.map(\n (value) => `<li class=\"sp-c-${value}\"><span class=\"sp-swatch\"></span>${CLASS_INFO[value].label} <strong>${counts[value]}</strong></li>`,\n );\n return (\n `<div class=\"sp-meter\" role=\"img\" aria-label=\"${escapeHtml(`${plural(items.length, \"item\")} of the roadmap: ${summary}`)}\">${parts.join(\"\")}</div>` +\n `<ul class=\"sp-meter-legend\" aria-hidden=\"true\">${legend.join(\"\")}</ul>`\n );\n}\n\nfunction itemTable(items: readonly BoardItem[], data: StatusBoardData, columns: { owner: boolean; links: boolean }): string {\n const fileUrl = roadmapUrl(data);\n const none = '<span class=\"sp-muted\">—</span>';\n const rows = items.map((item) => {\n const meta = [escapeHtml(item.section), item.area ? inlineMarkdown(item.area) : \"\", item.needs ? `needs ${inlineMarkdown(item.needs)}` : \"\"]\n .filter(Boolean)\n .join(\" · \");\n const links = item.links.length > 0 ? `<span class=\"sp-links\">${item.links.map((each) => link(each.url, escapeHtml(each.label))).join(\"\")}</span>` : none;\n return (\n `<tr class=\"sp-c-${item.statusClass}\" data-section=\"${escapeHtml(slugOf(item.section))}\">` +\n `<th scope=\"row\">${link(`${fileUrl}?plain=1#L${item.line}`, escapeHtml(item.id), `title=\"${escapeHtml(`The row of ${item.id} in the roadmap file`)}\"`)}</th>` +\n `<td data-label=\"Item\" class=\"sp-item\"><span>${item.title ? inlineMarkdown(item.title) : '<span class=\"sp-muted\">No title</span>'}</span>` +\n `<span class=\"sp-item-meta sp-small sp-muted\">${meta}</span></td>` +\n // One element in each cell: on a phone, the cell is a grid of its label and its content\n (columns.owner ? `<td data-label=\"Owner\">${item.owner ? `<span>${inlineMarkdown(item.owner)}</span>` : none}</td>` : \"\") +\n `<td data-label=\"Status\"><span class=\"sp-status\"><span aria-hidden=\"true\">${CLASS_INFO[item.statusClass].icon}</span> ` +\n `${inlineMarkdown(item.status || CLASS_INFO[item.statusClass].label)}</span></td>` +\n (columns.links ? `<td data-label=\"Links\">${links}</td>` : \"\") +\n \"</tr>\"\n );\n });\n const head =\n '<thead><tr><th scope=\"col\">ID</th><th scope=\"col\">Item</th>' +\n (columns.owner ? '<th scope=\"col\">Owner</th>' : \"\") +\n '<th scope=\"col\">Status</th>' +\n (columns.links ? '<th scope=\"col\">Links</th>' : \"\") +\n \"</tr></thead>\";\n return `<div class=\"sp-table-box\"><table class=\"sp-table\">${head}<tbody>${rows.join(\"\")}</tbody></table></div>`;\n}\n\nfunction openWork(data: StatusBoardData): string {\n const items = data.items;\n const open = items.filter((item) => item.statusClass !== \"done\");\n const done = items.filter((item) => item.statusClass === \"done\");\n const counts = classCounts(items);\n const columns = { owner: items.some((item) => item.owner), links: items.some((item) => item.links.length > 0) };\n const file = (data.source.roadmap ?? \"\").split(\"/\").pop() ?? \"\";\n const classChips = OPEN_CLASSES.map(\n (value) =>\n `<button type=\"button\" class=\"sp-chip sp-c-${value}\" data-sp-class=\"${value}\" aria-pressed=\"false\" title=\"${escapeHtml(CLASS_INFO[value].meaning)}\">` +\n `<span aria-hidden=\"true\">${CLASS_INFO[value].icon}</span> ${CLASS_INFO[value].label} <span class=\"sp-count\">${counts[value]}</span></button>`,\n );\n const sectionChips = sectionsOf(items)\n .filter((section) => section.open > 0)\n .map(\n (section) =>\n `<button type=\"button\" class=\"sp-chip\" data-sp-section=\"${escapeHtml(section.slug)}\" aria-pressed=\"false\">` +\n `${escapeHtml(section.label)} <span class=\"sp-count\">${section.open}</span></button>`,\n );\n const filters =\n `<div class=\"sp-filters\" role=\"group\" aria-label=\"Filters of the open work\" data-sp-js>` +\n `<span role=\"group\" aria-label=\"Status of the items\">${classChips.join(\"\")}</span>` +\n (sectionChips.length > 1 ? `<span role=\"group\" aria-label=\"Section of the roadmap\">${sectionChips.join(\"\")}</span>` : \"\") +\n `<button type=\"button\" class=\"sp-ghost\" data-sp-clear hidden>Clear the filters</button></div>`;\n const label = plural(open.length, \"open item\");\n const groups = openGroups(items).map(\n (group) =>\n `<section class=\"sp-group sp-c-${group.statusClass}\" data-sp-group data-class=\"${group.statusClass}\" aria-labelledby=\"group-${group.statusClass}\">` +\n `<h3 id=\"group-${group.statusClass}\"><span aria-hidden=\"true\">${CLASS_INFO[group.statusClass].icon}</span> ${CLASS_INFO[group.statusClass].label} ` +\n `<span class=\"sp-group-count\" data-sp-group-count>${group.items.length}</span></h3>${itemTable(group.items, data, columns)}</section>`,\n );\n const list =\n open.length === 0\n ? '<p class=\"sp-callout\">The roadmap has no open item.</p>'\n : `<p class=\"sp-small sp-muted\" aria-live=\"polite\" data-sp-shown data-label=\"${escapeHtml(label)}\">${open.length} of ${escapeHtml(label)}</p>` +\n groups.join(\"\") +\n '<p class=\"sp-callout\" data-sp-empty hidden>No open item matches the filters.</p>';\n const doneText = done.length === 1 ? \"1 item is done.\" : `${done.length} items are done.`;\n const doneList =\n done.length === 0\n ? `<p class=\"sp-done sp-small\"><span aria-hidden=\"true\">✓</span> No item is done.</p>`\n : `<details class=\"sp-done sp-c-done\" data-sp-done><summary><span aria-hidden=\"true\">✓</span> ${doneText} ` +\n `<span data-sp-done-label>Show the done items</span></summary>` +\n `<section class=\"sp-group sp-c-done\" data-sp-group data-class=\"done\" aria-label=\"The done items\">${itemTable(done, data, columns)}` +\n '<p class=\"sp-callout\" data-sp-done-empty hidden>No done item matches the filters.</p></section></details>';\n return (\n `<section class=\"sp-section\" aria-labelledby=\"open-work\" data-sp-board><h2 id=\"open-work\">Open work</h2>` +\n `<p class=\"sp-small sp-muted\">Each row of a table of ${link(roadmapUrl(data), `<code>${escapeHtml(file)}</code>`)} with an ID and a status that is not done. ` +\n \"The build reads the file, so this list follows each commit.</p>\" +\n meter(items) +\n (open.length > 0 ? filters : \"\") +\n list +\n doneList +\n \"</section>\"\n );\n}\n\n/**\n * This function renders the measures of `kpi.json`: their values, the date of the data and the engines that made it.\n * A measure with its own date shows that date in a column, so that the line above the table stays true.\n * A measure that names what it does not count shows that text under the table.\n * A measure with targets shows its next target with its unit: the first target on or after the date of its data.\n * Without such a target, the cell shows the last target with the word \"(past)\".\n */\nfunction measures(data: StatusBoardData): string {\n const { kpi } = data;\n if (kpi === undefined) return \"\";\n const ownDates = kpi.measures.some((measure) => measure.at !== undefined);\n const anyTargets = kpi.measures.some((measure) => measure.targets !== undefined);\n const dateCell = (at: string): string => (ownDates ? `<td><time datetime=\"${escapeHtml(at)}\">${escapeHtml(longDate(at))}</time></td>` : \"\");\n const targetCell = (measure: KpiMeasure, at: string): string => {\n if (!anyTargets) return \"\";\n const targets = measure.targets ?? [];\n const next = targets.find((target) => target.by >= at.slice(0, 10)) ?? targets.at(-1);\n if (next === undefined) return \"<td></td>\";\n const day = `${shortDate(next.by)}, ${next.by.slice(0, 4)}`;\n const unit = measure.unit === undefined ? \"\" : ` ${escapeHtml(measure.unit)}`;\n const past = next.by < at.slice(0, 10) ? \" (past)\" : \"\";\n return `<td>${next.value}${unit} by <time datetime=\"${escapeHtml(next.by)}\">${escapeHtml(day)}</time>${past}</td>`;\n };\n const rows = kpi.measures\n .map((measure) => {\n const at = measure.at ?? kpi.at;\n return `<tr><th scope=\"row\">${escapeHtml(measure.id)}</th><td>${measure.value}${measure.unit === undefined ? \"\" : ` ${escapeHtml(measure.unit)}`}</td>${targetCell(measure, at)}${dateCell(at)}</tr>`;\n })\n .join(\"\");\n const limits = kpi.measures\n .filter((measure) => measure.notCounted !== undefined)\n .map((measure) => `<p><code>${escapeHtml(measure.id)}</code> does not count: ${escapeHtml(measure.notCounted ?? \"\")}</p>`)\n .join(\"\");\n const engines = kpi.engines ?? [];\n const commit = link(`https://github.com/${data.source.github}/commit/${kpi.commit}`, `<code>${kpi.commit.slice(0, 7)}</code>`);\n return (\n `<section class=\"sp-section\" aria-labelledby=\"measures\"><h2 id=\"measures\">Measures</h2>` +\n `<p>${ownDates ? \"The data date of the file is\" : \"The data of these numbers is from\"} <time datetime=\"${escapeHtml(kpi.at)}\" data-sp-data-date>${escapeHtml(longDate(kpi.at))}</time>. The build of ${commit} published them.</p>` +\n (engines.length > 0 ? `<p>The engines of the data: ${listText(engines.map((engine) => `<code>${escapeHtml(engine.name)}</code> ${escapeHtml(engine.version)}`))}.</p>` : \"\") +\n `<div class=\"sp-table-box\" tabindex=\"0\" role=\"region\" aria-label=\"Measures\"><table class=\"sp-table\"><thead><tr><th scope=\"col\">Measure</th><th scope=\"col\">Value</th>${anyTargets ? '<th scope=\"col\">Next target</th>' : \"\"}${ownDates ? '<th scope=\"col\">Data date</th>' : \"\"}</tr></thead><tbody>${rows}</tbody></table></div>` +\n limits +\n \"</section>\"\n );\n}\n\n/**\n * This function renders the reading of the changelogs. It shows the count of the version sections that break\n * the rules, and the version that the gate starts from. A repository with no gate sees its count, so the gap stays in view.\n */\nfunction changelog(data: StatusBoardData): string {\n const { changelog: reading } = data;\n if (reading === undefined) return \"\";\n const count = reading.faults.length;\n const scope = reading.from === null ? `of the ${plural(reading.sections, \"version section\")} of the changelogs` : `of the ${plural(reading.sections, \"version section\")} from ${escapeHtml(reading.from)}`;\n const gate =\n reading.from === null\n ? \"The build does not fail on a fault, because <code>package.json</code> has no field <code>sitePages.changelogFrom</code>.\"\n : `The build fails on a fault in a section from ${escapeHtml(reading.from)}, the field <code>sitePages.changelogFrom</code> of <code>package.json</code>.`;\n const shown = reading.faults.slice(0, 10);\n const list =\n shown.length === 0\n ? \"\"\n : `<ul>${shown.map((fault) => `<li><code>${escapeHtml(fault.file)}</code> ${escapeHtml(fault.version)}: ${escapeHtml(fault.kind)}</li>`).join(\"\")}</ul>` +\n (count > shown.length ? `<p class=\"sp-small sp-muted\">The list shows the first ${shown.length}.</p>` : \"\");\n return (\n `<section class=\"sp-section\" aria-labelledby=\"changelog\"><h2 id=\"changelog\">Changelog</h2>` +\n `<p data-sp-changelog-faults=\"${count}\">${count === 0 ? \"No section\" : plural(count, \"section\")} ${scope} ${count <= 1 ? \"breaks\" : \"break\"} the rules of a changelog section. ${gate}</p>` +\n list +\n \"</section>\"\n );\n}\n\nfunction when(date: string): string {\n const text = escapeHtml(longDate(date));\n return `<time datetime=\"${escapeHtml(date)}\" title=\"${text}\" data-sp-rel>${text}</time>`;\n}\n\nfunction labels(names: readonly string[]): string {\n return names.length === 0 ? \"\" : `<span class=\"sp-labels\">${names.map((name) => `<span class=\"sp-pill\">${escapeHtml(name)}</span>`).join(\"\")}</span>`;\n}\n\nfunction githubMissing(data: StatusBoardData): string {\n const reason = data.github.reason ? ` (${escapeHtml(data.github.reason)})` : \"\";\n return `<p class=\"sp-callout\">The build could not read GitHub${reason}. Refer to ${link(`https://github.com/${data.source.github}`, escapeHtml(data.source.github))} on GitHub.</p>`;\n}\n\nfunction pullRequests(data: StatusBoardData): string {\n const total = data.github.totals?.pullRequests ?? data.pullRequests.length;\n let body: string;\n if (!data.github.available) body = githubMissing(data);\n else if (data.pullRequests.length === 0) {\n body = `<p class=\"sp-callout\">No pull request is open. Refer to ${link(`https://github.com/${data.source.github}/pulls?q=is%3Apr`, \"all the pull requests\")}.</p>`;\n } else {\n const count =\n total > data.pullRequests.length\n ? `The ${data.pullRequests.length} most recently updated of ${plural(total, \"open pull request\")}.`\n : `${plural(total, \"open pull request\")}, the most recently updated first.`;\n const cards = data.pullRequests.map(\n (pull) =>\n `<li class=\"sp-card\">${link(pull.url, `<span class=\"sp-number\">#${pull.number}</span> ${escapeHtml(pull.title)}`, 'class=\"sp-card-title\"')}` +\n `<span class=\"sp-card-meta\"><span class=\"sp-pill${pull.draft ? \"\" : \" sp-accent\"}\">${pull.draft ? \"Draft\" : \"Ready\"}</span>` +\n `<span class=\"sp-check sp-check-${pull.checks}\"><span class=\"sp-dot-state\" aria-hidden=\"true\"></span>${CHECK_LABEL[pull.checks]}</span>` +\n `<span>by ${escapeHtml(pull.author)}</span><code class=\"sp-branch\">${escapeHtml(pull.branch)}</code>` +\n `<span class=\"sp-muted\">updated ${when(pull.updatedAt)}</span>${labels(pull.labels)}</span></li>`,\n );\n body = `<p class=\"sp-small sp-muted\">${escapeHtml(count)}</p><ul class=\"sp-cards\">${cards.join(\"\")}</ul>`;\n }\n return `<section class=\"sp-section\" aria-labelledby=\"pull-requests\"><h2 id=\"pull-requests\">Pull requests</h2>${body}</section>`;\n}\n\nfunction issues(data: StatusBoardData): string {\n const total = data.github.totals?.issues ?? data.issues.length;\n let body: string;\n if (!data.github.available) body = githubMissing(data);\n else if (data.issues.length === 0) {\n body = `<p class=\"sp-callout\">No issue is open. To report a problem, ${link(`https://github.com/${data.source.github}/issues/new`, \"open an issue\")}.</p>`;\n } else {\n const count =\n total > data.issues.length\n ? `The ${data.issues.length} most recently updated of ${plural(total, \"open issue\")}.`\n : `${plural(total, \"open issue\")}, the most recently updated first.`;\n const cards = data.issues.map(\n (issue) =>\n `<li class=\"sp-card\">${link(issue.url, `<span class=\"sp-number\">#${issue.number}</span> ${escapeHtml(issue.title)}`, 'class=\"sp-card-title\"')}` +\n `<span class=\"sp-card-meta\"><span>by ${escapeHtml(issue.author)}</span>` +\n `<span class=\"sp-muted\">updated ${when(issue.updatedAt)}</span>${labels(issue.labels)}</span></li>`,\n );\n body = `<p class=\"sp-small sp-muted\">${escapeHtml(count)}</p><ul class=\"sp-cards\">${cards.join(\"\")}</ul>`;\n }\n return `<section class=\"sp-section\" aria-labelledby=\"issues\"><h2 id=\"issues\">Issues</h2>${body}</section>`;\n}\n\n/** The pure helpers of the inline module of the status page. A test reads them from this text. */\nexport const STATUS_SCRIPT_HELPERS: string = String.raw`\nfunction relativeTime(then, now) {\n const seconds = Math.round((now - then) / 1000);\n if (!Number.isFinite(seconds)) return \"at an unknown time\";\n if (seconds < 60) return \"just now\";\n const steps = [[60, \"minute\"], [3600, \"hour\"], [86400, \"day\"], [2592000, \"month\"], [31536000, \"year\"]];\n let unit = steps[0];\n for (const step of steps) if (seconds >= step[0]) unit = step;\n const count = Math.floor(seconds / unit[0]);\n return count + \" \" + unit[1] + (count === 1 ? \"\" : \"s\") + \" ago\";\n}\nfunction listOf(text) {\n return (text || \"\").split(\",\").filter((part) => part !== \"\");\n}\n`;\n\n/**\n * The inline module of the status page. It filters the open work by class and by section, keeps the\n * filters in the URL, and shows the age of each GitHub time.\n */\nexport const STATUS_SCRIPT: string =\n STATUS_SCRIPT_HELPERS +\n String.raw`\nconst now = Date.now();\nfor (const time of document.querySelectorAll(\"time[data-sp-rel]\")) {\n time.textContent = relativeTime(Date.parse(time.dateTime), now) + \" (\" + time.title + \")\";\n}\nconst board = document.querySelector(\"[data-sp-board]\");\nif (board) {\n const classChips = Array.from(board.querySelectorAll(\"[data-sp-class]\"));\n const sectionChips = Array.from(board.querySelectorAll(\"[data-sp-section]\"));\n const groups = Array.from(board.querySelectorAll(\"[data-sp-group]\"));\n const shown = board.querySelector(\"[data-sp-shown]\");\n const empty = board.querySelector(\"[data-sp-empty]\");\n const clear = board.querySelector(\"[data-sp-clear]\");\n const done = board.querySelector(\"[data-sp-done]\");\n const query = new URLSearchParams(location.search);\n const state = {\n classes: listOf(query.get(\"status\")).filter((value) => classChips.some((chip) => chip.dataset.spClass === value)),\n sections: listOf(query.get(\"section\")),\n };\n if (done && query.get(\"done\") === \"1\") done.open = true;\n const apply = (write) => {\n for (const chip of classChips) chip.setAttribute(\"aria-pressed\", String(state.classes.includes(chip.dataset.spClass)));\n for (const chip of sectionChips) chip.setAttribute(\"aria-pressed\", String(state.sections.includes(chip.dataset.spSection)));\n let count = 0;\n for (const group of groups) {\n const isDone = group.dataset.class === \"done\";\n const classOn = isDone || state.classes.length === 0 || state.classes.includes(group.dataset.class);\n let visible = 0;\n for (const row of group.querySelectorAll(\"tr[data-section]\")) {\n const on = classOn && (state.sections.length === 0 || state.sections.includes(row.dataset.section));\n row.hidden = !on;\n if (on) visible++;\n }\n if (isDone) {\n const none = group.querySelector(\"[data-sp-done-empty]\");\n if (none) none.hidden = visible > 0;\n } else {\n group.hidden = visible === 0;\n const badge = group.querySelector(\"[data-sp-group-count]\");\n if (badge) badge.textContent = String(visible);\n count += visible;\n }\n }\n if (shown) shown.textContent = count + \" of \" + shown.dataset.label;\n if (empty) empty.hidden = count > 0;\n if (clear) clear.hidden = state.classes.length === 0 && state.sections.length === 0;\n if (done) {\n const label = done.querySelector(\"[data-sp-done-label]\");\n if (label) label.textContent = done.open ? \"Hide the done items\" : \"Show the done items\";\n }\n if (!write) return;\n const next = new URLSearchParams(location.search);\n const put = (key, value) => (value ? next.set(key, value) : next.delete(key));\n put(\"status\", state.classes.join(\",\"));\n put(\"section\", state.sections.join(\",\"));\n put(\"done\", done && done.open ? \"1\" : \"\");\n const search = next.toString();\n try {\n history.replaceState(null, \"\", location.pathname + (search ? \"?\" + search : \"\") + location.hash);\n } catch {}\n };\n const toggle = (list, value) => (list.includes(value) ? list.filter((each) => each !== value) : list.concat(value));\n board.addEventListener(\"click\", (event) => {\n const chip = event.target.closest(\"button\");\n if (!chip) return;\n if (chip.dataset.spClass) state.classes = toggle(state.classes, chip.dataset.spClass);\n else if (chip.dataset.spSection) state.sections = toggle(state.sections, chip.dataset.spSection);\n else if (chip.hasAttribute(\"data-sp-clear\")) {\n state.classes = [];\n state.sections = [];\n } else return;\n apply(true);\n });\n if (done) done.addEventListener(\"toggle\", () => apply(true));\n apply(false);\n}\n`;\n\n/** This function renders the complete status page from the data of `status.json`. */\nexport function renderStatusPage(data: StatusBoardData, options: PageOptions): string {\n const lead = statusLead(data);\n const main =\n `<h1>Status</h1><p class=\"sp-lead\">${escapeHtml(lead)}</p>` +\n '<p class=\"sp-small sp-muted\">The build reads the roadmap file and GitHub again after each commit and on a schedule.</p>' +\n measures(data) +\n changelog(data) +\n (data.source.roadmap ? openWork(data) : \"\") +\n pullRequests(data) +\n issues(data);\n return pageShell({ title: \"Status\", description: lead, current: \"status\", main, script: STATUS_SCRIPT }, options);\n}\n","/**\n * The freshness gate of a measured page. A site keeps a file of data stamps.\n * Each stamp names the page, its runs, their dates and their engine versions.\n * The gate fails on a page with no versions or no run date, and on old data with no newer run in flight.\n * The gate also fails on a run that started behind the engines on npm.\n * A study has an age limit and a scheduled workflow, or it says why it needs no limit. A page with a longer limit names the reason and the workflow.\n * This file imports only Node.js and the folder `data`, so `reusable-pages.yml` starts it with no npm release of the package.\n */\n\nimport { readFileSync } from \"node:fs\";\nimport { isAbsolute, join } from \"node:path\";\nimport { parseArgs } from \"node:util\";\nimport { npmPublishTimes } from \"../data/npm.ts\";\nimport type { NpmVersionTime } from \"../data/types.ts\";\nimport { compareVersions, parseVersion } from \"../data/versions.ts\";\nimport type { CheckIo } from \"./check.ts\";\n\n/** The schema of a file of data stamps. */\nexport const DATA_STAMP_SCHEMA = \"data-stamp/1\";\n\n/** The largest age of the data of a page, in days, when no newer run is in flight. */\nexport const MAX_DATA_AGE_DAYS = 3;\n\n/** The most minor versions that an engine of a run can be behind npm at the start of the run. */\nexport const MAX_MINORS_BEHIND = 1;\n\n/** The longest limit of a page, in days, with no ruling for that site. */\nexport const MAX_LIMIT_DAYS_WITHOUT_RULING = 14;\n\n/** The longest limit of a study, in days, also with a ruling. A study over `MAX_LIMIT_DAYS_WITHOUT_RULING` also needs a ruling. */\nexport const MAX_STUDY_LIMIT_DAYS = 30;\n\n/** The last time at which a limit can start. A limit turns on at this time if its site did not turn it on before. */\nexport const LAST_LIMIT_START = \"2026-12-07T00:00:00Z\";\n\nconst DAY_MS = 86_400_000;\n\n/** The form of a full commit. */\nconst FULL_COMMIT = /^[0-9a-f]{40}$/;\n\n/** One run that gives the data of a page. */\nexport interface DataRun {\n readonly id: string;\n readonly url: string;\n /** The ISO time of the start of the run. */\n readonly date: string;\n /** The version of each engine of the run, by its npm name. */\n readonly engines: Readonly<Record<string, string>>;\n /** The words for data that no CI run made, for example `lab run` or `hand count`. The page shows them in place of `run`. */\n readonly method?: string;\n /** The full commit of the code that ran. It is not the commit that added a copy of the data. A study with a limit in force needs it. */\n readonly commit?: string;\n}\n\n/** The age limit of one page, in place of `MAX_DATA_AGE_DAYS`. */\nexport interface DataLimit {\n /** The largest age of the data, in days. */\n readonly days: number;\n /** The reason for the limit, as one sentence. The page shows it. */\n readonly reason: string;\n /** The path of the workflow from the root of the repository. Its schedule must meet the limit. */\n readonly workflow: string;\n /** The link to the public ruling. A limit over `MAX_LIMIT_DAYS_WITHOUT_RULING` needs it. */\n readonly ruling?: string;\n /** The ISO time at which the age rule and the commit rule start, at most `LAST_LIMIT_START`. A site removes this field at the first green read of its workflow. */\n readonly startsAt?: string;\n}\n\n/** The two statements of a study with no age limit. The page shows both. */\nexport interface NoAgeLimit {\n /** The reason that no run of the current code can reproduce the numbers. */\n readonly reproduce: string;\n /** The reason that the page claims nothing about today. */\n readonly today: string;\n}\n\n/** The stamp of one measured page. */\nexport interface PageStamp {\n readonly page: string;\n /** Each run that gives data to the page. */\n readonly runs: readonly DataRun[];\n /** The run on newer engines that is in progress. */\n readonly inFlight?: DataRun;\n /** The page shows a study of the versions of its runs. A study has a `limit` or the field `noLimit`, and the rule of the engines does not apply to it. */\n readonly study?: true;\n /** The age limit of this page, in place of the default. */\n readonly limit?: DataLimit;\n /** The statements of a study with no age limit. */\n readonly noLimit?: NoAgeLimit;\n}\n\n/** The content of a file of data stamps. */\nexport interface DataStamps {\n readonly schema: typeof DATA_STAMP_SCHEMA;\n readonly pages: readonly PageStamp[];\n}\n\n/** The result of `parseDataStamps`. */\nexport type DataStampsParse = { readonly ok: true; readonly stamps: DataStamps } | { readonly ok: false; readonly faults: readonly string[] };\n\n/** The options of `checkFreshness`. */\nexport interface FreshnessOptions {\n /** The ISO time of the check. */\n readonly now: string;\n /** The publication times of the engines on npm. */\n readonly times: readonly NpmVersionTime[];\n /** The limit of the age. The default is `MAX_DATA_AGE_DAYS`. */\n readonly maxAgeDays?: number;\n /** The limit of the minor versions. The default is `MAX_MINORS_BEHIND`. */\n readonly maxMinorsBehind?: number;\n /** The schedule of each workflow of a limit. A number is the largest gap between its starts in days. A text tells why the gate cannot read it. */\n readonly schedules?: Readonly<Record<string, number | string>>;\n}\n\n/** The result of `checkFreshness`. */\nexport interface FreshnessCheck {\n /** Each break of a rule. One fault fails the gate. */\n readonly faults: readonly string[];\n /** Each rule that the gate could not run, with the reason. */\n readonly notRun: readonly string[];\n}\n\nconst record = (value: unknown): Record<string, unknown> | null => (value !== null && typeof value === \"object\" && !Array.isArray(value) ? (value as Record<string, unknown>) : null);\n\n/** The form of a two-part image tag, for example `7.4`. A fixed study can name it, because no check compares the versions of a study. */\nconst IMAGE_TAG = /^\\d+\\.\\d+$/;\n\n/** This function gives the faults of one run of a stamp. */\nfunction runFaults(raw: unknown, at: string, study = false): string[] {\n const run = record(raw);\n if (run === null) return [`${at}: a run is not an object.`];\n const faults: string[] = [];\n if (typeof run[\"id\"] !== \"string\" || run[\"id\"] === \"\") faults.push(`${at}: a run has no id.`);\n const label = `${at}, run ${String(run[\"id\"])}`;\n if (typeof run[\"url\"] !== \"string\" || !run[\"url\"].startsWith(\"https://\")) faults.push(`${label}: the run has no https link.`);\n if (typeof run[\"date\"] !== \"string\" || !Number.isFinite(Date.parse(run[\"date\"]))) faults.push(`${label}: the run has no date.`);\n if (run[\"method\"] !== undefined && (typeof run[\"method\"] !== \"string\" || run[\"method\"].trim() === \"\")) faults.push(`${label}: the method of the run is not text.`);\n if (run[\"commit\"] !== undefined && (typeof run[\"commit\"] !== \"string\" || !FULL_COMMIT.test(run[\"commit\"]))) faults.push(`${label}: the commit of the run is not a full commit.`);\n const engines = record(run[\"engines\"]);\n if (engines === null || Object.keys(engines).length === 0) return [...faults, `${label}: the run names no engine versions.`];\n for (const [name, version] of Object.entries(engines)) {\n const known = typeof version === \"string\" && (parseVersion(version) !== null || (study && IMAGE_TAG.test(version)));\n if (!known) faults.push(`${label}: the version of ${name} is not a version.`);\n }\n return faults;\n}\n\n/** This function gives the faults of the age limit of one page. */\nfunction limitFaults(raw: unknown, at: string, study: boolean): string[] {\n const limit = record(raw);\n if (limit === null) return [`${at}: the limit is not an object.`];\n const faults: string[] = [];\n const days = limit[\"days\"];\n if (typeof days !== \"number\" || !Number.isFinite(days) || days <= 0) faults.push(`${at}: the limit has no count of days.`);\n if (typeof limit[\"reason\"] !== \"string\" || limit[\"reason\"].trim() === \"\") faults.push(`${at}: the limit has no reason.`);\n if (typeof limit[\"workflow\"] !== \"string\" || limit[\"workflow\"] === \"\") faults.push(`${at}: the limit names no workflow.`);\n const ruling = limit[\"ruling\"];\n if (ruling !== undefined && (typeof ruling !== \"string\" || !ruling.startsWith(\"https://\"))) faults.push(`${at}: the ruling of the limit has no https link.`);\n if (typeof days === \"number\" && days > MAX_LIMIT_DAYS_WITHOUT_RULING && ruling === undefined) {\n faults.push(`${at}: a limit over ${MAX_LIMIT_DAYS_WITHOUT_RULING} days needs a ruling for this site.`);\n }\n if (study && typeof days === \"number\" && days > MAX_STUDY_LIMIT_DAYS) faults.push(`${at}: the limit of a study is at most ${MAX_STUDY_LIMIT_DAYS} days.`);\n const startsAt = limit[\"startsAt\"];\n if (startsAt !== undefined) {\n if (typeof startsAt !== \"string\" || !Number.isFinite(Date.parse(startsAt))) faults.push(`${at}: the start of the limit has no date.`);\n else if (Date.parse(startsAt) > Date.parse(LAST_LIMIT_START)) faults.push(`${at}: the start of the limit is after ${LAST_LIMIT_START.slice(0, 10)}.`);\n }\n return faults;\n}\n\n/** This function gives the faults of the statements of a study with no age limit. */\nfunction noLimitFaults(raw: unknown, at: string): string[] {\n const statements = record(raw);\n if (statements === null) return [`${at}: the field noLimit is not an object.`];\n const faults: string[] = [];\n const said = (value: unknown): boolean => typeof value === \"string\" && value.trim() !== \"\";\n if (!said(statements[\"reproduce\"])) faults.push(`${at}: the field noLimit does not say why no run of the current code can reproduce the numbers.`);\n if (!said(statements[\"today\"])) faults.push(`${at}: the field noLimit does not say why the page claims nothing about today.`);\n return faults;\n}\n\n/** This function gives the faults of the fields of a page that change the age rule. */\nfunction ageRuleFaults(page: Record<string, unknown>, at: string): string[] {\n const faults: string[] = [];\n const study = page[\"study\"];\n if (study !== undefined && study !== true) faults.push(`${at}: the field study is not true.`);\n const limit = page[\"limit\"];\n const noLimit = page[\"noLimit\"];\n if (study === true && limit === undefined && noLimit === undefined) faults.push(`${at}: a study needs a limit, or the field noLimit.`);\n if (limit !== undefined && noLimit !== undefined) faults.push(`${at}: a page has a limit or the field noLimit, not both.`);\n if (study !== true && noLimit !== undefined) faults.push(`${at}: only a study has the field noLimit.`);\n if (study === true && page[\"inFlight\"] !== undefined) faults.push(`${at}: a study has no run in flight.`);\n if (limit !== undefined) faults.push(...limitFaults(limit, at, study === true));\n if (noLimit !== undefined) faults.push(...noLimitFaults(noLimit, at));\n return faults;\n}\n\n/**\n * This function reads the content of a file of data stamps. It gives each fault of the content, so a page with no versions\n * or no run date fails here.\n */\nexport function parseDataStamps(raw: unknown): DataStampsParse {\n const file = record(raw);\n if (file === null) return { ok: false, faults: [\"The file is not an object.\"] };\n if (file[\"schema\"] !== DATA_STAMP_SCHEMA) return { ok: false, faults: [`The schema is not ${DATA_STAMP_SCHEMA}.`] };\n const pages = file[\"pages\"];\n if (!Array.isArray(pages) || pages.length === 0) return { ok: false, faults: [\"The file has no pages.\"] };\n const faults: string[] = [];\n for (const item of pages) {\n const page = record(item);\n if (page === null || typeof page[\"page\"] !== \"string\" || page[\"page\"] === \"\") {\n faults.push(\"A stamp has no page.\");\n continue;\n }\n const at = page[\"page\"];\n const runs = page[\"runs\"];\n if (!Array.isArray(runs) || runs.length === 0) faults.push(`${at}: the page names no run.`);\n else for (const run of runs) faults.push(...runFaults(run, at, page[\"study\"] === true));\n if (page[\"inFlight\"] !== undefined) faults.push(...runFaults(page[\"inFlight\"], `${at}, in flight`));\n faults.push(...ageRuleFaults(page, at));\n }\n return faults.length > 0 ? { ok: false, faults } : { ok: true, stamps: raw as DataStamps };\n}\n\n/** This function gives the count of minor versions from `used` to `latest`. A newer major version counts as no limit. */\nexport function minorsBehind(used: string, latest: string): number {\n const a = parseVersion(used);\n const b = parseVersion(latest);\n if (a === null || b === null) return Number.POSITIVE_INFINITY;\n if (a.major !== b.major) return b.major > a.major ? Number.POSITIVE_INFINITY : 0;\n return Math.max(0, b.minor - a.minor);\n}\n\n/** This function gives the newest stable version of a package on npm at a time, or undefined when npm has none. */\nexport function latestAt(times: readonly NpmVersionTime[], name: string, date: string): string | undefined {\n const limit = Date.parse(date);\n return times\n .filter((t) => t.name === name && Date.parse(t.date) <= limit && parseVersion(t.version)?.prerelease.length === 0)\n .map((t) => t.version)\n .sort(compareVersions)\n .at(-1);\n}\n\nconst ageInDays = (date: string, now: number): number => (now - Date.parse(date)) / DAY_MS;\n\n/** This function gives the values of one field of a cron line, or undefined for a form that it cannot read. */\nfunction cronValues(field: string, low: number, high: number): Set<number> | undefined {\n const values = new Set<number>();\n for (const part of field.split(\",\")) {\n const match = /^(\\*|\\d+(?:-\\d+)?)(?:\\/(\\d+))?$/.exec(part);\n if (match === null) return undefined;\n const [, range = \"\", step = \"1\"] = match;\n const [from = low, to = from] = range === \"*\" ? [low, high] : range.split(\"-\").map(Number);\n const by = Number(step);\n if (by <= 0 || from < low || to > high || from > to) return undefined;\n for (let value = from; value <= to; value += by) values.add(value);\n }\n return values;\n}\n\n/** This function gives the start of each day of a cron line, in a span of two years. It gives undefined for a line that it cannot read. */\nfunction cronDays(line: string, from: number, days: number): number[] | undefined {\n const fields = line.trim().split(/\\s+/);\n if (fields.length !== 5) return undefined;\n const [minute = \"\", hour = \"\", dayOfMonth = \"\", month = \"\", dayOfWeek = \"\"] = fields;\n const minutes = cronValues(minute, 0, 59);\n const hours = cronValues(hour, 0, 23);\n const monthDays = cronValues(dayOfMonth, 1, 31);\n const months = cronValues(month, 1, 12);\n const weekDays = cronValues(dayOfWeek, 0, 6);\n if (minutes === undefined || hours === undefined || monthDays === undefined || months === undefined || weekDays === undefined) return undefined;\n const firstTime = (Math.min(...hours) * 60 + Math.min(...minutes)) * 60_000;\n const starts: number[] = [];\n for (let day = 0; day < days; day += 1) {\n const time = from + day * DAY_MS;\n const date = new Date(time);\n if (!months.has(date.getUTCMonth() + 1)) continue;\n const onMonthDay = monthDays.has(date.getUTCDate());\n const onWeekDay = weekDays.has(date.getUTCDay());\n // A cron line that sets both day fields starts on a day that matches one of them.\n const both = dayOfMonth !== \"*\" && dayOfWeek !== \"*\";\n if (both ? onMonthDay || onWeekDay : onMonthDay && onWeekDay) starts.push(time + firstTime);\n }\n return starts;\n}\n\n/** One schedule of a workflow. */\nexport interface CronLine {\n /** The number of the line in the file, from 1. */\n readonly line: number;\n /** The cron text, with no quotes and no comment. */\n readonly cron: string;\n}\n\n/**\n * This function gives each line `cron:` of a workflow. It is the one reader of these lines: the freshness gate and the rule `runner-budget` of conventions use it.\n * It skips a comment line. It reads a quoted key, a list item, a quoted value and a comment at the end of the line.\n */\nexport function cronLines(workflow: string): CronLine[] {\n return workflow.split(/\\r?\\n/).flatMap((raw, index) => {\n const text = raw.trim().replace(/^- */, \"\");\n const key = [\"cron:\", '\"cron\":', \"'cron':\"].find((form) => text.startsWith(form));\n if (key === undefined) return [];\n // YAML starts a comment at a \"#\" after a space or a tab.\n const rest = text.slice(key.length);\n const comment = rest.search(/\\s#/);\n const value = (comment >= 0 ? rest.slice(0, comment) : rest).trim();\n const quote = value.charAt(0);\n const quoted = value.length >= 2 && (quote === '\"' || quote === \"'\") && value.endsWith(quote);\n return [{ line: index + 1, cron: quoted ? value.slice(1, -1).trim() : value }];\n });\n}\n\n/**\n * This function gives the largest gap between the scheduled starts of a workflow, in days. The gap counts from the first start of a day.\n * It gives a text in place of the gap for a workflow with no schedule, and for a line that it cannot read. The text names the line, and the gate fails on it.\n */\nexport function scheduleGapDays(workflow: string): number | string {\n const lines = cronLines(workflow).map((item) => item.cron);\n if (lines.length === 0) return \"the workflow has no line `cron:`\";\n const from = Date.UTC(2027, 0, 1);\n const span = 731;\n const starts: number[] = [];\n for (const line of lines) {\n const days = cronDays(line, from, span);\n if (days === undefined) return `the gate cannot read the line \\`cron: ${line}\\``;\n starts.push(...days);\n }\n if (starts.length < 2) return `the lines \\`cron: ${lines.join(\"`, `cron: \")}\\` give fewer than two starts in two years`;\n starts.sort((a, b) => a - b);\n let largest = 0;\n for (let index = 1; index < starts.length; index += 1) largest = Math.max(largest, ((starts[index] ?? 0) - (starts[index - 1] ?? 0)) / DAY_MS);\n return largest;\n}\n\n/** This function tells if a run uses a newer version of an engine than another run. */\nfunction hasNewerEngine(run: DataRun, than: DataRun): boolean {\n return Object.entries(run.engines).some(([name, version]) => {\n const old = than.engines[name];\n return old !== undefined && compareVersions(version, old) > 0;\n });\n}\n\n/**\n * This function applies the rules of the gate to the stamps.\n *\n * - The data of each page is at most `maxAgeDays` old, or a run on newer engines is in flight.\n * - The engines of the newest run are at most `maxMinorsBehind` behind npm at the start of that run.\n * - A run in flight has the same age limit, so an old stamp does not hold the gate open.\n * - A page with its own limit uses that limit, and the schedule of its workflow meets the limit.\n * - A study has no limit of the engines, because it tells about the versions that it names.\n * - A study with a limit in force names the commit of each run. A study with no limit has no age rule.\n * - A limit with `startsAt` applies the age rule and the commit rule from that time. The schedule rule applies at once.\n */\nexport function checkFreshness(stamps: DataStamps, options: FreshnessOptions): FreshnessCheck {\n const { times, maxAgeDays: defaultAge = MAX_DATA_AGE_DAYS, maxMinorsBehind = MAX_MINORS_BEHIND, schedules = {} } = options;\n const now = Date.parse(options.now);\n const faults: string[] = [];\n const notRun: string[] = [];\n for (const stamp of stamps.pages) {\n for (const run of [...stamp.runs, ...(stamp.inFlight === undefined ? [] : [stamp.inFlight])]) {\n if (ageInDays(run.date, now) < 0) faults.push(`${stamp.page}: the run ${run.id} has a date after the check.`);\n }\n if (stamp.study === true && stamp.limit === undefined) continue;\n const maxAgeDays = stamp.limit?.days ?? defaultAge;\n const startsAt = stamp.limit?.startsAt;\n const inForce = startsAt === undefined || Date.parse(startsAt) <= now;\n if (stamp.limit !== undefined) {\n const gap = schedules[stamp.limit.workflow];\n if (gap === undefined || typeof gap === \"string\") faults.push(`${stamp.page}: the limit of ${maxAgeDays} days has no schedule that the gate can read in ${stamp.limit.workflow}: ${gap ?? \"the check has no read of this workflow\"}.`);\n else if (gap > maxAgeDays) faults.push(`${stamp.page}: the schedule of ${stamp.limit.workflow} has a gap of ${gap.toFixed(1)} days, over the limit of ${maxAgeDays}.`);\n }\n const flight = stamp.inFlight;\n const flying = flight !== undefined && ageInDays(flight.date, now) <= maxAgeDays;\n if (flight !== undefined && !flying) faults.push(`${stamp.page}: the run ${flight.id} is in flight for more than ${maxAgeDays} days.`);\n for (const run of stamp.runs) {\n const age = ageInDays(run.date, now);\n if (inForce && age > maxAgeDays && !(flying && hasNewerEngine(flight, run))) {\n faults.push(`${stamp.page}: the run ${run.id} is ${age.toFixed(1)} days old, over the limit of ${maxAgeDays}, and no run on newer engines is in flight.`);\n }\n }\n if (stamp.study === true) {\n if (inForce) for (const run of stamp.runs) if (run.commit === undefined) faults.push(`${stamp.page}: the run ${run.id} names no commit.`);\n continue;\n }\n const newest = flight ?? [...stamp.runs].sort((a, b) => Date.parse(a.date) - Date.parse(b.date)).at(-1);\n if (newest === undefined) continue;\n for (const [name, version] of Object.entries(newest.engines)) {\n const latest = latestAt(times, name, newest.date);\n if (latest === undefined) {\n notRun.push(`${stamp.page}: npm gives no version of ${name} at the start of the run ${newest.id}.`);\n } else if (minorsBehind(version, latest) > maxMinorsBehind) {\n faults.push(`${stamp.page}: the run ${newest.id} used ${name} ${version}, and npm had ${latest} at its start. The limit is ${maxMinorsBehind} minor version behind.`);\n }\n }\n }\n return { faults, notRun };\n}\n\n/** A time at which the gate must fail for a page, and what the gate says at that time. */\nexport interface FailingCase {\n /** The path of the page. */\n readonly page: string;\n /** The ISO time of the case. */\n readonly at: string;\n /** The first fault at that time. A case with no fault tells that the gate does not hold the page. */\n readonly fault?: string;\n}\n\n/**\n * This function gives one failing case for each page, from the stamps of the site itself. A measured page must fail one\n * day after its limit, from `options.now` or the start of the limit. A study with no limit must fail before the date of its run.\n * Stamps that pass and give a case with no fault tell that the gate does not examine that page.\n */\nexport function failingCases(stamps: DataStamps, options: FreshnessOptions): readonly FailingCase[] {\n return stamps.pages.map((stamp) => {\n const dates = [...stamp.runs, ...(stamp.inFlight === undefined ? [] : [stamp.inFlight])].map((run) => Date.parse(run.date));\n const days = stamp.limit?.days ?? options.maxAgeDays ?? MAX_DATA_AGE_DAYS;\n const from = Math.max(Date.parse(options.now), Date.parse(stamp.limit?.startsAt ?? options.now));\n const time = stamp.study === true && stamp.limit === undefined ? Math.min(...dates) - DAY_MS : from + (days + 1) * DAY_MS;\n const at = new Date(time).toISOString();\n const [fault] = checkFreshness({ schema: stamps.schema, pages: [stamp] }, { ...options, now: at }).faults;\n return { page: stamp.page, at, ...(fault === undefined ? {} : { fault }) };\n });\n}\n\n/** The help of the command `site-pages freshness`. */\nexport const FRESHNESS_HELP: string = `Usage: site-pages freshness --stamps <file> [options]\n\nExamine the data stamps of the measured pages of a site.\n\n --stamps <file> The file of data stamps, schema ${DATA_STAMP_SCHEMA}. (necessary)\n --now <time> The ISO time of the check. The default is the time of the call.\n --help Show this text.\n\nThe exit code is 0 when the stamps pass, 1 for a fault, and 2 for an incorrect command line.\nStamps that pass also show one failing case for each page. A page with no failing case is a fault.\n`;\n\n/** This function gives the largest gap of the schedule in a workflow file. It gives a text for a file that it cannot read. */\nfunction readSchedule(path: string): number | string {\n try {\n return scheduleGapDays(readFileSync(path, \"utf8\"));\n } catch (error) {\n return `the file cannot be read: ${error instanceof Error ? error.message : String(error)}`;\n }\n}\n\n/** This function is the command `site-pages freshness`. The `fetch` option is for a test. */\nexport async function runFreshnessCli(argv: readonly string[], io: CheckIo, fetcher?: typeof fetch): Promise<number> {\n let values: { stamps?: string | undefined; now?: string | undefined; help?: boolean | undefined };\n try {\n ({ values } = parseArgs({ args: [...argv], allowPositionals: false, options: { stamps: { type: \"string\" }, now: { type: \"string\" }, help: { type: \"boolean\" } } }));\n } catch (error) {\n io.stderr(`site-pages freshness: ${error instanceof Error ? error.message : String(error)}\\n\\n${FRESHNESS_HELP}`);\n return 2;\n }\n if (values.help === true) {\n io.stdout(FRESHNESS_HELP);\n return 0;\n }\n if (values.stamps === undefined) {\n io.stderr(`site-pages freshness: --stamps is necessary.\\n\\n${FRESHNESS_HELP}`);\n return 2;\n }\n const path = isAbsolute(values.stamps) ? values.stamps : join(io.cwd, values.stamps);\n let raw: unknown;\n try {\n raw = JSON.parse(readFileSync(path, \"utf8\"));\n } catch (error) {\n io.stderr(`site-pages freshness: the file ${values.stamps} cannot be read: ${error instanceof Error ? error.message : String(error)}\\n`);\n return 1;\n }\n const parsed = parseDataStamps(raw);\n if (!parsed.ok) {\n for (const fault of parsed.faults) io.stderr(`${fault}\\n`);\n return 1;\n }\n const engines = parsed.stamps.pages\n .filter((p) => p.study !== true)\n .flatMap((p) => [...p.runs, ...(p.inFlight === undefined ? [] : [p.inFlight])])\n .flatMap((r) => Object.keys(r.engines));\n const schedules: Record<string, number | string> = {};\n for (const page of parsed.stamps.pages) {\n if (page.limit !== undefined) schedules[page.limit.workflow] = readSchedule(join(io.cwd, page.limit.workflow));\n }\n const npm = await npmPublishTimes({ packages: [...new Set(engines)], ...(fetcher === undefined ? {} : { fetch: fetcher }) });\n const options: FreshnessOptions = { now: values.now ?? new Date().toISOString(), times: npm.times, schedules };\n const result = checkFreshness(parsed.stamps, options);\n for (const problem of [...npm.problems, ...result.notRun]) io.stdout(`Not run: ${problem}\\n`);\n for (const fault of result.faults) io.stderr(`${fault}\\n`);\n if (result.faults.length > 0) return 1;\n io.stdout(`The data stamps of ${parsed.stamps.pages.length} ${parsed.stamps.pages.length === 1 ? \"page\" : \"pages\"} pass.\\n`);\n let held = true;\n for (const { page, at, fault } of failingCases(parsed.stamps, options)) {\n if (fault === undefined) {\n io.stderr(`${page}: the gate does not fail at ${at}, so it does not hold this page.\\n`);\n held = false;\n } else {\n io.stdout(`Failing case at ${at}: ${fault}\\n`);\n }\n }\n return held ? 0 : 1;\n}\n","/**\n * The rule `changelog-version`: the top release section of the changelog of a package is not above the version of\n * its `package.json`.\n */\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { compareVersions, parseChangelog } from \"@mark1russell7/site-pages\";\nimport { versionedPackages, type Break, type Rule } from \"../rule.ts\";\n\n/** This function gives the version and the line (from 1) of the first version section of a changelog, or undefined. */\nfunction topSection(text: string): { readonly version: string; readonly line: number } | undefined {\n const top = parseChangelog(text)[0];\n if (top === undefined) return undefined;\n const index = text.split(/\\r?\\n/).findIndex((line) => /^##\\s/.test(line) && line.replace(/^##\\s+/, \"\").trim() === top.heading);\n return { version: top.version, line: index + 1 };\n}\n\nexport const changelogVersion: Rule = {\n id: \"changelog-version\",\n title: \"The top release section of the changelog of a package is not above the version of its package.json. With the option `everyVersion`, it is the same version.\",\n reason:\n \"On 2026-11-03 a pull request added the section 0.5.0 with two breaking changes to a changelog, and left package.json at 0.4.1. The next change of a dependency range made the train plan a PATCH 0.4.2, so the breaking changes were about to ship under a PATCH number.\",\n fix: \"Set the version of package.json to the version of the top section in the same change, by the rules of Semantic Versioning. Or, if the release is not ready, name the section Unreleased.\",\n sources: [\n { repo: \"packing\", rule: \"changelog\", doc: \"packages/packing/CHANGELOG.md (#249 added 0.5.0, package.json stayed 0.4.1; #253 set 0.5.0)\" },\n { repo: \"release-train\", rule: \"cascade\", doc: \"the train plans a PATCH for a change of a dependency range\" },\n { repo: \"private\", rule: \"semver\", doc: \"the global CLAUDE.md, npm packages use Semantic Versioning\" },\n ],\n options: {\n file: { type: \"string\", default: \"CHANGELOG.md\", description: \"The name of the changelog in the folder of each package.\" },\n everyVersion: { type: \"boolean\", default: false, description: \"When true, the top section also names the version of package.json: each version has its section.\" },\n },\n check(context, options) {\n const name = String(options[\"file\"]);\n const breaks: Break[] = [];\n let found = 0;\n for (const pkg of versionedPackages(context)) {\n const file = pkg.folder === \"\" ? name : `${pkg.folder}/${name}`;\n if (!existsSync(join(context.root, file))) continue;\n found += 1;\n const version = String(pkg.manifest[\"version\"]);\n const top = topSection(readFileSync(join(context.root, file), \"utf8\"));\n if (top === undefined) {\n if (options[\"everyVersion\"] === true) breaks.push({ file, message: `${file} has no section for a version, and ${pkg.file} is at ${version}.` });\n continue;\n }\n const order = compareVersions(top.version, version);\n if (order > 0) {\n breaks.push({ file, line: top.line, message: `${file} has the section ${top.version}, and ${pkg.file} is still at ${version}. Set the version to ${top.version} in this change. Else a change of a dependency range releases a PATCH of ${version} under the notes of ${top.version}.` });\n } else if (order < 0 && options[\"everyVersion\"] === true) {\n breaks.push({ file, line: top.line, message: `${pkg.file} is at ${version}, and the top section of ${file} is ${top.version}. Add the section ${version}.` });\n }\n }\n if (found === 0) return { skipped: `no package with a release version has a file ${name}` };\n return breaks;\n },\n};\n","/**\n * The rule `cue-preset`: the `tsconfig.json` of each package extends a preset of `@mark1russell7/cue`.\n * No config of a package turns off a strict option of its preset.\n */\nimport { readFileSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport { dirname, join, resolve } from \"node:path\";\nimport { codePackages, hasFile, inFolder, lineOf, readJsonc, type Break, type Rule } from \"../rule.ts\";\n\n/** The compiler options that make the type check strict. A package does not turn them off. */\nexport const STRICT_OPTIONS = [\n \"strict\",\n \"noImplicitAny\",\n \"strictNullChecks\",\n \"strictFunctionTypes\",\n \"strictBindCallApply\",\n \"strictPropertyInitialization\",\n \"strictBuiltinIteratorReturn\",\n \"noImplicitThis\",\n \"useUnknownInCatchVariables\",\n \"alwaysStrict\",\n \"noUncheckedIndexedAccess\",\n \"exactOptionalPropertyTypes\",\n \"noImplicitOverride\",\n \"noImplicitReturns\",\n \"noFallthroughCasesInSwitch\",\n \"noPropertyAccessFromIndexSignature\",\n \"erasableSyntaxOnly\",\n] as const;\n\n/** The options that `strict` turns on when a config does not set them. */\nconst STRICT_FAMILY = new Set<string>([\n \"noImplicitAny\",\n \"strictNullChecks\",\n \"strictFunctionTypes\",\n \"strictBindCallApply\",\n \"strictPropertyInitialization\",\n \"strictBuiltinIteratorReturn\",\n \"noImplicitThis\",\n \"useUnknownInCatchVariables\",\n \"alwaysStrict\",\n]);\n\ntype Json = Readonly<Record<string, unknown>>;\n\nconst asObject = (value: unknown): Json => (typeof value === \"object\" && value !== null && !Array.isArray(value) ? (value as Json) : {});\n\n/** This function gives the `extends` list of a tsconfig. */\nconst extendsOf = (config: Json): string[] => {\n const value = config[\"extends\"];\n if (typeof value === \"string\") return [value];\n return Array.isArray(value) ? value.filter((item): item is string => typeof item === \"string\") : [];\n};\n\n/** The compiler options that a config gets from the configs that it extends. */\ninterface Inherited {\n readonly options: Json;\n /** False when the config extends a config that the rule cannot read. */\n readonly complete: boolean;\n}\n\n/**\n * This function gives the compiler options of the configs that `config` extends, with the options of\n * a later config over an earlier one.\n */\nfunction inheritedOptions(config: Json, dir: string, depth = 0): Inherited {\n if (depth > 10) return { options: {}, complete: false };\n let options: Json = {};\n let complete = true;\n for (const base of extendsOf(config)) {\n let file: string | undefined;\n if (base.startsWith(\".\")) file = resolve(dir, base.endsWith(\".json\") ? base : `${base}.json`);\n else {\n try {\n file = createRequire(join(dir, \"package.json\")).resolve(base);\n } catch {\n file = undefined;\n }\n }\n const parent = file === undefined ? undefined : readJsonc(file);\n if (parent === undefined || file === undefined) {\n complete = false;\n continue;\n }\n const above = inheritedOptions(asObject(parent), dirname(file), depth + 1);\n complete &&= above.complete;\n options = { ...options, ...above.options, ...asObject(asObject(parent)[\"compilerOptions\"]) };\n }\n return { options, complete };\n}\n\n/**\n * This function tells if a config that extends configs with the options `inherited` turns on the\n * option. When the rule cannot read each config, it gives true: the package turns off a strict option.\n */\nfunction inheritedOn(option: string, inherited: Inherited): boolean {\n if (!inherited.complete) return true;\n const value = inherited.options[option];\n if (typeof value === \"boolean\") return value;\n return STRICT_FAMILY.has(option) && inherited.options[\"strict\"] === true;\n}\n\nexport const cuePreset: Rule = {\n id: \"cue-preset\",\n title: \"The `tsconfig.json` of each package extends a preset of `@mark1russell7/cue`, and no config of a package turns off a strict option.\",\n reason:\n \"`pnpm package add` writes the configs from a preset, so each package checks its types with the same strict options. A config by hand or a strict option turned off lets the packages drift apart.\",\n fix: \"Make the package with `pnpm package add <name> --preset=<preset>`, or set `extends` to `@mark1russell7/cue/ts/config/<preset>.json`. Correct the code, not the strict option.\",\n sources: [\n { repo: \"client\", rule: \"cue-config\", doc: \"CLAUDE.md:64\" },\n { repo: \"client\", rule: \"no-manual-tsconfig\", doc: \"CLAUDE.md:64\" },\n { repo: \"private\", rule: \"cue-preset-strict\", doc: \"docs/architecture/ecosystem-and-structure.md:58\" },\n { repo: \"private\", rule: \"strict-preset\", doc: \"docs/architecture/ecosystem-and-structure.md:58\" },\n { repo: \"private\", rule: \"new-package-via-cli\", doc: \"CLAUDE.md:14\" },\n { repo: \"coeval\", rule: \"package-scaffold\", doc: \"CLAUDE.md:16\" },\n { repo: \"crawler\", rule: \"package-scaffold\", doc: \"CLAUDE.md:16\" },\n { repo: \"headroom\", rule: \"package-scaffold\", doc: \"CLAUDE.md:30\" },\n { repo: \"Vex\", rule: \"package-scaffold\", doc: \"CLAUDE.md:22\" },\n ],\n options: {\n prefix: { type: \"string\", default: \"@mark1russell7/cue/\", description: \"The start of the `extends` path of a preset.\" },\n extends: {\n type: \"boolean\",\n default: true,\n description: \"When false, the rule does not examine `extends`. It still reports each strict option that a config turns off. For a package that publishes its own presets.\",\n },\n },\n check(context, options) {\n const prefix = typeof options[\"prefix\"] === \"string\" ? options[\"prefix\"] : \"@mark1russell7/cue/\";\n const breaks: Break[] = [];\n for (const info of codePackages(context)) {\n if (!hasFile(info.dir, \"tsconfig.json\")) continue;\n for (const name of [\"tsconfig.json\", \"tsconfig.test.json\"]) {\n const path = join(info.dir, name);\n const file = inFolder(info.folder, name);\n const value = readJsonc(path);\n if (value === undefined) {\n if (hasFile(info.dir, name)) breaks.push({ file, message: `${name} is not JSON.`, fix: \"Correct the JSON.\" });\n continue;\n }\n const config = asObject(value);\n if (name === \"tsconfig.json\" && options[\"extends\"] !== false && !extendsOf(config).some((base) => base.startsWith(prefix))) {\n const line = lineOf(readFileSync(path, \"utf8\"), '\"extends\"');\n breaks.push({ file, ...(line === undefined ? {} : { line }), message: `tsconfig.json does not extend a preset of ${prefix.replace(/\\/$/, \"\")}.` });\n }\n const own = asObject(config[\"compilerOptions\"]);\n const inherited = inheritedOptions(config, info.dir);\n for (const option of STRICT_OPTIONS) {\n if (own[option] !== false || !inheritedOn(option, inherited)) continue;\n breaks.push({ file, message: `${name} turns off the strict option ${option}.`, fix: `Remove \"${option}\": false, and correct the code that it hides.` });\n }\n }\n }\n return breaks;\n },\n};\n","/**\n * A small reader of GitHub workflow files, by the indent of the lines. The rules that read workflows share it. It\n * knows the block form, the inline values of keys and the block scalars (`|` and `>`) that the workflows of the template\n * use. `readWorkflow` gives the parts of a shared workflow that the site of the template shows.\n */\n\n/** A workflow file. */\nexport const WORKFLOW: RegExp = /^\\.github\\/workflows\\/[^/]+\\.ya?ml$/;\n\nexport const indentOf = (line: string): number => line.length - line.trimStart().length;\n\n/** This function gives the lines of a workflow, with each line of a comment made empty. */\nexport const workflowLines = (text: string): string[] => text.split(/\\r?\\n/).map((line) => (line.trimStart().startsWith(\"#\") ? \"\" : line));\n\n/** This function removes a comment at the end of a value, and the quotes around it. */\nexport function valueOf(raw: string): string {\n // YAML starts a comment at a \"#\" after a space or a tab.\n const comment = raw.search(/\\s#/);\n let value = (comment >= 0 ? raw.slice(0, comment) : raw).trim();\n const quote = value.charAt(0);\n if (value.length >= 2 && (quote === '\"' || quote === \"'\") && value.endsWith(quote)) value = value.slice(1, -1).trim();\n return value;\n}\n\n/** This function gives the value of the key `key` on a line, or undefined when the line has another key. A quoted key (\"on\") counts too. */\nexport function keyValue(line: string, key: string): string | undefined {\n let text = line.trimStart();\n if (text.startsWith(\"- \")) text = text.slice(2).trimStart();\n for (const form of [key, `\"${key}\"`, `'${key}'`]) if (text.startsWith(`${form}:`)) return valueOf(text.slice(form.length + 1));\n return undefined;\n}\n\n/** This function gives the end of the block under the line `index`. The end is the next line with the same indent or a smaller one. */\nexport function blockEnd(lines: readonly string[], index: number): number {\n const indent = indentOf(lines[index] ?? \"\");\n let end = index + 1;\n while (end < lines.length) {\n const line = lines[end] ?? \"\";\n if (line.trim() !== \"\" && indentOf(line) <= indent) break;\n end += 1;\n }\n return end;\n}\n\n/** This function gives the indent of the first key of the block under the line `index`, or undefined for an empty block. */\nexport function childIndent(lines: readonly string[], index: number): number | undefined {\n const end = blockEnd(lines, index);\n for (let i = index + 1; i < end; i++) if ((lines[i] ?? \"\").trim() !== \"\") return indentOf(lines[i] ?? \"\");\n return undefined;\n}\n\n/** This function gives the indexes of the keys of the block under the line `index`: the lines at the indent of its first key. */\nexport function childKeys(lines: readonly string[], index: number): number[] {\n const indent = childIndent(lines, index);\n if (indent === undefined) return [];\n const keys: number[] = [];\n for (let i = index + 1; i < blockEnd(lines, index); i++) if ((lines[i] ?? \"\").trim() !== \"\" && indentOf(lines[i] ?? \"\") === indent) keys.push(i);\n return keys;\n}\n\n/** A change of the lines: at the index `at`, remove `remove` lines and put `insert` in their place. */\nexport interface Splice {\n readonly at: number;\n readonly remove: number;\n readonly insert: readonly string[];\n}\n\n/**\n * This function applies changes to the lines of `text`, and keeps its line ends. The changes go from the end to the\n * start, so each index stays correct. At one index, a splice that removes lines goes first, so it removes only the old\n * lines. Then the inserts go in, the later one first, so they keep their order.\n */\nexport function applySplices(text: string, splices: readonly Splice[]): string {\n const eol = text.includes(\"\\r\\n\") ? \"\\r\\n\" : \"\\n\";\n const out = text.split(/\\r?\\n/);\n for (const item of splices.map((value, order) => ({ ...value, order })).sort((a, b) => b.at - a.at || b.remove - a.remove || b.order - a.order)) out.splice(item.at, item.remove, ...item.insert);\n return out.join(eol);\n}\n\nexport interface WorkflowInput {\n readonly name: string;\n readonly type: string;\n readonly description: string;\n /** The default value, as YAML text. An empty text is no default. */\n readonly default: string;\n readonly required: boolean;\n}\n\n/** A step of a job. */\nexport interface WorkflowStep {\n /** The name of the step, or else its action, its id or its first command. */\n readonly label: string;\n /** The condition of the step (`if`), or an empty text. */\n readonly if: string;\n /** The action of the step (`uses`), with no pin, or an empty text. */\n readonly uses: string;\n}\n\n/** A job of a workflow. */\nexport interface WorkflowJob {\n readonly id: string;\n readonly if: string;\n readonly needs: readonly string[];\n readonly steps: readonly WorkflowStep[];\n}\n\n/** A shared workflow of the repository, or a composite action in the same form. */\nexport interface Workflow {\n /** The file name, for example `reusable-pages.yml`. */\n readonly file: string;\n /** The value `action` marks a composite action of {@link readAction}. A workflow has no value here. */\n readonly kind?: \"action\";\n /** The value of `name`. */\n readonly name: string;\n /** The first lines of the comment at the top of the file. */\n readonly summary: string;\n readonly inputs: readonly WorkflowInput[];\n readonly jobs: readonly WorkflowJob[];\n}\n\n\n/** A key of a block: its line and its value. A block scalar gives its text. A nested block gives an empty text. */\ninterface Entry {\n readonly line: number;\n readonly value: string;\n}\n\n/** This function gives the text of a block scalar (`|`, `|-`, `>`, `>-`) under the line `index`. */\nfunction scalar(lines: readonly string[], index: number, style: string): string {\n const body = lines.slice(index + 1, blockEnd(lines, index));\n const indent = Math.min(...body.filter((l) => l.trim() !== \"\").map(indentOf));\n const text = body.map((l) => l.slice(indent).trimEnd());\n return (style.startsWith(\">\") ? text.join(\" \").replace(/\\s+/g, \" \") : text.join(\"\\n\")).trim();\n}\n\n/** This function gives the keys of the lines `start` to `end` at the indent `indent`. A first line can start with `- `. */\nfunction entries(lines: readonly string[], start: number, end: number, indent: number): Map<string, Entry> {\n const map = new Map<string, Entry>();\n for (let i = start; i < end; i++) {\n const line = lines[i] ?? \"\";\n if (line.trim() === \"\") continue;\n let text = line;\n if (i === start && line.trimStart().startsWith(\"- \")) text = \" \".repeat(indentOf(line) + 2) + line.trimStart().slice(2);\n if (indentOf(text) !== indent) continue;\n const match = /^\\s*(\"[^\"]+\"|'[^']+'|[^\\s:][^:]*):(?:\\s(.*))?$/.exec(text);\n if (!match?.[1]) continue;\n const key = match[1].replace(/^[\"']|[\"']$/g, \"\");\n const raw = valueOf((match[2] ?? \"\").trim());\n map.set(key, { line: i, value: /^[|>][-+]?$/.test(raw) ? scalar(lines, i, raw) : raw });\n }\n return map;\n}\n\n/** This function gives the keys of the block under the line `index`. */\nfunction childrenOf(lines: readonly string[], index: number): Map<string, Entry> {\n const end = blockEnd(lines, index);\n const first = lines.slice(index + 1, end).find((l) => l.trim() !== \"\");\n return first === undefined ? new Map() : entries(lines, index + 1, end, indentOf(first));\n}\n\n/** This function gives the first line of each item of the list under the line `index`. */\nfunction itemsOf(lines: readonly string[], index: number): number[] {\n const end = blockEnd(lines, index);\n const items: number[] = [];\n let indent: number | undefined;\n for (let i = index + 1; i < end; i++) {\n const line = lines[i] ?? \"\";\n if (!line.trimStart().startsWith(\"- \") && line.trim() !== \"-\") continue;\n indent ??= indentOf(line);\n if (indentOf(line) === indent) items.push(i);\n }\n return items;\n}\n\n/** This function gives the values of a list: an inline list (`[a, b]`), one value, or a block list. */\nfunction listOf(lines: readonly string[], entry: Entry | undefined): string[] {\n if (entry === undefined) return [];\n const inline = entry.value.trim();\n if (inline.startsWith(\"[\")) return inline.slice(1, -1).split(\",\").map(valueOf).filter(Boolean);\n if (inline !== \"\") return [inline];\n return itemsOf(lines, entry.line).map((i) => valueOf((lines[i] ?? \"\").trimStart().slice(2)));\n}\n\n/** This function gives an action of a `uses` value with no pin: `actions/checkout@<sha> # v7` gives `actions/checkout`. */\nconst actionOf = (uses: string): string => uses.split(\"@\", 1)[0] ?? uses;\n\n/** This function gives the label of a step: its name, else its action, its id or its first command. */\nfunction stepLabel(step: Map<string, Entry>): string {\n const name = step.get(\"name\")?.value;\n if (name) return name;\n const uses = step.get(\"uses\")?.value;\n if (uses) return actionOf(uses);\n const run = step.get(\"run\")?.value.split(\"\\n\")[0];\n if (run) return run;\n return step.get(\"id\")?.value ?? \"step\";\n}\n\n/** This function gives the summary of a workflow: the first paragraph of the comment at the top of the file. */\nfunction summaryOf(lines: readonly string[]): string {\n const words: string[] = [];\n for (const line of lines) {\n if (!line.startsWith(\"#\")) break;\n const text = line.replace(/^#\\s?/, \"\").trim();\n if (text === \"\") {\n if (words.length > 0) break;\n continue;\n }\n words.push(text);\n }\n return words.join(\" \");\n}\n\n/** This function reads a shared workflow file. The file name goes into the result. */\nexport function readWorkflow(file: string, text: string): Workflow {\n const raw = text.split(/\\r?\\n/);\n const lines = raw.map((line) => (line.trimStart().startsWith(\"#\") ? \"\" : line));\n const top = entries(lines, 0, lines.length, 0);\n const on = top.get(\"on\");\n const call = on ? childrenOf(lines, on.line).get(\"workflow_call\") : undefined;\n const inputsEntry = call ? childrenOf(lines, call.line).get(\"inputs\") : undefined;\n const inputs: WorkflowInput[] = [];\n if (inputsEntry) {\n for (const [name, entry] of childrenOf(lines, inputsEntry.line)) {\n const keys = childrenOf(lines, entry.line);\n inputs.push({\n name,\n type: keys.get(\"type\")?.value ?? \"string\",\n description: keys.get(\"description\")?.value ?? \"\",\n default: keys.get(\"default\")?.value ?? \"\",\n required: keys.get(\"required\")?.value === \"true\",\n });\n }\n }\n const jobs: WorkflowJob[] = [];\n const jobsEntry = top.get(\"jobs\");\n if (jobsEntry) {\n for (const [id, entry] of childrenOf(lines, jobsEntry.line)) {\n const keys = childrenOf(lines, entry.line);\n const stepsEntry = keys.get(\"steps\");\n const steps: WorkflowStep[] = stepsEntry ? stepsOf(lines, stepsEntry.line) : [];\n const uses = keys.get(\"uses\")?.value;\n if (steps.length === 0 && uses) steps.push({ label: `calls ${actionOf(uses)}`, if: \"\", uses: actionOf(uses) });\n jobs.push({ id, if: keys.get(\"if\")?.value ?? \"\", needs: listOf(lines, keys.get(\"needs\")), steps });\n }\n }\n return { file, name: top.get(\"name\")?.value ?? file, summary: summaryOf(raw), inputs, jobs };\n}\n\n/** This function gives the steps of the list under the line `index`. */\nfunction stepsOf(lines: readonly string[], index: number): WorkflowStep[] {\n const items = itemsOf(lines, index);\n const last = blockEnd(lines, index);\n return items.map((start, n) => {\n const step = entries(lines, start, items[n + 1] ?? last, indentOf(lines[start] ?? \"\") + 2);\n return { label: stepLabel(step), if: step.get(\"if\")?.value ?? \"\", uses: actionOf(step.get(\"uses\")?.value ?? \"\") };\n });\n}\n\n/**\n * This function reads a composite action (`action.yml`) in the form of a workflow. The steps of `runs` are the steps of\n * one job `steps`. An input of a composite action has no type, so an input with the default `true` or `false` gets the\n * type `boolean`. The value of such an input is still a string for the runner. The description of the action is the\n * summary. An action that is not composite gives no job.\n */\nexport function readAction(file: string, text: string): Workflow {\n const lines = workflowLines(text);\n const top = entries(lines, 0, lines.length, 0);\n const inputs: WorkflowInput[] = [];\n const inputsEntry = top.get(\"inputs\");\n if (inputsEntry) {\n for (const [name, entry] of childrenOf(lines, inputsEntry.line)) {\n const keys = childrenOf(lines, entry.line);\n const value = keys.get(\"default\")?.value ?? \"\";\n inputs.push({\n name,\n type: value === \"true\" || value === \"false\" ? \"boolean\" : \"string\",\n description: keys.get(\"description\")?.value ?? \"\",\n default: value,\n required: keys.get(\"required\")?.value === \"true\",\n });\n }\n }\n const runs = top.get(\"runs\");\n const keys = runs ? childrenOf(lines, runs.line) : new Map<string, Entry>();\n const stepsEntry = keys.get(\"using\")?.value === \"composite\" ? keys.get(\"steps\") : undefined;\n const jobs: WorkflowJob[] = stepsEntry ? [{ id: \"steps\", if: \"\", needs: [], steps: stepsOf(lines, stepsEntry.line) }] : [];\n return { file, kind: \"action\", name: top.get(\"name\")?.value ?? file, summary: top.get(\"description\")?.value ?? \"\", inputs, jobs };\n}\n","/**\n * The rule `gate-after-cancel`: a summary job of a gate does not start after a cancel. A job with `if: always()` still\n * asks for a runner when its run is cancelled, and the new run of the pull request waits behind it. With `!cancelled()`, the\n * job concludes `cancelled` with no runner, and it still starts after a failure, a skip and a time limit.\n */\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { byCode } from \"../workspace.ts\";\nimport type { Break, Rule } from \"../rule.ts\";\nimport { WORKFLOW, childKeys, indentOf, keyValue, workflowLines } from \"../workflow.ts\";\n\n/** The condition of a summary job. */\nexport const NOT_CANCELLED = \"${{ !cancelled() }}\";\n\nconst ALWAYS_ONLY = /^(\\$\\{\\{\\s*)?always\\(\\)(\\s*\\}\\})?$/;\n\n/** A job with `always()` in its condition: the line of the key (from 0), and `only` when the condition is `always()` and nothing else. */\nexport interface AlwaysGate {\n readonly line: number;\n readonly only: boolean;\n}\n\n/** This function tells if a job is a summary job: its name ends with ` OK`, or a step uses the action `gate-summary`. */\nfunction isSummary(lines: readonly string[], job: number): boolean {\n const end = lines.findIndex((line, at) => at > job && line.trim() !== \"\" && indentOf(line) <= indentOf(lines[job] ?? \"\"));\n const body = lines.slice(job + 1, end < 0 ? lines.length : end);\n const keys = childKeys(lines, job);\n const name = keys.map((at) => keyValue(lines[at] ?? \"\", \"name\")).find((value) => value !== undefined);\n return name?.endsWith(\" OK\") === true || body.some((line) => (keyValue(line, \"uses\") ?? \"\").includes(\"/actions/gate-summary@\"));\n}\n\n/** This function gives the summary jobs of a workflow with `always()` in the condition of the job. It does not read the condition of a step. */\nexport function alwaysGates(text: string): AlwaysGate[] {\n const lines = workflowLines(text);\n const jobs = lines.findIndex((line) => indentOf(line) === 0 && keyValue(line, \"jobs\") !== undefined);\n if (jobs < 0) return [];\n const found: AlwaysGate[] = [];\n for (const job of childKeys(lines, jobs)) {\n if (!isSummary(lines, job)) continue;\n for (const at of childKeys(lines, job)) {\n const condition = keyValue(lines[at] ?? \"\", \"if\");\n if (condition === undefined || !condition.includes(\"always()\")) continue;\n found.push({ line: at, only: ALWAYS_ONLY.test(condition) });\n }\n }\n return found;\n}\n\n/** This function gives the text with `!cancelled()` as the condition of each summary job that has only `always()`. It keeps the line endings and each other line. */\nexport function withNotCancelled(text: string): string {\n const eol = text.includes(\"\\r\\n\") ? \"\\r\\n\" : \"\\n\";\n const lines = text.split(/\\r?\\n/);\n for (const gate of alwaysGates(text)) {\n if (gate.only) lines[gate.line] = `${\" \".repeat(indentOf(lines[gate.line] ?? \"\"))}if: ${NOT_CANCELLED}`;\n }\n return lines.join(eol);\n}\n\nexport const gateAfterCancel: Rule = {\n id: \"gate-after-cancel\",\n title: \"A summary job of a gate does not start after a cancel: its condition is `!cancelled()`, not `always()`.\",\n reason:\n \"A job with `if: always()` asks for a runner after a cancel, and the new run waits behind it. On 2026-11-05 a new run waited 22.6 of 23.4 minutes for such jobs of the run that it replaced. A test of each case showed that `!cancelled()` holds the gate: after a cancel the job concludes `cancelled` with no runner, and the pull request stays blocked. After a failure, a skip and a time limit the job starts and fails or passes as before.\",\n fix: \"Write `if: ${{ !cancelled() }}` in the summary job. Do not add other parts to this condition: a job that an `if` skips counts as a pass for a required check.\",\n sources: [\n { repo: \"highways\", rule: \"ci\", doc: \"runs 41971833871 and 41978983438 (2026-11-05): the new run waited behind the summary jobs of the cancelled run\" },\n { repo: \"client\", rule: \"ci\", doc: \"ci.yml (2026-11-05): the job CI OK has if: always(), and a new push of a pull request cancels the run before it\" },\n { repo: \"template\", rule: \"gate\", doc: \"pull request 189 (2026-11-05): the test of a cancel in the queue, a cancel in a job, a time limit, a failed need and a skipped need\" },\n ],\n options: {},\n check(context) {\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n const breaks: Break[] = [];\n for (const file of files.filter((path) => WORKFLOW.test(path)).sort(byCode)) {\n let text: string;\n try {\n text = readFileSync(join(context.root, file), \"utf8\");\n } catch {\n continue;\n }\n const gates = alwaysGates(text);\n const after = withNotCancelled(text);\n for (const gate of gates) {\n breaks.push({\n file,\n line: gate.line + 1,\n message: `A summary job of ${file} has \\`always()\\` in its condition. After a cancel it asks for a runner, and the new run waits behind it.`,\n ...(gate.only ? { edits: [{ file, before: text, after }] } : { fix: `A person must change it, because the condition has other parts. ${gateAfterCancel.fix}` }),\n });\n }\n }\n return breaks;\n },\n};\n","/**\n * The rule `main-runs-finish`: a workflow that starts on `push` or on `workflow_call` does not cancel a run in progress.\n * Only the run of a pull request is cancelled by a newer push. Each commit of main has its own concurrency group, because\n * GitHub keeps only the newest run that waits in a group.\n */\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { byCode } from \"../workspace.ts\";\nimport { replaceLine, type Break, type Rule } from \"../rule.ts\";\nimport { WORKFLOW, childKeys, indentOf, keyValue, workflowLines } from \"../workflow.ts\";\n\n/** The value of `cancel-in-progress` that cancels only the run of a pull request. */\nexport const PULL_REQUEST_ONLY = \"${{ github.event_name == 'pull_request' }}\";\n\n/** The end of a concurrency group: a pull request has one group, and each other run has the group of its commit. */\nexport const OWN_GROUP = \"${{ github.event_name == 'pull_request' && github.ref || github.sha }}\";\n\n/** The end of a concurrency group that one run of main can share with the next run. */\nconst SHARED_GROUP = \"${{ github.ref }}\";\n\n/** This function tells if the workflow starts on the event: `on: <event>`, `on: [<event>, ...]` or a key `<event>` under `on`. */\nexport function startsOn(lines: readonly string[], event: string): boolean {\n const on = lines.findIndex((line) => indentOf(line) === 0 && keyValue(line, \"on\") !== undefined);\n if (on < 0) return false;\n const value = keyValue(lines[on] ?? \"\", \"on\") ?? \"\";\n if (value !== \"\") return new RegExp(`(^|[\\\\s[,])${event}([\\\\s\\\\],]|$)`).test(value);\n return childKeys(lines, on).some((index) => {\n const key = (lines[index] ?? \"\").trim().replace(/^- /, \"\");\n return key === event || key.startsWith(`${event}:`);\n });\n}\n\n/** This function tells if the workflow starts on `push`. */\nexport function startsOnPush(lines: readonly string[]): boolean {\n return startsOn(lines, \"push\");\n}\n\n/**\n * This function tells if a run of the workflow can be a run of main. A workflow that starts on `workflow_call` gets\n * the event of its caller, and a caller can start on `push`.\n */\nexport function runsOnMain(lines: readonly string[]): boolean {\n return startsOnPush(lines) || startsOn(lines, \"workflow_call\");\n}\n\nexport const mainRunsFinish: Rule = {\n id: \"main-runs-finish\",\n title: \"A workflow that starts on push or on workflow_call does not cancel a run in progress, and each commit of main has its own concurrency group. A newer push cancels only the run of a pull request.\",\n reason:\n \"On 2026-11-03 the next merge cancelled the CI run of a commit on main, so the main check of that commit had no result. A shared concurrency group also cancelled a bench run on main, and its claim had no measurement. The CI workflow of the template had `cancel-in-progress: true`, and each repository copied it. A called workflow gets the event of its caller, so a `true` in a workflow that starts on `workflow_call` cancels the run of main too (packing, time-gate.yml, 2026-11-03).\",\n fix: `Set \\`cancel-in-progress: ${PULL_REQUEST_ONLY}\\`, and end the concurrency group with \\`${OWN_GROUP}\\`. In one group, GitHub cancels a run that waits when a newer run comes, whatever \\`cancel-in-progress\\` says.`,\n sources: [\n { repo: \"private\", rule: \"main-runs-finish\", doc: \"docs/STRATEGY.md (2026-11-03, a run of main ends)\" },\n { repo: \"client\", rule: \"release\", doc: \"the release of 0.47.0 (2026-11-03): four waiting CI runs of main were cancelled, so the version commit had no result\" },\n { repo: \"algebra\", rule: \"main-check\", doc: \"the A2 and A5 results (2026-11-03): a cancelled main run, and a cancelled bench run\" },\n ],\n options: {},\n check(context) {\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n const workflows = files.filter((path) => WORKFLOW.test(path)).sort(byCode);\n const breaks: Break[] = [];\n let pushed = 0;\n for (const file of workflows) {\n let text: string;\n try {\n text = readFileSync(join(context.root, file), \"utf8\");\n } catch {\n continue;\n }\n const lines = workflowLines(text);\n if (!runsOnMain(lines)) continue;\n pushed += 1;\n lines.forEach((line, index) => {\n if (keyValue(line, \"group\")?.includes(SHARED_GROUP) === true) {\n const original = text.split(/\\r?\\n/)[index] ?? line;\n breaks.push({\n file,\n line: index + 1,\n message: `${file} starts on push or on workflow_call, and its concurrency group ends with the ref. Runs of main share the group, so a newer push cancels a run that waits, and that commit gets no result.`,\n edits: [{ file, before: text, after: replaceLine(text, index + 1, [original.replace(SHARED_GROUP, () => OWN_GROUP)]) }],\n });\n return;\n }\n if (keyValue(line, \"cancel-in-progress\") !== \"true\") return;\n const original = text.split(/\\r?\\n/)[index] ?? line;\n const after = replaceLine(text, index + 1, [original.replace(/cancel-in-progress:\\s*[\"']?true[\"']?/, () => `cancel-in-progress: ${PULL_REQUEST_ONLY}`)]);\n breaks.push({\n file,\n line: index + 1,\n message: `${file} starts on push or on workflow_call and has \\`cancel-in-progress: true\\`. A newer push cancels the run of main in progress, and that commit gets no result.`,\n edits: [{ file, before: text, after }],\n });\n });\n }\n if (pushed === 0) return { skipped: \"no workflow starts on push or on workflow_call\" };\n return breaks;\n },\n};\n","/**\n * The rule `gate-trigger`: a workflow that runs on pull requests starts on each pull request, with no path filter. The\n * ruleset needs the summary check \"<Name> OK\" of each gate. A workflow with `on.pull_request.paths` does not start\n * on each pull request, so its check is not always there, and the ruleset cannot ask for it.\n */\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { byCode } from \"../workspace.ts\";\nimport type { Break, Rule } from \"../rule.ts\";\nimport { WORKFLOW, applySplices, blockEnd, childIndent, childKeys, indentOf, keyValue, valueOf, workflowLines, type Splice } from \"../workflow.ts\";\nimport { NOT_CANCELLED } from \"./gate-after-cancel.ts\";\nimport { OWN_GROUP, PULL_REQUEST_ONLY } from \"./main-runs-finish.ts\";\n\nconst TRIGGERS = [\"pull_request\", \"pull_request_target\"] as const;\nconst FILTERS = [\"paths\", \"paths-ignore\"] as const;\n\n/** A path filter of a pull request trigger: the line (from 1), the trigger and the key. */\nexport interface PathFilter {\n readonly line: number;\n readonly trigger: string;\n readonly key: string;\n}\n\n/** This function gives the path filters of the pull request triggers of a workflow. */\nexport function prPathFilters(text: string): PathFilter[] {\n const lines = workflowLines(text);\n const on = lines.findIndex((line) => indentOf(line) === 0 && keyValue(line, \"on\") !== undefined);\n if (on < 0) return [];\n // `on: pull_request` and `on: [push, pull_request]` have no filter\n if ((keyValue(lines[on] ?? \"\", \"on\") ?? \"\") !== \"\") return [];\n const found: PathFilter[] = [];\n for (const at of childKeys(lines, on)) {\n for (const trigger of TRIGGERS) {\n const value = keyValue(lines[at] ?? \"\", trigger);\n if (value === undefined) continue;\n // The flow form: `pull_request: { paths: [...] }`\n for (const key of FILTERS) if (new RegExp(`(^|[{,\\\\s])${key}\\\\s*:`).test(value)) found.push({ line: at + 1, trigger, key });\n for (const child of childKeys(lines, at)) for (const key of FILTERS) if (keyValue(lines[child] ?? \"\", key) !== undefined) found.push({ line: child + 1, trigger, key });\n }\n }\n return found;\n}\n\n/** The commit of the template with the actions `changes` and `gate-summary`. Renovate updates the pins after the fix. */\nexport const ACTIONS_COMMIT: string = \"f05c6eeb35e33a040bdfdcd7d07a1d2c00640f8d\";\n\n/** This function gives the items of a list value: the flow form `[a, \"b\"]`, or the block form under the line `index`. */\nexport function listItems(lines: readonly string[], index: number, value: string): { items: string[]; end: number } | undefined {\n if (value.startsWith(\"[\") && value.endsWith(\"]\")) {\n const items = value.slice(1, -1).split(\",\").map((item) => valueOf(item)).filter((item) => item !== \"\");\n return { items, end: index + 1 };\n }\n if (value !== \"\") return undefined;\n const indent = indentOf(lines[index] ?? \"\");\n const items: string[] = [];\n let end = index + 1;\n for (let i = index + 1; i < lines.length; i++) {\n const line = lines[i] ?? \"\";\n if (line.trim() === \"\") continue;\n const deeper = indentOf(line) > indent || (indentOf(line) === indent && line.trimStart().startsWith(\"- \"));\n if (!deeper) break;\n if (!line.trimStart().startsWith(\"- \")) return undefined;\n items.push(valueOf(line.trimStart().slice(2)));\n end = i + 1;\n }\n return { items, end };\n}\n\n/** This function gives the name of the summary check of a workflow: its name with \"OK\", in the form that ruleset-ci-ok.ts reads. */\nexport function summaryName(workflowName: string): string {\n const words = workflowName.replace(/[^A-Za-z0-9]+/g, \" \").trim();\n const name = words === \"\" ? \"Gate\" : words.charAt(0).toUpperCase() + words.slice(1);\n return `${name} OK`;\n}\n\n/** This function puts an expression into the value of an `if`, as YAML that keeps it. */\nconst ifValue = (expression: string): string => {\n const value = `\\${{ ${expression} }}`;\n return value.includes(\": \") || value.includes(\" #\") ? `\"${value.replaceAll(\"\\\\\", \"\\\\\\\\\").replaceAll('\"', '\\\\\"')}\"` : value;\n};\n\n/**\n * This function converts a gate workflow with a path filter on its pull request trigger. The trigger loses the filter,\n * and a job `changes` gets the same patterns. Each other job needs it and runs only on a match. A summary job\n * `<Name> OK` with the action gate-summary needs each job. The function gives the new text, or the reason why a\n * person must convert the workflow.\n */\nexport function convertGate(text: string, file: string, commit: string = ACTIONS_COMMIT): { text: string } | { reason: string } {\n const lines = workflowLines(text);\n const top = (key: string): number => lines.findIndex((line) => indentOf(line) === 0 && keyValue(line, key) !== undefined);\n const on = top(\"on\");\n const jobsAt = top(\"jobs\");\n if (on < 0 || jobsAt < 0) return { reason: \"the workflow has no on block or no jobs block\" };\n const splices: Splice[] = [];\n const filters: Record<string, string[]> = {};\n for (const at of childKeys(lines, on)) {\n const trigger = TRIGGERS.find((name) => keyValue(lines[at] ?? \"\", name) !== undefined);\n if (trigger === undefined) continue;\n if ((keyValue(lines[at] ?? \"\", trigger) ?? \"\") !== \"\") return { reason: `on.${trigger} has the flow form` };\n let filtered = false;\n for (const child of childKeys(lines, at)) {\n const key = FILTERS.find((name) => keyValue(lines[child] ?? \"\", name) !== undefined);\n if (key === undefined) continue;\n const list = listItems(lines, child, keyValue(lines[child] ?? \"\", key) ?? \"\");\n if (list === undefined) return { reason: `on.${trigger}.${key} is not a list` };\n const before = filters[key];\n if (before !== undefined && before.join(\"\\n\") !== list.items.join(\"\\n\")) return { reason: `the triggers have different ${key}` };\n filters[key] = list.items;\n splices.push({ at: child, remove: list.end - child, insert: [] });\n filtered = true;\n }\n if (filtered) {\n const pad = \" \".repeat(indentOf(lines[at] ?? \"\"));\n splices.push({ at, remove: 0, insert: [`${pad}# Each pull request starts this workflow, so its summary check is always there. The job changes skips the`, `${pad}# work when the pull request changes no file of the gate (CI.md of the template, \"A gate with paths\").`] });\n }\n }\n if (Object.keys(filters).length === 0) return { reason: \"the workflow has no path filter on a pull request trigger\" };\n\n const jobs = childKeys(lines, jobsAt);\n const first = jobs[0];\n if (first === undefined) return { reason: \"the workflow has no job\" };\n const ids = jobs.map((at) => (lines[at] ?? \"\").trim().replace(/:$/, \"\"));\n const jobIndent = \" \".repeat(indentOf(lines[first] ?? \"\"));\n const unit = \" \".repeat((childIndent(lines, first) ?? indentOf(lines[first] ?? \"\") + 2) - jobIndent.length);\n const nameAt = top(\"name\");\n const name = summaryName(nameAt >= 0 ? (keyValue(lines[nameAt] ?? \"\", \"name\") ?? \"\") : (file.split(\"/\").pop() ?? \"\").replace(/\\.ya?ml$/, \"\"));\n const summaryId = name.toLowerCase().replaceAll(\" \", \"-\");\n for (const id of [\"changes\", summaryId]) if (ids.includes(id)) return { reason: `the workflow already has a job ${id}` };\n\n const needsOf = new Map<string, string[]>();\n const own = new Set<string>();\n for (const [index, at] of jobs.entries()) {\n const id = ids[index] ?? \"\";\n const keys = childKeys(lines, at);\n const pad = \" \".repeat(childIndent(lines, at) ?? indentOf(lines[at] ?? \"\") + unit.length);\n const needsAt = keys.find((key) => keyValue(lines[key] ?? \"\", \"needs\") !== undefined);\n const ifAt = keys.find((key) => keyValue(lines[key] ?? \"\", \"if\") !== undefined);\n if (needsAt === undefined) {\n needsOf.set(id, []);\n splices.push({ at: at + 1, remove: 0, insert: [`${pad}needs: changes`] });\n } else {\n const value = keyValue(lines[needsAt] ?? \"\", \"needs\") ?? \"\";\n const list = value === \"\" || value.startsWith(\"[\") ? listItems(lines, needsAt, value) : { items: [value], end: needsAt + 1 };\n if (list === undefined) return { reason: `the needs of the job ${id} is not a list` };\n needsOf.set(id, list.items);\n if (value === \"\") {\n const item = lines.findIndex((line, i) => i > needsAt && line.trim() !== \"\");\n splices.push({ at: item, remove: 0, insert: [`${\" \".repeat(indentOf(lines[item] ?? \"\"))}- changes`] });\n } else {\n splices.push({ at: needsAt, remove: 1, insert: [`${pad}needs: [${[\"changes\", ...list.items].join(\", \")}]`] });\n }\n }\n if (ifAt === undefined) {\n splices.push({ at: at + 1, remove: 0, insert: [`${pad}if: needs.changes.outputs.match == 'true'`] });\n } else {\n let old = keyValue(lines[ifAt] ?? \"\", \"if\") ?? \"\";\n if (/^[>|]/.test(old)) return { reason: `the if of the job ${id} has more than one line` };\n const whole = /^\\$\\{\\{(.*)\\}\\}$/.exec(old);\n if (whole !== null) old = (whole[1] ?? \"\").trim();\n if (old.includes(\"${{\")) return { reason: `the if of the job ${id} has a part in \\${{ }}` };\n own.add(id);\n splices.push({ at: ifAt, remove: 1, insert: [`${pad}if: ${ifValue(`needs.changes.outputs.match == 'true' && (${old})`)}`] });\n }\n }\n // A job with its own if can be skipped when the gate runs, and so can each job that needs such a job\n const skippable = new Set(own);\n for (let grew = true; grew; ) {\n grew = false;\n for (const [id, needs] of needsOf) {\n if (skippable.has(id) || !needs.some((need) => skippable.has(need))) continue;\n skippable.add(id);\n grew = true;\n }\n }\n\n const action = (step: string): string => `mark1russell7/template/.github/actions/${step}@${commit} # main`;\n const block = (indent: string, key: string, items: readonly string[]): string[] => [`${indent}${key}: |`, ...items.map((item) => `${indent}${unit}${item}`)];\n const job = jobIndent + unit;\n const step = job + unit;\n const grouped = top(\"concurrency\") >= 0;\n const group = (id: string): string[] => (grouped ? [] : [`${job}concurrency:`, `${job}${unit}group: \\${{ github.workflow }}-${id}-${OWN_GROUP}`, `${job}${unit}cancel-in-progress: ${PULL_REQUEST_ONLY}`]);\n const changes = [\n `${jobIndent}changes:`,\n `${job}runs-on: ubuntu-latest`,\n `${job}timeout-minutes: 5`,\n ...group(\"changes\"),\n `${job}permissions:`,\n `${job}${unit}contents: read`,\n `${job}${unit}pull-requests: read`,\n `${job}outputs:`,\n `${job}${unit}match: \\${{ steps.changes.outputs.match }}`,\n `${job}steps:`,\n `${step}- id: changes`,\n `${step} uses: ${action(\"changes\")}`,\n `${step} with:`,\n ...block(`${step} ${unit}`, \"paths\", filters[\"paths\"] ?? [\"**\"]),\n ...(filters[\"paths-ignore\"] === undefined ? [] : block(`${step} ${unit}`, \"paths-ignore\", filters[\"paths-ignore\"])),\n \"\",\n ];\n const allow = ids.filter((id) => skippable.has(id));\n const summary = [\n \"\",\n `${jobIndent}${summaryId}:`,\n `${job}name: ${name}`,\n `${job}if: ${NOT_CANCELLED}`,\n `${job}needs: [${[\"changes\", ...ids].join(\", \")}]`,\n `${job}runs-on: ubuntu-latest`,\n `${job}timeout-minutes: 2`,\n ...group(summaryId),\n `${job}permissions: {}`,\n `${job}steps:`,\n `${step}- uses: ${action(\"gate-summary\")}`,\n `${step} with:`,\n `${step} ${unit}needs: \\${{ toJSON(needs) }}`,\n ...(allow.length === 0 ? [] : [`${step} ${unit}allow-skip: ${allow.join(\" \")}`]),\n ];\n let last = blockEnd(lines, jobsAt);\n while (last > jobsAt + 1 && (lines[last - 1] ?? \"\").trim() === \"\") last -= 1;\n splices.push({ at: first, remove: 0, insert: changes }, { at: last, remove: 0, insert: summary });\n\n return { text: applySplices(text, splices) };\n}\n\nexport const gateTrigger: Rule = {\n id: \"gate-trigger\",\n title: \"A workflow that runs on pull requests starts on each pull request: it has no on.pull_request.paths or paths-ignore.\",\n reason:\n 'The ruleset requires the summary check \"<Name> OK\" of each gate. A workflow with a path filter does not start on a pull request that changes no file of the filter, so its check is not there, and the ruleset cannot require it. Then a pull request can merge before such a gate ends. On 2026-11-02, 19 such workflows in 11 repositories fed no required check.',\n fix: 'Remove the paths from on.pull_request. Add a job \"changes\" with the action mark1russell7/template/.github/actions/changes and the same paths, and \"if: needs.changes.outputs.match == \\'true\\'\" on each gate job. Add a job \"<Name> OK\" with \"if: always()\", \"needs\" with each job, and the action gate-summary (CI.md, \"A gate with paths\"). Then start ruleset-ci-ok.ts again. A workflow that is not a gate can go in the option allow.',\n sources: [{ repo: \"private\", rule: \"gate-trigger\", doc: \"docs/STRATEGY.md (2026-11-02, a gate with paths feeds a required summary)\" }],\n options: {\n allow: { type: \"strings\", default: [], description: \"The file names of the workflows that can filter pull requests by path, because they are not a gate (for example a preview).\" },\n },\n check(context, options) {\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n const workflows = files.filter((path) => WORKFLOW.test(path)).sort(byCode);\n if (workflows.length === 0) return { skipped: \"the repository has no workflow\" };\n const allow = Array.isArray(options[\"allow\"]) ? (options[\"allow\"] as readonly string[]) : [];\n const breaks: Break[] = [];\n for (const file of workflows) {\n if (allow.includes(file.slice(file.lastIndexOf(\"/\") + 1))) continue;\n let text: string;\n try {\n text = readFileSync(join(context.root, file), \"utf8\");\n } catch {\n continue;\n }\n const filters = prPathFilters(text);\n const first = filters[0];\n if (first === undefined) continue;\n const keys = filters.map((filter) => `on.${filter.trigger}.${filter.key}`).join(\" and \");\n const converted = convertGate(text, file);\n breaks.push({\n file,\n line: first.line,\n message: `${file}: ${keys}, so the workflow does not start on each pull request, and the ruleset cannot ask for its summary check.`,\n ...(\"text\" in converted ? { edits: [{ file, before: text, after: converted.text }] } : { fix: `A person must convert it, because ${converted.reason}. ${gateTrigger.fix}` }),\n });\n }\n return breaks;\n },\n};\n","/**\n * The rule `security-one-job`: the security scans of a repository run in one job, with the action `security-scan` of the\n * template. The deprecated shared workflow `reusable-security.yml` gives three scan jobs, and the caller adds the summary\n * job `Security OK`. Each job asks for its own runner, so a run waits in the queue for four runners in place of one.\n */\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { byCode } from \"../workspace.ts\";\nimport type { Break, Rule } from \"../rule.ts\";\nimport { WORKFLOW, type Splice, applySplices, blockEnd, childKeys, indentOf, keyValue, workflowLines } from \"../workflow.ts\";\nimport { listItems } from \"./gate-trigger.ts\";\n\n/** The first commit of the template with the action `security-scan` (pull request 206). Renovate and the template sync move the pin after the fix. */\nexport const SECURITY_SCAN_COMMIT: string = \"8a01259f04dce1d6a2fa351b758c6d283e9f7fc9\";\n\n/** The inputs of the action `security-scan`. The shared workflow has the same inputs and also `timeout-minutes`. */\nexport const SECURITY_SCAN_INPUTS: readonly string[] = [\"fail-on-severity\", \"dependency-review\", \"dependency-review-scopes\", \"osv\", \"osv-lockfile\", \"codeql\", \"codeql-languages\", \"codeql-build-mode\"];\n\n/** The time limit of the job when the caller gives none: the default of `timeout-minutes` of the shared workflow. */\nexport const SECURITY_TIMEOUT_MINUTES = 30;\n\nconst REUSABLE = /(^|\\/)\\.github\\/workflows\\/reusable-security\\.ya?ml(@|$)/;\n\n/** The keys that a job of the shared workflow can have, and that the fix can replace. */\nconst CALLER_KEYS = new Set([\"uses\", \"permissions\", \"with\", \"name\"]);\n\n/** A job of the shared workflow in a workflow file: the line of its key (from 0), and its id. */\nexport interface SecurityCaller {\n readonly line: number;\n readonly id: string;\n}\n\n/** This function gives the lines from `start` to the last line of the block that is not empty. */\nfunction trimmedEnd(lines: readonly string[], start: number): number {\n let end = blockEnd(lines, start);\n while (end > start + 1 && (lines[end - 1] ?? \"\").trim() === \"\") end -= 1;\n return end;\n}\n\n/** This function gives the id of the job of the line `at`. */\nconst idOf = (line: string): string => {\n const text = line.trim();\n const colon = text.indexOf(\":\");\n return (colon < 0 ? text : text.slice(0, colon)).replace(/^[\"']|[\"']$/g, \"\");\n};\n\n/** This function gives the jobs of a workflow that use the shared workflow `reusable-security.yml`. */\nexport function securityCallers(text: string): SecurityCaller[] {\n const lines = workflowLines(text);\n const jobs = lines.findIndex((line) => indentOf(line) === 0 && keyValue(line, \"jobs\") !== undefined);\n if (jobs < 0) return [];\n const found: SecurityCaller[] = [];\n for (const job of childKeys(lines, jobs)) {\n const uses = childKeys(lines, job)\n .map((at) => keyValue(lines[at] ?? \"\", \"uses\"))\n .find((value) => value !== undefined);\n if (uses !== undefined && REUSABLE.test(uses)) found.push({ line: job, id: idOf(lines[job] ?? \"\") });\n }\n return found;\n}\n\n/** This function gives the ids of the jobs in `needs` of the job of the line `job`. */\nfunction needsOf(lines: readonly string[], job: number): string[] {\n for (const at of childKeys(lines, job)) {\n const value = keyValue(lines[at] ?? \"\", \"needs\");\n if (value === undefined) continue;\n if (value !== \"\" && !value.startsWith(\"[\")) return [value];\n return listItems(lines, at, value)?.items ?? [];\n }\n return [];\n}\n\n/**\n * This function puts one job in place of the job of the shared workflow and its summary job. If it cannot, it gives the\n * reason that a person must change the file. The new job keeps the id of the summary job and the name `Security OK`, which the ruleset\n * needs. It gives the inputs of the caller to the action, and `timeout-minutes` to the job.\n */\nexport function withOneJob(text: string, commit: string = SECURITY_SCAN_COMMIT): { text: string } | { reason: string } {\n const lines = workflowLines(text);\n const callers = securityCallers(text);\n if (callers.length !== 1) return { reason: `the file has ${String(callers.length)} jobs that use reusable-security.yml, and the fix changes only one` };\n const caller = callers[0];\n if (caller === undefined) return { reason: \"no job uses reusable-security.yml\" };\n const jobs = lines.findIndex((line) => indentOf(line) === 0 && keyValue(line, \"jobs\") !== undefined);\n const dependents = childKeys(lines, jobs).filter((job) => needsOf(lines, job).includes(caller.id));\n if (dependents.length !== 1) return { reason: `${String(dependents.length)} jobs need the job ${caller.id}, and the fix needs exactly one summary job` };\n const summary = dependents[0];\n if (summary === undefined) return { reason: \"no summary job\" };\n const summaryNeeds = needsOf(lines, summary);\n if (summaryNeeds.length !== 1) return { reason: `the summary job needs ${summaryNeeds.join(\", \")}, and the fix replaces only a summary job of the scans` };\n const summaryName = childKeys(lines, summary)\n .map((at) => keyValue(lines[at] ?? \"\", \"name\"))\n .find((value) => value !== undefined);\n if (summaryName !== \"Security OK\") return { reason: `the summary job has the name ${summaryName ?? \"(none)\"}, not Security OK, which the ruleset needs` };\n\n const inputs: string[] = [];\n let timeout = String(SECURITY_TIMEOUT_MINUTES);\n for (const at of childKeys(lines, caller.line)) {\n const key = idOf(lines[at] ?? \"\");\n if (!CALLER_KEYS.has(key)) return { reason: `the job ${caller.id} has the key ${key}, and the fix cannot keep it` };\n if (key !== \"with\") continue;\n for (const input of childKeys(lines, at)) {\n const name = idOf(lines[input] ?? \"\");\n const value = keyValue(lines[input] ?? \"\", name) ?? \"\";\n if (value === \"\" || value.startsWith(\"|\") || value.startsWith(\">\") || trimmedEnd(lines, input) > input + 1) return { reason: `the input ${name} has a value of more than one line` };\n if (name === \"timeout-minutes\") timeout = value;\n else if (SECURITY_SCAN_INPUTS.includes(name)) inputs.push(name);\n else return { reason: `the action security-scan has no input ${name}` };\n }\n }\n\n const raw = text.split(/\\r?\\n/);\n const pad = \" \".repeat(indentOf(raw[caller.line] ?? \"\"));\n const withLines = childKeys(lines, caller.line).find((at) => idOf(lines[at] ?? \"\") === \"with\");\n const inputLines = withLines === undefined ? [] : childKeys(lines, withLines).filter((at) => inputs.includes(idOf(lines[at] ?? \"\"))).map((at) => `${pad} ${(raw[at] ?? \"\").trim()}`);\n const job = [\n `${pad}${idOf(lines[summary] ?? \"\")}:`,\n `${pad} name: Security OK`,\n `${pad} runs-on: ubuntu-latest`,\n `${pad} timeout-minutes: ${timeout}`,\n `${pad} permissions:`,\n `${pad} contents: read`,\n `${pad} security-events: write`,\n `${pad} actions: read`,\n `${pad} steps:`,\n `${pad} - uses: mark1russell7/template/.github/actions/security-scan@${commit} # main`,\n ...(inputLines.length > 0 ? [`${pad} with:`, ...inputLines] : []),\n ];\n const splices: Splice[] = [{ at: caller.line, remove: trimmedEnd(lines, caller.line) - caller.line, insert: job }];\n // The summary job goes, with the empty line before it, or else with the empty line after it.\n const blank = (at: number): boolean => at >= 0 && at < raw.length - 1 && (raw[at] ?? \"\").trim() === \"\";\n const start = blank(summary - 1) ? summary - 1 : summary;\n const end = trimmedEnd(lines, summary) + (start === summary && blank(trimmedEnd(lines, summary)) ? 1 : 0);\n splices.push({ at: start, remove: end - start, insert: [] });\n return { text: applySplices(text, splices) };\n}\n\nexport const securityOneJob: Rule = {\n id: \"security-one-job\",\n title: \"The security scans run in one job: the action `security-scan`, not the shared workflow `reusable-security.yml`.\",\n reason:\n \"Each job of a run asks for its own runner. reusable-security.yml gives three scan jobs, and the caller adds the summary job Security OK, so each run waits in the queue for four runners, and the summary job waits again after the scans. On 2026-11-06, in a full queue, the scan jobs of systems waited 23 to 40 minutes each. The action security-scan runs the same scans with the same inputs in one job, which is the check Security OK.\",\n fix: \"Replace the job that uses reusable-security.yml and its summary job with one job Security OK that runs the action security-scan (CI.md, Security). Give the inputs to the action, and timeout-minutes to the job.\",\n sources: [\n { repo: \"template\", rule: \"security\", doc: \"pull request 206 (2026-11-05): the action security-scan, and reusable-security.yml deprecated\" },\n { repo: \"template\", rule: \"ci\", doc: \"CI.md, Security: the job of a caller of security-scan, and the change from the old workflow\" },\n { repo: \"optional\", rule: \"security\", doc: \".github/workflows/security.yml (2026-11-06): the job security of reusable-security.yml and the summary job Security OK, the form that the fix changes\" },\n { repo: \"systems\", rule: \"ci\", doc: \"Security runs 42159170199 to 42172625422 (2026-11-06): three scan jobs, each waited 5.7 to 40.7 minutes for a runner\" },\n ],\n options: {},\n check(context) {\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n const breaks: Break[] = [];\n for (const file of files.filter((path) => WORKFLOW.test(path)).sort(byCode)) {\n let text: string;\n try {\n text = readFileSync(join(context.root, file), \"utf8\");\n } catch {\n continue;\n }\n const callers = securityCallers(text);\n if (callers.length === 0) continue;\n const after = withOneJob(text);\n for (const caller of callers) {\n breaks.push({\n file,\n line: caller.line + 1,\n message: `The job ${caller.id} of ${file} uses reusable-security.yml: its scans ask for three runners and its summary job for a fourth.`,\n ...(\"text\" in after ? { edits: [{ file, before: text, after: after.text }] } : { fix: `A person must change it, because ${after.reason}. ${securityOneJob.fix}` }),\n });\n }\n }\n return breaks;\n },\n};\n","/**\n * The rule `setup-cue`: no workflow or action downloads the cue CLI with its own command. The shared action `setup-cue`\n * of the template installs it from a cache, or with retries and a sha256 check. A download of a release asset from\n * GitHub fails at times with a 504, and a bare `curl` then fails the job.\n */\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { byCode } from \"../workspace.ts\";\nimport type { Break, Rule } from \"../rule.ts\";\nimport { WORKFLOW } from \"../workflow.ts\";\n\n/** The files of a composite action. */\nconst ACTION = /^\\.github\\/actions\\/.+\\/action\\.ya?ml$/;\n\n/** The action of the template itself. It is the one place with the download. */\nconst SHARED_ACTION = \".github/actions/setup-cue/action.yml\";\n\n/** A hand-written install of the cue CLI: a download of a release asset, or a build with `go install`. */\nconst DOWNLOAD = /github\\.com\\/cue-lang\\/cue\\/releases\\/download\\/(v[0-9][^/\\s\"']*)\\/|cuelang\\.org\\/go\\/cmd\\/cue@(v?[0-9][^\\s\"']*|latest)/;\n\n/** A hand-written install of the cue CLI on a line of a file. */\nexport interface CueDownload {\n /** The line, from 1. */\n readonly line: number;\n /** The version of the cue CLI, or undefined when the line does not name one. */\n readonly version: string | undefined;\n}\n\n/** This function gives each line of a file that installs the cue CLI with its own command. It does not read a comment line. */\nexport function cueDownloads(text: string): CueDownload[] {\n const found: CueDownload[] = [];\n text.split(/\\r?\\n/).forEach((line, index) => {\n if (line.trimStart().startsWith(\"#\")) return;\n const match = DOWNLOAD.exec(line);\n if (match === null) return;\n const version = match[1] ?? match[2];\n found.push({ line: index + 1, version: version === undefined || version === \"latest\" ? undefined : version.replace(/^v/, \"\") });\n });\n return found;\n}\n\nexport const setupCue: Rule = {\n id: \"setup-cue\",\n title: \"The cue CLI comes from the shared action `setup-cue`, not from a download in a workflow.\",\n reason:\n \"On 2026-11-08, GitHub gave a 504 for release assets on and off from 09:00Z to after 10:20Z. A bare `curl` of the cue CLI failed the CI of cue and a release of client.\",\n fix: 'A caller of `reusable-ci.yml` gives the input `cue-version: \"<version>\"` in place of the download in `setup`. Another job uses the step `uses: mark1russell7/template/.github/actions/setup-cue@<commit>` with `version: <version>`.',\n sources: [\n { repo: \"cue\", rule: \"ci\", doc: \"the cue download of main CI and of #66 (2026-11-08): a 504 of github.com, and #66 passed at attempt 3\" },\n { repo: \"client\", rule: \"release\", doc: \"the 0.52.0 release (2026-11-08): a bare curl -fsSL of the cue CLI failed on a 504\" },\n { repo: \"template\", rule: \"security\", doc: \"the Security run of main daa927c (2026-11-08): the same 504 for the CodeQL bundle, another release asset\" },\n ],\n options: {},\n check(context) {\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n const breaks: Break[] = [];\n for (const file of files.filter((path) => (WORKFLOW.test(path) || ACTION.test(path)) && path !== SHARED_ACTION).sort(byCode)) {\n let text: string;\n try {\n text = readFileSync(join(context.root, file), \"utf8\");\n } catch {\n continue;\n }\n for (const download of cueDownloads(text)) {\n const version = download.version === undefined ? \"\" : ` ${download.version}`;\n breaks.push({\n file,\n line: download.line,\n message: `${file} installs the cue CLI${version} with its own command, with no retry. Use the action setup-cue of the template, or the input cue-version of reusable-ci.yml.`,\n });\n }\n }\n return breaks;\n },\n};\n","/**\n * The rule `shared-ci`: a repository uses the shared workflows and actions of the template, and keeps no copy of them.\n * Its `ci.yml` uses the shared workflow `reusable-ci.yml` of the template. No workflow file and no action of the\n * repository has the name of a shared workflow or a shared action. The template itself is the home, so the rule does\n * not examine it.\n */\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { byCode } from \"../workspace.ts\";\nimport type { Break, Rule } from \"../rule.ts\";\nimport { WORKFLOW, readWorkflow } from \"../workflow.ts\";\n\n/** The shared workflows of the template, by file name. */\nexport const SHARED_WORKFLOWS: readonly string[] = [\n \"reusable-ai-review.yml\",\n \"reusable-ci.yml\",\n \"reusable-codex-review.yml\",\n \"reusable-lockfile.yml\",\n \"reusable-mutation.yml\",\n \"reusable-pages.yml\",\n \"reusable-release-build.yml\",\n \"reusable-release-tag.yml\",\n \"reusable-security.yml\",\n];\n\n/** The shared actions of the template, by folder name under `.github/actions`. */\nexport const SHARED_ACTIONS: readonly string[] = [\"build-ref\", \"changes\", \"changeset-check\", \"coverage\", \"data-stamps\", \"env-json\", \"gate-summary\", \"green-main\", \"npm-publish\", \"security-scan\", \"setup-cue\", \"setup-playwright\", \"site-check\", \"site-pages\"];\n\n/** The `uses` value of a job that calls the shared CI, with no pin. */\nexport const SHARED_CI = \"mark1russell7/template/.github/workflows/reusable-ci.yml\";\n\n/** The action folder of a path: `.github/actions/<name>/action.yml` gives `<name>`. */\nconst ACTION = /^\\.github\\/actions\\/([^/]+)\\//;\n\n/** The file name of a path. */\nconst baseName = (path: string): string => path.slice(path.lastIndexOf(\"/\") + 1);\n\n/** This function tells if a job of a workflow text uses the shared CI of the template. */\nexport function callsSharedCi(file: string, text: string): boolean {\n return readWorkflow(file, text).jobs.some((job) => job.steps.some((step) => step.uses === SHARED_CI));\n}\n\nexport const sharedCi: Rule = {\n id: \"shared-ci\",\n title: \"`ci.yml` calls the shared workflow `reusable-ci.yml` of the template, and no workflow or action copies a shared one.\",\n reason:\n \"The shared CI is the one place where each check of a repository is set: the typecheck, the tests, the conventions, the API report and the summary check CI OK that the ruleset needs. A ci.yml with its own steps, or a copy of a shared workflow or action, does not get the fixes and the new checks of the template, and it drifts with no sign. On 2026-11-07, 3 of 19 repositories of the account ran CI steps of their own, and the rule was only text in each CLAUDE.md.\",\n fix: \"Make ci.yml call mark1russell7/template/.github/workflows/reusable-ci.yml at a pinned commit, and give the differences as its inputs (CI.md). Remove the local copy of a shared workflow or action, and call the one of the template. A repository that cannot call the shared CI turns the rule off with its reason.\",\n sources: [\n { repo: \"template\", rule: \"shared-workflows\", doc: \"CLAUDE.md: the workflows use the shared workflows and actions of the template; a repository changes only the inputs of its callers\" },\n { repo: \"template\", rule: \"ci\", doc: \"CI.md, CI: a caller of reusable-ci.yml needs no inputs, and gives each difference as an input\" },\n { repo: \"highways\", rule: \"ci\", doc: \".github/workflows/ci.yml:1: the job ci is the shared CI (reusable-ci.yml, CI.md)\" },\n { repo: \"packing\", rule: \"ci\", doc: \".github/workflows/ci.yml:1: the job ci is the shared CI (reusable-ci.yml, CI.md)\" },\n { repo: \"ste-lint\", rule: \"ci\", doc: \".github/workflows/ci.yml (2026-11-07): its own steps, no call of reusable-ci.yml; the same in optional and lag\" },\n ],\n options: {\n home: { type: \"strings\", default: [\"template-monorepo\"], description: \"The names of the root packages that own the shared workflows. The rule does not examine them.\" },\n ciFile: { type: \"string\", default: \".github/workflows/ci.yml\", description: \"The workflow file that must call the shared CI.\" },\n },\n check(context, options) {\n const home = options[\"home\"] as readonly string[];\n const name = context.rootPackage.manifest[\"name\"];\n if (typeof name === \"string\" && home.includes(name)) return { skipped: `the repository is the home of the shared workflows (${name})` };\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n const breaks: Break[] = [];\n for (const file of files.filter((path) => WORKFLOW.test(path)).sort(byCode)) {\n if (SHARED_WORKFLOWS.includes(baseName(file))) breaks.push({ file, message: `${file} has the name of a shared workflow of the template: it is a local copy, which does not get the fixes of the template.` });\n }\n const actions = new Set<string>();\n for (const file of files) {\n const folder = ACTION.exec(file)?.[1];\n if (folder !== undefined && SHARED_ACTIONS.includes(folder) && !actions.has(folder)) {\n actions.add(folder);\n breaks.push({ file: `.github/actions/${folder}`, message: `.github/actions/${folder} has the name of a shared action of the template: it is a local copy, which does not get the fixes of the template.` });\n }\n }\n const ciFile = options[\"ciFile\"] as string;\n const path = join(context.root, ciFile);\n if (!existsSync(path)) breaks.push({ file: ciFile, message: `${ciFile} is missing, so no job calls the shared CI of the template.` });\n else if (!callsSharedCi(ciFile, readFileSync(path, \"utf8\"))) breaks.push({ file: ciFile, message: `No job of ${ciFile} calls ${SHARED_CI}: the CI runs its own steps, and does not get the checks of the template.` });\n return breaks;\n },\n};\n","/**\n * The rule `tsconfig-test`: each TypeScript package has a `tsconfig.test.json`, and its typecheck\n * examines it.\n */\nimport { codePackages, hasFile, inFolder, lineOf, type Break, type Rule } from \"../rule.ts\";\n\n/** The ends of the name of a test file: `.test.` or `.spec.`, then an extension of JavaScript or TypeScript. */\nconst TEST_ENDS = [\"test\", \"spec\"].flatMap((kind) => [\"\", \"c\", \"m\"].flatMap((module) => [\"j\", \"t\"].flatMap((lang) => [\"\", \"x\"].map((jsx) => `.${kind}.${module}${lang}s${jsx}`))));\n\n/**\n * This function tells if a path is a test file: `*.test.*` or `*.spec.*` of JavaScript or TypeScript, or a file in a\n * folder `__tests__`. It uses string operations, with no regular expression, so a long path takes linear time.\n */\nexport function isTestFile(path: string): boolean {\n const segments = path.split(\"/\");\n const name = segments[segments.length - 1] ?? \"\";\n if (name !== \"\" && segments.slice(0, -1).includes(\"__tests__\")) return true;\n return TEST_ENDS.some((end) => name.length > end.length && name.endsWith(end));\n}\n\n/** This function tells if git tracks a test file in the package folder `folder` (`\"\"` is the root). */\nexport function hasTests(files: readonly string[], folder: string): boolean {\n const prefix = folder === \"\" ? \"\" : `${folder}/`;\n return files.some((path) => path.startsWith(prefix) && isTestFile(path.slice(prefix.length)));\n}\n\nexport const tsconfigTest: Rule = {\n id: \"tsconfig-test\",\n title: \"Each package with a `tsconfig.json` and test files has a `tsconfig.test.json`, and its `typecheck` script examines it.\",\n reason: \"The build config leaves out the tests. Without a second config, `pnpm typecheck` does not examine the tests, and a type error in a test hides until the test runs.\",\n fix: \"Add `tsconfig.test.json` (extends `./tsconfig.json`, includes the tests, `noEmit`), and set the script `typecheck` to `tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json`. Keep `--noEmit` on the first call when the build config emits, so that a typecheck writes no build output.\",\n sources: [\n { repo: \"coeval\", rule: \"package-tsconfig-test\", doc: \"CLAUDE.md:18\" },\n { repo: \"coeval\", rule: \"tsconfig-test\", doc: \"CLAUDE.md:18\" },\n { repo: \"crawler\", rule: \"pkg-tsconfig-test\", doc: \"CLAUDE.md:18\" },\n { repo: \"crawler\", rule: \"tsconfig-test\", doc: \"CLAUDE.md:18\" },\n { repo: \"headroom\", rule: \"tsconfig-test\", doc: \"CLAUDE.md:32\" },\n { repo: \"headroom\", rule: \"tsconfig-test-per-package\", doc: \"CLAUDE.md:32\" },\n { repo: \"Vex\", rule: \"package-tsconfig-test\", doc: \"CLAUDE.md:23\" },\n { repo: \"Vex\", rule: \"tsconfig-test\", doc: \"CLAUDE.md:23\" },\n ],\n options: {\n file: { type: \"string\", default: \"tsconfig.test.json\", description: \"The name of the config of the tests.\" },\n },\n check(context, options) {\n const file = typeof options[\"file\"] === \"string\" ? options[\"file\"] : \"tsconfig.test.json\";\n const tracked = context.gitFiles();\n const breaks: Break[] = [];\n for (const info of codePackages(context)) {\n if (!hasFile(info.dir, \"tsconfig.json\")) continue;\n // A package with no test file has no test to examine. Outside git the rule cannot tell, so it examines the package\n if (tracked !== undefined && !hasTests(tracked, info.folder)) continue;\n if (!hasFile(info.dir, file)) {\n breaks.push({ file: inFolder(info.folder, file), message: `The package has a tsconfig.json and no ${file}.` });\n continue;\n }\n const scripts = info.manifest[\"scripts\"];\n const typecheck = typeof scripts === \"object\" && scripts !== null ? (scripts as Record<string, unknown>)[\"typecheck\"] : undefined;\n if (typeof typecheck === \"string\" && !typecheck.includes(file)) {\n const line = lineOf(info.text, '\"typecheck\"');\n breaks.push({\n file: info.file,\n ...(line === undefined ? {} : { line }),\n message: `The script typecheck (\"${typecheck}\") does not examine ${file}.`,\n fix: `Add \\`tsc -p ${file}\\` to the script typecheck.`,\n });\n }\n }\n return breaks;\n },\n};\n","/**\n * The rule `service-run-main`: in a server package, only the entry `src/main.ts` starts the service with `run()`. A\n * server package is a package with a dependency on `@mark1russell7/service` and a file `src/main.ts`, as the preset\n * `service` of `pnpm package add` writes it. The other source files declare the service and give it to the entry.\n */\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { byCode } from \"../workspace.ts\";\nimport { codePackages, hasFile, inFolder, type Break, type Rule } from \"../rule.ts\";\nimport { isTestFile } from \"./tsconfig-test.ts\";\n\n/** The package of the service. */\nexport const SERVICE_PACKAGE = \"@mark1russell7/service\";\n\n/** An import of the service package or of one of its entries. The groups are the name of the entry, if it has one. */\nconst SERVICE_IMPORT = /\\bfrom\\s+[\"']@mark1russell7\\/service(?:\\/([^\"']*))?[\"']|\\bimport\\s*\\(\\s*[\"']@mark1russell7\\/service(?:\\/([^\"']*))?[\"']\\s*\\)/g;\n\n/**\n * The entries of the service package that give only tools: no service and no part of one. A value of these entries can\n * have its own `run`, for example the pool of `/channel`. Each other entry, a new entry too, counts as an entry of a\n * service, so the rule stays strict.\n */\nconst TOOL_ENTRIES: ReadonlySet<string> = new Set([\"channel\", \"clock\", \"heartbeat\", \"backoff\", \"limiter\", \"rules\"]);\n\n/** This function tells if a source text imports the root of the service package, or an entry that is not a tool entry. */\nfunction importsService(text: string): boolean {\n for (const match of text.matchAll(SERVICE_IMPORT)) {\n const entry = match[1] ?? match[2];\n if (entry === undefined || !TOOL_ENTRIES.has(entry)) return true;\n }\n return false;\n}\n\n/** A call of `run(` on a value, but not on `this`. */\nconst RUN_CALL = /(?<!\\bthis)\\.run\\s*\\(/;\n\n/** The source files that the rule reads. */\nconst SOURCE = /\\.(c|m)?tsx?$/;\n\n/**\n * This function gives the lines (from 1) of the calls of `run(` in a source text that imports the service package. A\n * text that imports only the tool entries (`/channel`, `/clock`, `/heartbeat`, `/backoff`, `/limiter`, `/rules`) has\n * no calls: those entries give no service.\n */\nexport function runCalls(text: string): number[] {\n if (!importsService(text)) return [];\n const found: number[] = [];\n text.split(/\\r?\\n/).forEach((line, index) => {\n const comment = line.indexOf(\"//\");\n const code = comment < 0 ? line : line.slice(0, comment);\n const trimmed = code.trimStart();\n if (trimmed.startsWith(\"*\") || trimmed.startsWith(\"/*\")) return;\n if (RUN_CALL.test(code)) found.push(index + 1);\n });\n return found;\n}\n\n/** This function tells if a manifest has a dependency on the service package. */\nconst dependsOnService = (manifest: Readonly<Record<string, unknown>>): boolean => {\n const dependencies = manifest[\"dependencies\"];\n return typeof dependencies === \"object\" && dependencies !== null && SERVICE_PACKAGE in dependencies;\n};\n\nexport const serviceRunMain: Rule = {\n id: \"service-run-main\",\n title: \"In a server package, only the entry `src/main.ts` starts the service with `run()`.\",\n reason:\n \"run() of @mark1russell7/service owns the process: it starts the listeners, it reads the signals, and it ends the process. A module that starts it cannot be imported by a test or by a second entry without a second server. When only the entry starts it, each other module gives a service that a test can start, check and stop.\",\n fix: \"Move the call of run() to src/main.ts. Export the service (or a function that makes it) from the module, and start it in the entry.\",\n sources: [\n { repo: \"template\", rule: \"service-preset\", doc: \"CLAUDE.md: make a server package with --preset=service; only its entry src/main.ts uses run() of @mark1russell7/service\" },\n { repo: \"template\", rule: \"service-preset\", doc: \"packages/cli/src/commands/package/add.ts: the preset service writes src/main.ts and the script start\" },\n { repo: \"systems\", rule: \"service-run-main\", doc: \"packages/reference/src/main.ts:3: only this file starts run()\" },\n { repo: \"vex\", rule: \"service-run-main\", doc: \"packages/mcp/src/main.ts: the one call of run() of the package\" },\n ],\n options: {\n main: { type: \"string\", default: \"src/main.ts\", description: \"The entry of a server package, the one file that starts the service.\" },\n },\n check(context, options) {\n const main = typeof options[\"main\"] === \"string\" ? options[\"main\"] : \"src/main.ts\";\n const tracked = context.gitFiles();\n if (tracked === undefined) return { skipped: \"the root is not in a git repository\" };\n const breaks: Break[] = [];\n for (const info of codePackages(context)) {\n if (!dependsOnService(info.manifest) || !hasFile(info.dir, main)) continue;\n const prefix = info.folder === \"\" ? \"\" : `${info.folder}/`;\n const entry = inFolder(info.folder, main);\n const own = tracked.filter((path) => path.startsWith(`${prefix}src/`) && SOURCE.test(path) && !/\\.d\\.(c|m)?ts$/.test(path) && path !== entry && !isTestFile(path.slice(prefix.length)));\n for (const file of own.sort(byCode)) {\n let text: string;\n try {\n text = readFileSync(join(context.root, file), \"utf8\");\n } catch {\n continue;\n }\n for (const line of runCalls(text)) breaks.push({ file, line, message: `${file} starts the service with run(). In a server package only ${entry} does.` });\n }\n }\n return breaks;\n },\n};\n","/**\n * The change that a check examines: the option `--base`, the merge commit of a pull request, or a push to the default\n * branch. The rule release-files reads its changed files, and the runner reads the files that it adds.\n */\nimport { existsSync, readFileSync } from \"node:fs\";\nimport type { RuleContext } from \"./rule.ts\";\n\n/** The range of commits of the change. */\nexport interface Range {\n /** The arguments of `git diff --name-only` that give the changed files. */\n readonly diff: readonly string[];\n /** The arguments of `git log` that give the commit messages. */\n readonly log: readonly string[];\n /** The two ends of the change. The checkout must have their merge base, or `log` does not give each commit of the change. */\n readonly ends: readonly [string, string];\n}\n\n/** The options of `rangeOf`. */\nexport interface RangeOptions {\n /**\n * When true, a push to the default branch also has a range: the commits of the push. The default is false, because\n * the body of a pull request and the files that it adds are not facts of a push.\n */\n readonly push?: boolean;\n}\n\n/** The facts of a push in the event file of GitHub Actions. */\ninterface PushEvent {\n readonly before?: unknown;\n readonly ref?: unknown;\n readonly repository?: { readonly default_branch?: unknown };\n}\n\n/** This function gives the range of the commits of a push to the default branch, from the event file of GitHub Actions. */\nfunction pushRange(context: RuleContext): Range | { readonly skipped: string } {\n const file = context.env[\"GITHUB_EVENT_PATH\"];\n let event: PushEvent | undefined;\n try {\n event = file === undefined || file === \"\" || !existsSync(file) ? undefined : (JSON.parse(readFileSync(file, \"utf8\")) as PushEvent);\n } catch {\n event = undefined;\n }\n if (event === undefined) return { skipped: \"the push has no event file (GITHUB_EVENT_PATH)\" };\n const branch = event.repository?.default_branch;\n if (typeof branch !== \"string\" || event.ref !== `refs/heads/${branch}`) return { skipped: \"the push is not to the default branch: the pull request of the branch has the change\" };\n const before = typeof event.before === \"string\" ? event.before : \"\";\n if (!/^[0-9a-f]{40,64}$/.test(before) || /^0+$/.test(before)) return { skipped: \"the push has no commit before it\" };\n if (context.git([\"rev-parse\", \"--verify\", \"--quiet\", `${before}^{commit}`]) === undefined) {\n return { skipped: `the checkout does not have ${before}, the commit before the push: fetch it, or set fetch-depth to 0` };\n }\n return { diff: [before, \"HEAD\"], log: [`${before}..HEAD`], ends: [before, \"HEAD\"] };\n}\n\n/**\n * This function gives the range of the change: the option `--base`, or the merge commit of a pull request. With the\n * option `push`, a push to the default branch gives the commits of the push: from the commit before the push to HEAD.\n */\nexport function rangeOf(context: RuleContext, options: RangeOptions = {}): Range | { readonly skipped: string } {\n if (context.base !== undefined) {\n if (context.git([\"rev-parse\", \"--verify\", \"--quiet\", `${context.base}^{commit}`]) === undefined) return { skipped: `git does not know the base ${context.base}` };\n return { diff: [`${context.base}...HEAD`], log: [`${context.base}..HEAD`], ends: [context.base, \"HEAD\"] };\n }\n const event = context.env[\"GITHUB_EVENT_NAME\"];\n if (event === \"push\" && options.push === true) return pushRange(context);\n if (event !== \"pull_request\" && event !== \"pull_request_target\") return { skipped: \"no base: the rule runs on a pull request, or with --base <ref>\" };\n // The checkout of a pull request is a merge commit: its first parent is the base, its second parent the head\n const parents = context.git([\"rev-list\", \"--parents\", \"-n\", \"1\", \"HEAD\"])?.trim().split(/\\s+/) ?? [];\n if (parents.length !== 3) return { skipped: \"HEAD is not the merge commit of the pull request\" };\n if (context.git([\"cat-file\", \"-e\", \"HEAD^1^{commit}\"]) === undefined) return { skipped: \"the checkout has no parent of HEAD: set fetch-depth to 2 or more\" };\n return { diff: [\"HEAD^1\", \"HEAD\"], log: [\"HEAD^1..HEAD\"], ends: [\"HEAD^1\", \"HEAD^2\"] };\n}\n\n/**\n * This function gives the files that the change adds, relative to the root, with `/`. A renamed file is not added.\n * With no change (no base and no pull request), it gives undefined.\n */\nexport function addedFiles(context: RuleContext): ReadonlySet<string> | undefined {\n const range = rangeOf(context);\n if (\"skipped\" in range) return undefined;\n const out = context.git([\"diff\", \"--name-only\", \"--find-renames\", \"--diff-filter=A\", ...range.diff]);\n if (out === undefined) return undefined;\n return new Set(out.split(/\\r?\\n/).filter((file) => file !== \"\"));\n}\n\n/**\n * This function gives the lines that the change adds, for each changed file: the numbers (from 1) of the new file.\n * A renamed file with no other change has no added lines. With no change (no base and no pull request), it gives undefined.\n */\nexport function addedLines(context: RuleContext): ReadonlyMap<string, ReadonlySet<number>> | undefined {\n const range = rangeOf(context);\n if (\"skipped\" in range) return undefined;\n const out = context.git([\"diff\", \"--unified=0\", \"--no-color\", \"--no-ext-diff\", \"--src-prefix=a/\", \"--dst-prefix=b/\", \"--find-renames\", \"--diff-filter=AMR\", ...range.diff]);\n if (out === undefined) return undefined;\n const lines = new Map<string, Set<number>>();\n let file: string | undefined;\n for (const line of out.split(/\\r?\\n/)) {\n if (line.startsWith(\"+++ \")) {\n file = line === \"+++ /dev/null\" ? undefined : line.slice(6);\n continue;\n }\n const hunk = /^@@ -\\d+(?:,\\d+)? \\+(\\d+)(?:,(\\d+))? @@/.exec(line);\n if (hunk === null || file === undefined) continue;\n const start = Number(hunk[1]);\n const count = hunk[2] === undefined ? 1 : Number(hunk[2]);\n let set = lines.get(file);\n if (set === undefined) lines.set(file, (set = new Set()));\n for (let index = 0; index < count; index++) set.add(start + index);\n }\n return lines;\n}\n","// Generated by scripts/homes/exports.ts from the latest version of each home package on npm. Do not edit by hand.\n/** The names of the values that each home package exports, with the version that the names come from. */\nexport const HOME_EXPORTS: Readonly<Record<string, { readonly version: string; readonly names: readonly string[] }>> = {\n \"@mark1russell7/algebra\": { version: \"0.8.1\", names: [\"FIRED\",\"ReplayOptions\",\"Replayable\",\"Transition\",\"algebraProblems\",\"arr\",\"detection\",\"errnoOf\",\"evaluate\",\"exprKnobs\",\"firings\",\"fromStates\",\"machineProblems\",\"machineSchema\",\"modelSource\",\"overValues\",\"parseExpr\",\"probeTrain\",\"readsFired\",\"realizationKnobs\",\"realizationOf\",\"recovery\",\"replay\",\"stackedDetection\",\"timerBand\",\"timerOf\",\"timerUnder\",\"transitionOn\"] },\n \"@mark1russell7/api-report\": { version: \"0.4.0\", names: [\"DEFAULT_TOOL\",\"HEADER_LINES\",\"PUBLISH_CONFIG_FIELDS\",\"REPORT_FILE\",\"USAGE\",\"apiReport\",\"binsOf\",\"byCode\",\"declarationPathOf\",\"diffLines\",\"entriesOf\",\"formatResult\",\"globFolders\",\"globToRegExp\",\"packageFolders\",\"packageReport\",\"pageFaults\",\"parseDeclarations\",\"patternMatch\",\"publishedManifest\",\"readConfig\",\"referencePage\",\"reportEntries\",\"runCli\",\"runReports\",\"statementsOf\",\"summaryMarkdown\",\"targetOf\",\"unifiedDiff\",\"workspaceGlobs\"] },\n \"@mark1russell7/boundaries\": { version: \"0.2.0\", names: [\"BoundaryOptions\",\"Config\",\"DefaultOptionsInput\",\"Rule\",\"RuleOptions\",\"ScopeOptions\",\"WorkspacePackage\",\"boundaries\",\"boundaryRules\",\"declaredDependencies\",\"defaultOptions\",\"doNotFollowPaths\",\"entryPattern\",\"packageEntries\",\"parserOptions\",\"workspaceGlobs\",\"workspacePackages\",\"workspaceScopes\"] },\n \"@mark1russell7/coeval\": { version: \"0.22.0\", names: [\"ATTRIBUTE_RUNGS\",\"CAPS_TYPE\",\"CIRCULAR_LIMIT\",\"CONSTRUCTS\",\"ENVELOPE_KEYS\",\"Failure\",\"Held\",\"JOURNAL\",\"MergeError\",\"PARTS\",\"PART_INFO\",\"ROOTS\",\"RUNGS\",\"STD_CAPS\",\"STD_DEFINITIONS\",\"STD_DOMAINS\",\"STD_EVALUATORS\",\"STD_EXT\",\"STD_MACHINE\",\"STD_RUNNERS\",\"STD_SYNTAX\",\"STD_WALKERS\",\"STD_WORLD\",\"THING\",\"WORLD_SYNTAX\",\"agree\",\"agreeRun\",\"agreeSchedule\",\"argsKey\",\"ask\",\"atArgsOf\",\"atRuleOf\",\"attributeGraph\",\"attributeTrace\",\"attributeVertexId\",\"capKeys\",\"check\",\"checkLatent\",\"checkStep\",\"checkSteps\",\"checkWorld\",\"circularOf\",\"classify\",\"collectOf\",\"components\",\"conforms\",\"context\",\"cycles\",\"dataEdges\",\"decodeDomain\",\"decodeLog\",\"decodeValue\",\"derefStep\",\"describe\",\"docEquals\",\"durable\",\"edgesOf\",\"effectEdges\",\"effectsOf\",\"effectsOfVerb\",\"encodeLog\",\"encodeValue\",\"entriesAsJson\",\"equationType\",\"evaluate\",\"extendDomain\",\"factsOf\",\"fail\",\"failures\",\"field\",\"fits\",\"flatten\",\"formulaDefinitions\",\"formulaEvaluators\",\"formulaFacts\",\"formulaKinds\",\"formulaKnown\",\"formulaMachine\",\"fromJson\",\"generate\",\"heights\",\"intersectCaps\",\"isAlias\",\"isAllowedOrder\",\"isClosure\",\"isEnvelope\",\"isHostThing\",\"isKey\",\"isKind\",\"isNamespace\",\"isRecord\",\"isRef\",\"isStackOverflow\",\"isStep\",\"isTypeRef\",\"join\",\"jsTruthy\",\"kindDocument\",\"kindNamed\",\"kindOf\",\"layers\",\"looksLikeKind\",\"lookupKind\",\"makeContext\",\"mapRefs\",\"member\",\"mergeMachines\",\"mergeWorlds\",\"narrow\",\"nearestWalker\",\"necessary\",\"nodeAt\",\"nodeLayers\",\"ok\",\"parse\",\"partCaps\",\"partsOf\",\"pathMatches\",\"permits\",\"placeOf\",\"placed\",\"planner\",\"prepare\",\"print\",\"printReads\",\"random\",\"recorder\",\"ref\",\"reference\",\"referenceRun\",\"refsOf\",\"replayer\",\"resolve\",\"restrictMachine\",\"restrictWorld\",\"run\",\"sameResult\",\"sameValue\",\"schedule\",\"splitParts\",\"stepLadder\",\"stepOf\",\"stepRank\",\"stored\",\"syntaxFormat\",\"tag\",\"thrown\",\"toJson\",\"treeNodeEvaluator\",\"typeCheck\",\"typeFromSamples\",\"typeFromSchema\",\"typeIssues\",\"typeName\",\"typePath\",\"typeText\",\"typed\",\"typesOf\",\"valueOfThing\",\"verifyReads\",\"walk\",\"worldThing\"] },\n \"@mark1russell7/collections\": { version: \"0.4.0\", names: [\"ArrayConvertible\",\"ArrayDeque\",\"ArrayDequeOptions\",\"ArrayList\",\"ArrayListOptions\",\"Async\",\"AsyncEmitter\",\"AsyncOption\",\"AsyncQueue\",\"AsyncQueueOptions\",\"AsyncResult\",\"Asyncify\",\"BiMap\",\"Bounded\",\"BoundedCollection\",\"Chain\",\"Channel\",\"CircularList\",\"Clearable\",\"Cloneable\",\"Collection\",\"CollectionBuilder\",\"CollectionEvents\",\"Collector\",\"CompactionPolicy\",\"Compare\",\"ComparisonProvider\",\"Composed\",\"ConflictResolutionPolicy\",\"ContractViolation\",\"DEFAULT_CONFLICT_POLICY\",\"DEFAULT_EVICTION_POLICY\",\"DEFAULT_GROWTH_POLICY\",\"DEFAULT_OVERFLOW_POLICY\",\"DEFAULT_RETRY_POLICY\",\"DEFAULT_UNDERFLOW_POLICY\",\"DEFAULT_VALIDATION_POLICY\",\"DequeEvents\",\"Disposable\",\"ElementOf\",\"ElementType\",\"Emitter\",\"Emptiable\",\"Entry\",\"Eq\",\"EqualityProvider\",\"Err\",\"EventBatcher\",\"EventMap\",\"Evented\",\"EvictionCandidate\",\"EvictionMetadata\",\"EvictionPolicy\",\"EvictionSelector\",\"Freezable\",\"GrowthPolicy\",\"Hash\",\"HashMap\",\"HashMapOptions\",\"HashProvider\",\"HashSet\",\"HashSetOptions\",\"InnerOf\",\"IsReadonly\",\"KEY_DIGITS\",\"LRUCache\",\"LRUOptions\",\"Layer\",\"LinkedHashMap\",\"LinkedHashMapOptions\",\"LinkedList\",\"LinkedListOptions\",\"List\",\"ListEvents\",\"Listener\",\"MapEvents\",\"MapLike\",\"MergeFunction\",\"Middleware\",\"MultiMap\",\"MutableCollectionBase\",\"NavigableMap\",\"NavigableSet\",\"None\",\"Ok\",\"Option\",\"OuterOf\",\"Outers\",\"OverflowContext\",\"OverflowHandler\",\"OverflowPolicy\",\"PriorityQueue\",\"PriorityQueueOptions\",\"QueueEvents\",\"RandomAccess\",\"Readonly\",\"ReadonlyCollection\",\"ReadonlyCollectionBase\",\"ReadonlyList\",\"ReadonlyMapLike\",\"ReadonlyOptions\",\"ReadonlySet\",\"Result\",\"RetryContext\",\"RetryPolicy\",\"RetryPredicate\",\"SafeCollection\",\"SafeDequeOperations\",\"SafeListOperations\",\"SafeMapOperations\",\"SafeQueueOperations\",\"SelectCase\",\"Set\",\"Settled\",\"Sized\",\"Some\",\"SortedMap\",\"SortedSet\",\"Stack\",\"Stacked\",\"StorageListeners\",\"SummaryStatistics\",\"SummaryTree\",\"TTLCache\",\"TTLOptions\",\"TreeMap\",\"TreeMapOptions\",\"TreeSet\",\"TreeSetOptions\",\"UnderflowContext\",\"UnderflowHandler\",\"UnderflowPolicy\",\"Unsubscribe\",\"ValidationContext\",\"ValidationHandler\",\"ValidationPolicy\",\"Vector\",\"WeakMapLike\",\"WithCapability\",\"arrayContains\",\"arrayDeque\",\"arrayIterator\",\"arrayList\",\"arrayRemove\",\"arrayRemoveAll\",\"asSettled\",\"asyncQueue\",\"average\",\"averagingNumber\",\"blockMethods\",\"booleanCompare\",\"bounded\",\"boundedDeque\",\"boundedList\",\"boundedMap\",\"boundedQueue\",\"buffered\",\"buildLeveledDAG\",\"buildList\",\"buildMap\",\"buildNodeMap\",\"bundle\",\"channel\",\"checkBounds\",\"checkInsertBounds\",\"checkRangeBounds\",\"chunk\",\"clamp\",\"collect\",\"collectToArray\",\"collectToList\",\"collectToMap\",\"collectToSet\",\"combineHashes\",\"compareKeys\",\"comparing\",\"comparingKey\",\"compose\",\"concat\",\"count\",\"counting\",\"createEmitter\",\"createNode\",\"createProcessor\",\"dateCompare\",\"deepEq\",\"deepEqual\",\"defaultCompare\",\"defaultEq\",\"defaultHash\",\"delegate\",\"distinct\",\"distinctConsecutive\",\"dropIndex\",\"emptyList\",\"emptyMap\",\"emptyQueue\",\"enhanceMethod\",\"enumerate\",\"eqBy\",\"evented\",\"eventedDeque\",\"eventedList\",\"eventedMap\",\"eventedQueue\",\"every\",\"executeDAG\",\"executeDAGSequential\",\"fanIn\",\"fanOut\",\"filter\",\"filterDAGFromRoot\",\"filtering\",\"find\",\"findIndex\",\"findLastIndex\",\"first\",\"flatMap\",\"flatMapOption\",\"flatMapResult\",\"flatMapping\",\"flatten\",\"forwardEvent\",\"fromNullable\",\"getAncestors\",\"getDescendants\",\"getOrElse\",\"getOrElseResult\",\"getTopologicalOrder\",\"groupBy\",\"groupingBy\",\"groupingByWith\",\"hasCapability\",\"hashBy\",\"hashMap\",\"hashNumber\",\"hashSet\",\"hashString\",\"holds\",\"hubBreadthFirstOrder\",\"immutableListOf\",\"immutableMapOf\",\"interceptMethods\",\"isErr\",\"isNone\",\"isOk\",\"isSome\",\"isValidKey\",\"iterToMap\",\"joining\",\"keyBetween\",\"keysBetween\",\"keysForDrop\",\"last\",\"linkedHashMap\",\"linkedList\",\"listOf\",\"lruCache\",\"lruMap\",\"map\",\"mapAsyncOption\",\"mapAsyncResult\",\"mapError\",\"mapOf\",\"mapOption\",\"mapResult\",\"mapping\",\"max\",\"maxBy\",\"merge\",\"min\",\"minBy\",\"mutableListOf\",\"mutableMapOf\",\"nCopies\",\"none\",\"nullsFirst\",\"nullsLast\",\"numberCompare\",\"onWhen\",\"optionToResult\",\"partition\",\"partitioningBy\",\"pipe\",\"pipeline\",\"priorityQueue\",\"queueOf\",\"range\",\"rangeTo\",\"readWriteLock\",\"readonly\",\"readonlyCollection\",\"readonlyList\",\"readonlyMap\",\"readonlyQueue\",\"reduce\",\"reducing\",\"reducingWith\",\"reentrantSynchronized\",\"rejects\",\"reportListenerError\",\"requireNonEmpty\",\"requireNonNull\",\"resultToOption\",\"reverse\",\"reverseArrayIterator\",\"reversed\",\"safe\",\"safeDeque\",\"safeList\",\"safeMap\",\"safeQueue\",\"same\",\"scan\",\"select\",\"sequence\",\"sequenceResults\",\"shallowEq\",\"show\",\"singletonList\",\"singletonMap\",\"skip\",\"skipWhile\",\"some\",\"sort\",\"stringCompare\",\"stringCompareIgnoreCase\",\"stringHashCode\",\"sum\",\"summarizingNumber\",\"summaryTree\",\"summingNumber\",\"synchronized\",\"synchronizedCollection\",\"synchronizedList\",\"synchronizedMap\",\"synchronizedSet\",\"take\",\"takeWhile\",\"tap\",\"teeing\",\"thenComparing\",\"ticker\",\"timeout\",\"toArray\",\"toList\",\"toMap\",\"toNullable\",\"toSet\",\"treeMap\",\"treeSet\",\"tryCatch\",\"tryCatchAsync\",\"ttlCache\",\"ttlCollection\",\"ttlMap\",\"unbuffered\",\"unmodifiableCollection\",\"unmodifiableList\",\"unmodifiableMap\",\"unwrap\",\"unwrapResult\",\"visualizeDAG\",\"window\",\"workerPool\",\"zip\"] },\n \"@mark1russell7/conventions\": { version: \"0.32.0\", names: [\"ACTIONS_COMMIT\",\"DEFAULT_ALLOWED\",\"DEPENDENCY_FIELDS\",\"HOMES\",\"HOME_EXPORTS\",\"HOME_PATTERNS\",\"HOME_TIMEOUT_MS\",\"IGNORE_AFTER\",\"LICENSE_TEXTS\",\"MAP_RULE\",\"MAX_NOTES\",\"NPM_REGISTRY\",\"PAGES_WORKFLOWS\",\"REAL_COMPARE\",\"RULES\",\"SHIPPED_FIELDS\",\"STRICT_OPTIONS\",\"TRAIN_SCOPES\",\"UNSHIPPED_FILES\",\"USAGE\",\"annotations\",\"apiReportScript\",\"authorOf\",\"blockHash\",\"changelogSection\",\"cleanPath\",\"codePackages\",\"configsOfScript\",\"conventions\",\"convertGate\",\"createContext\",\"cuePreset\",\"declaredName\",\"defaultOptions\",\"findHomes\",\"formatResult\",\"gateAfterCancel\",\"gateTrigger\",\"githubFetch\",\"globFolders\",\"globToRegExp\",\"hasFile\",\"hasImportMetaMain\",\"hasTests\",\"homePackage\",\"inFolder\",\"isGitSpecifier\",\"isPinned\",\"isSourcePath\",\"keyLine\",\"licenseFile\",\"licenseFileOf\",\"lineOf\",\"listRules\",\"lockedVersions\",\"mainCheck\",\"mapMarkdown\",\"mapText\",\"matchesAny\",\"mergeHomes\",\"messageOf\",\"minorOf\",\"mitText\",\"noBuildOutput\",\"noLocalPaths\",\"npmLookup\",\"npmUrl\",\"packageFolders\",\"pagesAfterRelease\",\"pagesCalls\",\"pagesSite\",\"parseConfig\",\"parseJsonc\",\"pathsOf\",\"pinnedGitDeps\",\"pipeFails\",\"prPathFilters\",\"publishedMinor\",\"publishedMinorRule\",\"pushMainOnly\",\"reachOf\",\"readConfig\",\"readJsonc\",\"readOverlay\",\"readWorkflow\",\"releaseFiles\",\"releaseNotes\",\"replaceLine\",\"repoOf\",\"repositoryIsPublic\",\"repositoryOfRemote\",\"requiredScripts\",\"roadmapOfLine\",\"roadmapParses\",\"runChecks\",\"runCli\",\"runFix\",\"runGit\",\"runnerBudget\",\"scheduleMinute\",\"scriptsOf\",\"sharedDocsRule\",\"signaturesOf\",\"sourceMain\",\"specifiersOf\",\"summaryMarkdown\",\"summaryName\",\"tagName\",\"testsRequired\",\"trustPolicy\",\"tsconfigTest\",\"typedFiles\",\"typedScripts\",\"unreleasedChange\",\"unreleasedChangeRule\",\"workspaceGlobs\",\"workspaceProtocol\"] },\n \"@mark1russell7/cue\": { version: \"2.1.1\", names: [\"CueOutput\",\"CueTarget\",\"Feature\",\"FeaturesManifest\",\"PackageJson\",\"TsconfigPreset\",\"cueEvalArgs\",\"cueFileOf\",\"cueFiles\",\"cueTargets\",\"dependenciesJsonText\",\"featureToFieldName\",\"generateFiles\",\"generateTsconfigFiles\",\"gitignoreText\",\"mergePackageJson\",\"packageRoot\",\"presetFeatures\",\"readFeatures\",\"resolveFeatures\",\"tsconfigPresetOf\",\"tsconfigPresetPath\",\"tsconfigPresets\"] },\n \"@mark1russell7/highways\": { version: \"0.15.0\", names: [\"ADAM_DEFAULTS\",\"ADAM_SCHEMA\",\"ALL_STRATEGIES\",\"AMBIGUITY_GUARD_DEFAULTS\",\"ANNEALING_DEFAULTS\",\"ANNEALING_SCHEMA\",\"APPROVAL_DEFAULTS\",\"APPROVAL_PICKS\",\"ARC_SOURCES\",\"AREA_DEFAULTS\",\"AREA_WIDTHS\",\"ASSIGN_DEFAULTS\",\"ATTRACTION_DEFAULTS\",\"ATTRACTION_SCHEMA\",\"ActivationReport\",\"ActivationRow\",\"Ambiguity\",\"AmbiguityOptions\",\"Among\",\"AnyCompareOptions\",\"AnyCompareRow\",\"AnyOption\",\"AnyStepComparison\",\"AnyStrategy\",\"ArcSegment\",\"AssignOptions\",\"BACKTRACK_MIN\",\"BACKTRACK_SHARE\",\"BALANCE_DEFAULTS\",\"BALANCE_ENDS\",\"BASELINE_STRATEGIES\",\"BIPARTITE\",\"BIPARTITE_LAYOUTS\",\"BOARD_PORTFOLIO_DEFAULTS\",\"BOARD_PORTFOLIO_SETTINGS\",\"BOTTLENECK\",\"BREAK\",\"BREAK_EVEN\",\"BREAK_EVEN_DEFAULTS\",\"BRONCHIAL_DEFAULTS\",\"BRONCHIAL_SPLITS\",\"BUILT_IN_STRATEGIES\",\"BUNDLE_COUNTER\",\"BenchOptions\",\"BenchRow\",\"BenchRun\",\"BendRoomRow\",\"BoardPortfolioOptions\",\"BoardPortfolioRun\",\"BooleanOption\",\"BootstrapMedian\",\"BoundaryWalk\",\"Box\",\"Boxed\",\"Bundle\",\"BundleStretch\",\"CANAL_DEFAULTS\",\"CANAL_SCHEMA\",\"CANDIDATE_SOURCES\",\"CAP_SWEEP\",\"CASES\",\"CHANNEL\",\"CHANNEL_REACH\",\"CHOICE_DEFAULTS\",\"CHOICE_FEATURES\",\"CHOICE_FEATURE_SETS\",\"CHOICE_TABLE\",\"CHOICE_TRIES\",\"CLEARANCE_CAP\",\"COMB\",\"COMPARE_ALL_STEPS\",\"COMPARE_STEPS\",\"CONFLUENT_DEFAULTS\",\"CONSENSUS_DEFAULTS\",\"CONSENSUS_LINKAGES\",\"CORRIDOR_DEFAULTS\",\"COVERAGE_FAMILIES\",\"CROP_DEFAULTS\",\"CROSSBAR_DEFAULTS\",\"CUBU_DEFAULTS\",\"CURRICULUM_DEFAULTS\",\"CURRICULUM_ORDERS\",\"CURRICULUM_POOL\",\"CURVE_TYPES\",\"CUT_DEFAULTS\",\"CappedCell\",\"CaseBoard\",\"CaseSeedOptions\",\"CellGroups\",\"ChoiceFeatureSet\",\"ChoiceOptions\",\"ChoiceRow\",\"ChoiceRun\",\"ClothoidStrategyOptions\",\"CompareOptions\",\"CompareRow\",\"CompareSpec\",\"CompareStep\",\"CornerGraph\",\"CornerGraphOptions\",\"CorpusClaims\",\"CorpusSpec\",\"CropOptions\",\"CropRun\",\"CrossingAngles\",\"CubicSegment\",\"CurriculumOptions\",\"CurriculumOrder\",\"CurriculumRule\",\"CurveBenchOptions\",\"CurveBenchRow\",\"CurveCheck\",\"CurveFaults\",\"CurveInput\",\"CurveJoint\",\"CurveOptions\",\"CurveRun\",\"CurveRunOptions\",\"CurveSegment\",\"CurveType\",\"DEFAULT_RNG\",\"DENSE_GROUPS\",\"DENSITY_KERNELS\",\"DETAIL_DEFAULTS\",\"DIFFUSION_DEFAULTS\",\"DISTORTION_NEIGHBOURS\",\"DIVIDED_DEFAULTS\",\"DepthLevelOptions\",\"DetailOptions\",\"DetourSpread\",\"DrawnSegment\",\"EDGE_DISTANCES\",\"EDGE_PATH_DEFAULTS\",\"ESCAPE\",\"ESCAPE_DEFAULTS\",\"ESCAPE_METHODS\",\"EXACT_CLASSES\",\"EXACT_EDGES_PER_NODE\",\"EXACT_V1\",\"EXACT_V1_BOUNDS\",\"EXACT_V1_BOUNDS_SIZES\",\"EXACT_V1_SEEDS\",\"EXACT_V1_SIZES\",\"Edge\",\"End\",\"EnumOption\",\"EscapeMethod\",\"EscapeOptions\",\"ExactClass\",\"ExactOptimaFile\",\"ExactOptimum\",\"FAN_OUT\",\"FDEB_DEFAULTS\",\"FIREFLY_DEFAULTS\",\"FIXTURES\",\"FIXTURE_LAYOUTS\",\"FIXTURE_LOCALITY\",\"FLOW_CLUSTER_DEFAULTS\",\"FLOW_FIELD_DEFAULTS\",\"FRAME_ROWS\",\"FRECHET_DEFAULTS\",\"FRONT_OBJECTIVES\",\"FireflyOptions\",\"FixPortsOptions\",\"FixtureKind\",\"FixtureSpec\",\"GAP_BASELINES\",\"GAP_BOOTSTRAP\",\"GAP_CAPS\",\"GAP_DEFAULTS\",\"GAP_RULES\",\"GAP_VIEWS\",\"GLOBAL_KEYS\",\"GLOBAL_ORDER_DEFAULTS\",\"GROUP_SCOPES\",\"GROUP_SPINES\",\"GROWTH_DEFAULTS\",\"GROWTH_SWEEP\",\"GUTTER_BEND_COST\",\"Gap\",\"GapLaneCount\",\"GapLaneOptions\",\"GapRule\",\"GapSummary\",\"GapView\",\"Graph\",\"GraphChange\",\"Grid\",\"GroupRule\",\"GroupRun\",\"Grouping\",\"HDBSCAN_DEFAULTS\",\"HIERARCHY_DEFAULTS\",\"HIERARCHY_GROUPS\",\"HIGHWAYS_ENGINE\",\"HIGHWAYS_FAMILIES\",\"HIGHWAY_BASES\",\"HIGHWAY_BASE_ROUTERS\",\"HOUGH_DEFAULTS\",\"HUB_ALLOCATIONS\",\"HUB_ARC_DEFAULTS\",\"HUB_CANDIDATES\",\"HUB_CHAIN\",\"HYSTERESIS_DEFAULTS\",\"HighwayBenchOptions\",\"HighwayBenchRow\",\"HighwayEdits\",\"HighwayIdKeep\",\"HighwayMeasureOptions\",\"HighwayMeasures\",\"HighwayStrategyOptions\",\"HighwaysBoard\",\"HighwaysFamily\",\"HubChainOptions\",\"INTERCHANGE_BASES\",\"INTERCHANGE_DEFAULTS\",\"InflectionOptions\",\"InnerEdge\",\"JOIN_WORK\",\"JogMeasures\",\"KDEEB_DEFAULTS\",\"KD_DEFAULTS\",\"KENDALL_EXACT\",\"KEYED_STRATEGIES\",\"KNEE_DEFAULTS\",\"KNEE_RULES\",\"LANES_DEFAULTS\",\"LANE_CLEAR\",\"LANE_LEAST\",\"LANE_ORDERS\",\"LANE_ROOM_LIMIT\",\"LANE_STRETCH_DEFAULTS\",\"LANE_STRETCH_ORDERS\",\"LANE_TRACKS\",\"LEADER_DEFAULTS\",\"LEADER_TYPES\",\"LEVEL_HIGHWAY_DEFAULTS\",\"LINKAGES\",\"LINK_COMMUNITY_DEFAULTS\",\"LOCAL_MESH\",\"LaneBoard\",\"LaneFidelity\",\"LaneOrder\",\"LaneRoom\",\"LaneRun\",\"LaneStretch\",\"LaneStretchOptions\",\"LaneStretchOrder\",\"LaneTracks\",\"LayoutBox\",\"LayoutCell\",\"LayoutChange\",\"LayoutContainer\",\"LayoutCorpus\",\"LayoutEdge\",\"LayoutGenerator\",\"LayoutInput\",\"LayoutInputHead\",\"LayoutObstacle\",\"LayoutPort\",\"LayoutPrediction\",\"LayoutRecord\",\"LayoutSide\",\"LayoutSource\",\"LeaderOptions\",\"LeaderType\",\"Level\",\"LevelBoard\",\"LevelCut\",\"LevelFaults\",\"LevelInput\",\"LevelItem\",\"LevelLink\",\"LevelRatio\",\"LevelRoom\",\"LevelRoomOptions\",\"LevelRoomPreset\",\"LevelRoomRow\",\"LevelRow\",\"LineSegment\",\"LinkFaultOptions\",\"LinkFaults\",\"MANIFOLD_DEFAULTS\",\"MANIFOLD_SIDES\",\"MANY_GROUPS\",\"MAZE\",\"MEASURES\",\"MEASURE_BALANCE_REACH\",\"MEASURE_LANE_WIDTH\",\"MEET_DEFAULTS\",\"MEMBER_FORMS\",\"MEMBER_MISFITS\",\"MESH_DEFAULTS\",\"MINGLE_DEFAULTS\",\"MIN_EFFECTS\",\"MLSEB_DEFAULTS\",\"MLS_FITS\",\"MODULE_RULES\",\"MOVES_V1\",\"MOVE_BOARDS\",\"MOVE_NAMES\",\"ManyGroupsOptions\",\"MeasureCompare\",\"MeasureInfo\",\"MeasuredLink\",\"MemberForm\",\"MinEffect\",\"MinEffectRule\",\"MinHeap\",\"MoveBoard\",\"MoveCounter\",\"MoveResponse\",\"MoveSegment\",\"NESTED_DEFAULTS\",\"NUDGE_DEFAULTS\",\"NUDGE_SCHEMA\",\"Node\",\"NumberOption\",\"OD_CELL_DEFAULTS\",\"OPT_IN_STRATEGIES\",\"OUTSIDE_SLACK\",\"OUT_STEPS\",\"Objective\",\"Obstacles\",\"OpenLanes\",\"OptionDeclaration\",\"OptionIssue\",\"OptionScale\",\"OptionSchema\",\"OptionSetting\",\"OrderFragility\",\"OrderFragilityOptions\",\"OverLimit\",\"PACKED_GRID\",\"PARALLEL_EDGES\",\"PICK\",\"PIPELINE\",\"PLAN_CHANGERS\",\"PORTFOLIO_B1\",\"PORTFOLIO_BANDS\",\"PORTFOLIO_BASE_MEMBER\",\"PORTFOLIO_CAPS\",\"PORTFOLIO_FIT\",\"PORTFOLIO_HASHES\",\"PORTFOLIO_KS_API\",\"PORTFOLIO_RULES\",\"PORTFOLIO_SETS\",\"POWER_DEFAULTS\",\"PREFERENCE_DEFAULTS\",\"PREFERENCE_FEATURES\",\"PREFERENCE_PANEL\",\"PROPOSED_RULES\",\"P_HUB_DEFAULTS\",\"PackedGridOptions\",\"Paired\",\"Path\",\"PickOptions\",\"PipelineOptions\",\"Plug\",\"PlugInput\",\"PlugPair\",\"PlugSpacing\",\"Point\",\"Port\",\"PortfolioBand\",\"PortfolioCap\",\"PortfolioEntry\",\"PortfolioFacts\",\"PortfolioHashes\",\"PortfolioRoute\",\"PortfolioRouterOptions\",\"PortfolioRule\",\"PortfolioSetting\",\"PredictionCheck\",\"PredictionOp\",\"PreferenceFit\",\"PreferenceModel\",\"PreferenceOptions\",\"PreferencePair\",\"PullApartOptions\",\"QUICKBUNDLES_DEFAULTS\",\"Quality\",\"RECORD_EPS\",\"REPEL_DEFAULTS\",\"REPEL_SCHEMA\",\"REROUTE_DEFAULTS\",\"REROUTE_SCHEMA\",\"RESISTANCE_DEFAULTS\",\"RIDGE_DEFAULTS\",\"RINGS\",\"ROAD_CLASS_DEFAULTS\",\"ROOM_FAMILIES\",\"ROUTED_STEPS\",\"ROUTERS\",\"ROUTE_SPACE_LEFT_OUT\",\"ROUTE_SPACE_MISFITS\",\"RadiusOptions\",\"RecordTrace\",\"RectScatteredParams\",\"Region\",\"RegionPoint\",\"Registry\",\"RepairCounts\",\"RepairOptions\",\"RepairReport\",\"Result\",\"Room\",\"RoomBenchRow\",\"RoomFamily\",\"RoomInput\",\"RoomLevel\",\"RoomLink\",\"RoomMethod\",\"RoomOptions\",\"RoomPreset\",\"RoomSetting\",\"Route\",\"RouteBalance\",\"RouteInput\",\"RoutePairCrossings\",\"RouteStability\",\"RouteStabilityOptions\",\"RoutedStep\",\"Router\",\"RouterPreset\",\"RowFit\",\"RuleCount\",\"RunOrder\",\"RunProfile\",\"SAME_HIGHWAY\",\"SBEB_DEFAULTS\",\"SCALE_SPACE_DEFAULTS\",\"SCREEN_FAMILY_BY\",\"SCREEN_RULES\",\"SCREEN_SETS\",\"SCREEN_STEPS\",\"SCREEN_V1\",\"SCREEN_V2\",\"SCREEN_V2_HELD_OUT\",\"SCREEN_V3\",\"SCREEN_V3_HELD_OUT\",\"SCREEN_V4\",\"SCREEN_V4_HELD_OUT\",\"SCREEN_V4_ROOM\",\"SCREEN_WRAPS\",\"SEAM_DEFAULTS\",\"SEARCH_DEFAULTS\",\"SEARCH_MOVES\",\"SEARCH_WORK_UNIT\",\"SECTION_DEFAULTS\",\"SELECT_DEFAULTS\",\"SIDE_NORMAL\",\"SIFT_CAP\",\"SKELETON_GROUPS\",\"SKELETON_TARGETS\",\"SLACK_SWEEP\",\"SLOT_DEFAULTS\",\"SLOT_KEYS\",\"SMALL_CLUSTERED\",\"SOFT_KEY_DEFAULTS\",\"SPACING_LIMIT\",\"SPARSE_LONG\",\"SPECTRAL_DEFAULTS\",\"SPIRAL\",\"SPIRAL_DEFAULTS\",\"SPREAD_DEFAULTS\",\"SPRINGS_DEFAULTS\",\"SPRINGS_SCHEMA\",\"STABLE_ID_DEFAULTS\",\"STEINER_DEFAULTS\",\"STEINER_GROUPS\",\"STEINER_METHODS\",\"STEINER_METRICS\",\"STEPS\",\"STEP_DEFAULTS\",\"STRATEGIES\",\"STREET_DEFAULTS\",\"STREET_SOURCES\",\"STRETCH_DEFAULTS\",\"STRETCH_SWEEP\",\"STUB_DEFAULTS\",\"SUITE_COLUMNS\",\"SWARM_SEARCHES\",\"SWITCHBOX\",\"ScreenFamily\",\"ScreenOptions\",\"ScreenReport\",\"ScreenSet\",\"ScreenStep\",\"ScreenStrategySummary\",\"ScreenSummary\",\"ScreenWrap\",\"Section\",\"SectionOptions\",\"SectionsBenchRow\",\"SectionsSetting\",\"SectionsSettingOptions\",\"Segment\",\"SegmentGraph\",\"SegmentRef\",\"SharedRun\",\"Side\",\"SmoothStrategyOptions\",\"SoftGraph\",\"SoftGraphOptions\",\"SplitTree\",\"Spread\",\"SpreadOptions\",\"Stability\",\"Step\",\"StepComparison\",\"StepInput\",\"StepOutput\",\"StepTypes\",\"Strategy\",\"StrategyDefinition\",\"StrategyLookup\",\"SuiteFront\",\"SuiteOptions\",\"SuiteReport\",\"SuiteRow\",\"SuiteSummary\",\"SwarmEntry\",\"SwarmRun\",\"SwarmSearch\",\"SwarmSetting\",\"SweepOptions\",\"TERRITORY_DEFAULTS\",\"TERRITORY_POINTS\",\"THIN_BARS\",\"TIGHT_DEFAULTS\",\"TIGHT_FIRSTS\",\"TIGHT_SCHEMA\",\"TIGHT_TIES\",\"TINY_UNIFORM\",\"TOLERANCE\",\"TRACING_DEFAULTS\",\"TRACING_QUANTILES\",\"TRACING_WEIGHTS\",\"TRACLUS_DEFAULTS\",\"TRAFFIC_RULES\",\"TWO_HUBS\",\"TWO_WAY_DEFAULTS\",\"TWO_WAY_SIDES\",\"TensionOptions\",\"Terminal\",\"TimingEnv\",\"TotalTurn\",\"TracingEntry\",\"TracingOptions\",\"TracingQuantile\",\"TracingRun\",\"TracingWeights\",\"TrackBenchRow\",\"UNEVEN_SIZES\",\"UNSCREENED_STRATEGIES\",\"VENATION_BACKBONES\",\"VENATION_DEFAULTS\",\"ValueOption\",\"VenationBackbone\",\"VenationOptions\",\"Violation\",\"WALLED_LEVEL\",\"WEEKLY_FAMILIES\",\"WEISZFELD_DEFAULTS\",\"WIDTH_SCALES\",\"WSPD_DEFAULTS\",\"WallEnd\",\"WallLeader\",\"WallPlan\",\"WallPlanner\",\"WayFinder\",\"WayFinderOptions\",\"WayOptions\",\"WholeOutput\",\"WidthScale\",\"ZIPPER_DEFAULTS\",\"activationBase\",\"activationReport\",\"adamRouter\",\"adamRoutes\",\"adamStrategy\",\"addPairs\",\"adjustedRandIndex\",\"agreementOf\",\"allSections\",\"ambiguity\",\"ambiguityGate\",\"ambiguityPlan\",\"anchorBound\",\"annealWays\",\"annealingRouter\",\"annealingStrategy\",\"approvalPlan\",\"approvedLinks\",\"arcCurve\",\"arcsin\",\"areaPlan\",\"aroundBox\",\"asRouter\",\"assignEnds\",\"assignWall\",\"attraction\",\"attractionRouter\",\"attractionStrategy\",\"backboneLinks\",\"backtrackOf\",\"balance\",\"balanceOf\",\"balancePlan\",\"basePlan\",\"benchBendRoom\",\"benchCurveStrategies\",\"benchCurves\",\"benchHighways\",\"benchLevelRoom\",\"benchOne\",\"benchRoom\",\"benchRun\",\"benchTracks\",\"bendCount\",\"bendingEnergy\",\"bicliqueGroups\",\"bigGroups\",\"boardFeatures\",\"boardGaps\",\"boardPortfolio\",\"boardUnit\",\"boardWins\",\"bootstrapMedian\",\"boundsFamilyName\",\"boxDisplacement\",\"boxExit\",\"boxField\",\"boxPush\",\"boxUnit\",\"boxesOverlap\",\"breakEvenGate\",\"breakEvenPlan\",\"bronchialPlan\",\"buildSections\",\"bundleStretch\",\"bundledShare\",\"byCollection\",\"byDataGroup\",\"canalHubs\",\"canalRouter\",\"canalStrategy\",\"canalWays\",\"candidateArcs\",\"candidatePlan\",\"candidateScore\",\"canonicalJson\",\"capSettings\",\"caseSeed\",\"cellSteps\",\"center\",\"chainClusters\",\"changeGraph\",\"changedDimensions\",\"channelOverflows\",\"channelWidth\",\"characteristicPoints\",\"checkFamilies\",\"checkLevels\",\"checkOptions\",\"checkParents\",\"checkPlan\",\"checkPort\",\"checkProperties\",\"checkSchema\",\"checkSections\",\"choice\",\"clampOptions\",\"clothoidCurve\",\"clusters1d\",\"coAssociation\",\"collapseLinks\",\"commonEdges\",\"compareAnyStep\",\"compareMeasure\",\"compareSpec\",\"compareStep\",\"compatibility\",\"compatibilityMatrix\",\"configOfMember\",\"confluentPlan\",\"consensusGroups\",\"consensusLabels\",\"consensusPlan\",\"controlChain\",\"cornersRouter\",\"corpusManifest\",\"corridorPlan\",\"countCrossings\",\"countOverlaps\",\"createFamilyRegistry\",\"createRegistry\",\"cropWindow\",\"crops\",\"crossbarPlan\",\"crossesItself\",\"crossingAngle\",\"crossingAngles\",\"crossingPoint\",\"cubicAt\",\"cubuPlan\",\"curriculum\",\"curvatureVariation\",\"curveDeviation\",\"curveFaults\",\"curveJoints\",\"curveOf\",\"curveRuns\",\"curveSpace\",\"curveStrategies\",\"curvesHash\",\"cutGroups\",\"cutShare\",\"declaresFamily\",\"defineStrategy\",\"denseGroupsBoard\",\"densityPlan\",\"densityRidges\",\"depthLevels\",\"detailLevels\",\"detailWidth\",\"detourSpread\",\"diamondAngle\",\"diffusionPlan\",\"dimensionAt\",\"dimensionUnit\",\"disagreement\",\"dist\",\"distanceDistortion\",\"distancesFrom\",\"distinctPoints\",\"divideHighway\",\"dividedPlan\",\"documentHash\",\"dominates\",\"drawnSegments\",\"edgeBlocks\",\"edgeEnds\",\"edgeLengths\",\"edgePathPlan\",\"edgePaths\",\"edgePlugs\",\"edgeResistance\",\"edgesWithNoWay\",\"enumDimension\",\"escapeEnds\",\"exactBoard\",\"exactFamily\",\"exactGenerator\",\"exactSeed\",\"exactStretch\",\"exactStretches\",\"exercised\",\"facingEnds\",\"familyCell\",\"familyKind\",\"familyOf\",\"familySeed\",\"farLevel\",\"farLinks\",\"fdebLines\",\"fdebPlan\",\"fft\",\"findStrategy\",\"finderOf\",\"fireflies\",\"firstLines\",\"fitPreferences\",\"fixPorts\",\"fixedPortPoint\",\"fixtureGroupOptions\",\"fixtureParams\",\"fixtureRngSeed\",\"fixtureSpecOf\",\"flowClusterPlan\",\"flowClusters\",\"flowDistance\",\"flowFieldPlan\",\"fnv1a32\",\"follow\",\"formatActivation\",\"formatBendRoom\",\"formatCapped\",\"formatCurves\",\"formatFaults\",\"formatFronts\",\"formatGap\",\"formatHighways\",\"formatInput\",\"formatLevelRoom\",\"formatLevels\",\"formatMeasureTime\",\"formatPaired\",\"formatRoom\",\"formatRules\",\"formatScreen\",\"formatSections\",\"formatSummaries\",\"formatTable\",\"formatTracks\",\"frameRoutes\",\"frechet\",\"frechetBundles\",\"frechetPlan\",\"freeLines\",\"g1Defect\",\"g2Defect\",\"gapBaselines\",\"gapCap\",\"gapClosed\",\"gapLaneCounts\",\"gapLanes\",\"gapNames\",\"gapPlan\",\"gapValues\",\"gateStrategy\",\"getStrategy\",\"globalOrderPlan\",\"goesOutAndBack\",\"graphInput\",\"greedyBicliques\",\"greedyCrossbars\",\"groupEdges\",\"groupFill\",\"groupRun\",\"groupSettings\",\"groupStability\",\"groupStrategies\",\"groupedPlan\",\"growthPlan\",\"growthSettings\",\"guardBreaks\",\"gutterRoutes\",\"halfPower\",\"hasCusp\",\"hdbscanClusters\",\"hdbscanLabels\",\"hdbscanPlan\",\"hierarchyPlan\",\"highwayChurn\",\"highwayCurve\",\"highwayCurves\",\"highwayEdits\",\"highwayIdKeep\",\"highwayMoves\",\"highwayRouter\",\"highwayRouterStrategy\",\"highwayRouters\",\"highwayStrategies\",\"highwaysRegistry\",\"hilbertRank\",\"houghLines\",\"houghPeaks\",\"houghPlan\",\"hubArcPlan\",\"hubCandidates\",\"hubChainBoard\",\"hysteresisGate\",\"hysteresisPlan\",\"inBox\",\"inflate\",\"inflectionCount\",\"inflectionCurve\",\"inflectionSector\",\"inkSaved\",\"innerPoints\",\"inputGraph\",\"inputId\",\"interchangeCandidates\",\"interchangePlan\",\"isRoutedStep\",\"itemOverlaps\",\"itemSizes\",\"jaccard\",\"jaccardIndex\",\"jogPeaks\",\"joinReports\",\"jsonSafe\",\"kMeans\",\"kdGroups\",\"kdeebLines\",\"kdeebPlan\",\"keepMembers\",\"keepRules\",\"kendallTau\",\"keyGroups\",\"keyOfStrategy\",\"keyOrder\",\"keyedSections\",\"keysPlan\",\"kneeOf\",\"kneePlan\",\"labelGroups\",\"laneArea\",\"laneCrossings\",\"laneFidelity\",\"laneOffset\",\"laneOrder\",\"laneRoom\",\"laneRoutes\",\"laneSeparation\",\"laneSettings\",\"laneStretches\",\"lanesPlan\",\"lanesThrough\",\"leaderEnds\",\"leafGroups\",\"lengthBetween\",\"levelCut\",\"levelGrouping\",\"levelHighwayPlan\",\"levelMeasures\",\"levelPairs\",\"levelRatio\",\"levelRoom\",\"levelStrategies\",\"levelsOf\",\"lineDensity\",\"linePoint\",\"linkAgreement\",\"linkCommunities\",\"linkCommunityGroups\",\"linkCommunityPlan\",\"linkDensity\",\"listOptions\",\"listStrategies\",\"madeUpPairs\",\"makeFixture\",\"makeRoom\",\"manifestHash\",\"manifoldPlan\",\"manyGroupsBoard\",\"matchHighways\",\"maxStretch\",\"mdf\",\"meanLine\",\"measureBoard\",\"measureByKey\",\"measureByName\",\"measureHighways\",\"measureJogs\",\"measureLevel\",\"measureLevelFaults\",\"measureLinks\",\"measureName\",\"measureQuality\",\"measureRouteFaults\",\"measureStability\",\"meetMember\",\"meetPlan\",\"meetingPoints\",\"memberAt\",\"memberStrategy\",\"mergeAngle\",\"meshPlan\",\"meshWaypoints\",\"minEffectOf\",\"minHash\",\"mingleBundles\",\"minglePlan\",\"mixedSegments\",\"mixesCollections\",\"mlsPoint\",\"mlsebLines\",\"mlsebPlan\",\"modularity\",\"modulesOf\",\"moveResponse\",\"mulberry32\",\"namedObjectives\",\"nearestCentre\",\"nearestOnBoundary\",\"nearestOnLine\",\"nearestSide\",\"nearestSkeleton\",\"nestedGridBoard\",\"nestedGroups\",\"nestedPlan\",\"nestingFaults\",\"nestingViolations\",\"nextRow\",\"noGraphRoutes\",\"nodeAmbiguity\",\"nodeIndex\",\"nodeLinks\",\"nudgeRouter\",\"nudgeRoutes\",\"nudgeStrategy\",\"numberDimension\",\"numberOf\",\"occupiedArea\",\"odCellPlan\",\"odGroups\",\"offsetLine\",\"offsetPolyline\",\"oneSteiner\",\"openGaps\",\"openLanes\",\"optimaFile\",\"optimumKey\",\"optionDefaults\",\"orderChanges\",\"orderFragility\",\"orderLanes\",\"orderRows\",\"orderStability\",\"orderSuiteRows\",\"orthogonality\",\"outOfBoxes\",\"outerGraph\",\"outputGroups\",\"outputHash\",\"pHubPlan\",\"pMedian\",\"packedGridBoard\",\"pairCosts\",\"paramProblem\",\"paretoFront\",\"parseLines\",\"partWithin\",\"passSettings\",\"passThroughs\",\"passesThrough\",\"pathPoints\",\"peakCurvature\",\"pickLevel\",\"pickLinks\",\"pickMoves\",\"placePlug\",\"placeSlots\",\"planMoves\",\"planOfResult\",\"plugSpacing\",\"plugStrategies\",\"plugsRouter\",\"pointAt\",\"pointBoxDistance\",\"pointDensity\",\"pointGroups\",\"pointOnSide\",\"pointSegmentDistance\",\"polylineLength\",\"portOffset\",\"portfolio\",\"portfolioB1Spec\",\"portfolioBand\",\"portfolioFacts\",\"portfolioKey\",\"portfolioMeasures\",\"portfolioMember\",\"portfolioMembers\",\"portfolioName\",\"portfolioRouter\",\"portfolioStrategy\",\"positionStability\",\"powerPlan\",\"preferences\",\"pseudoAngle\",\"pullApart\",\"quadtreeGroups\",\"quantile\",\"quickBundles\",\"quickBundlesPlan\",\"randomInt\",\"rankSettings\",\"rankShares\",\"rayToBox\",\"recordLines\",\"recordMoves\",\"rectScattered\",\"regionBounds\",\"register\",\"relaxRoutes\",\"repairResult\",\"repairStrategy\",\"repelRouter\",\"repelStrategy\",\"representative\",\"rerouteRouter\",\"rerouteStrategy\",\"rerouteWays\",\"resample\",\"resampleRoute\",\"resistanceClusters\",\"resistancePlan\",\"resolvePorts\",\"resultForm\",\"resultHash\",\"ridgeLines\",\"ridgePlan\",\"rng\",\"roadClassPlan\",\"roomDemand\",\"roomLinks\",\"roomOrderFaults\",\"roomStrategies\",\"roomValues\",\"round3\",\"roundCorners\",\"roundedCurve\",\"routeBalance\",\"routeConfig\",\"routeCrossings\",\"routeInStableOrder\",\"routeMeasures\",\"routePairCrossings\",\"routePortfolio\",\"routeSeparation\",\"routeSpace\",\"routeStability\",\"routeSymmetry\",\"routerStrategies\",\"routersOf\",\"rowFit\",\"ruleCounts\",\"ruleLanes\",\"runBenchmark\",\"runKey\",\"runPipeline\",\"runProfile\",\"runSuite\",\"sameData\",\"sampleCurve\",\"samplesOf\",\"sbebLines\",\"sbebPlan\",\"scaleClusters\",\"scaleSpaceGroups\",\"scaleSpacePlan\",\"screen\",\"screenInputs\",\"screenSplit\",\"seamGraph\",\"seamsRouter\",\"seamsStrategy\",\"searchPlan\",\"searchRun\",\"searchScore\",\"sectionsRouter\",\"segmentBounds\",\"segmentBoxDistance\",\"segmentClusters\",\"segmentDistance\",\"segmentHitsBox\",\"segmentHitsRect\",\"segmentKey\",\"segmentsCross\",\"segmentsOf\",\"selectBest\",\"selectPlan\",\"setManifest\",\"settingAt\",\"sha256Hex\",\"shapeSkeleton\",\"sharedRouter\",\"sharedStretchStrategy\",\"sharedStretches\",\"sharedWaysAll\",\"sharedWaysPlan\",\"shuffleEdges\",\"sideAngle\",\"sideToward\",\"sift\",\"signTestPower\",\"silhouette\",\"simplify\",\"skeletonGroups\",\"skeletonPath\",\"slackSettings\",\"slotJoin\",\"slotPlan\",\"slotsOf\",\"smoothCurve\",\"snapPlan\",\"softDistance\",\"softKeyClusters\",\"softKeyPlan\",\"softStep\",\"spanningTree\",\"spectralClusters\",\"spectralLabels\",\"spectralPlan\",\"spinePart\",\"spiralJoin\",\"spiralPlan\",\"spiralTree\",\"splineCurve\",\"splitFrames\",\"splitPath\",\"splitPoint\",\"splitTargets\",\"spread\",\"spreadEnds\",\"spreadWith\",\"springsRouter\",\"springsStrategy\",\"stableIdGate\",\"stableIdPlan\",\"stableOrder\",\"stableOrderStrategy\",\"steinerPlan\",\"stepRouterStrategy\",\"stepRouters\",\"stepSeed\",\"straightCurve\",\"straightRouter\",\"strategyKey\",\"strategyOfKey\",\"streetEdges\",\"streetPlan\",\"streetPoint\",\"streetRide\",\"stretchGate\",\"stretchLaneOrders\",\"stretchPlan\",\"stretchSettings\",\"stubPlan\",\"suiteFronts\",\"sumFaults\",\"summarize\",\"summarizeGap\",\"summarizeRows\",\"swarmScore\",\"sweepGrid\",\"sweepOf\",\"sweepRoom\",\"sweepSections\",\"sweepValues\",\"symmetricEigen\",\"territoryPlan\",\"tightRouter\",\"tightStrategy\",\"toSvgPath\",\"totalTurn\",\"tracePlan\",\"tracing\",\"tracingLoads\",\"tracingValue\",\"traclusPlan\",\"treeCost\",\"treeDepth\",\"trunksRouter\",\"turns\",\"turnsOf\",\"twoWayPlan\",\"unwrappedName\",\"utf8\",\"venationLevels\",\"venationLinks\",\"waySlacks\",\"waypointWay\",\"weberPoint\",\"weiszfeldPlan\",\"wholeBoard\",\"wholeStrategies\",\"withBends\",\"withLaneRoom\",\"withRepair\",\"withStableOrder\",\"wspdGroups\",\"wspdPlan\",\"zipLegs\",\"zipperPlan\"] },\n \"@mark1russell7/lag\": { version: \"0.4.1\", names: [\"ANONYMOUS_CALLBACK\",\"BrowserReportMonitor\",\"BusyTimeProbe\",\"CALLBACK_SOURCE_KINDS\",\"ClockDriftMonitor\",\"ClockReliabilityChecker\",\"ClsCalculator\",\"ComputePressureMonitor\",\"DriftLag\",\"EVENTS\",\"EVENT_CATALOG\",\"EVENT_TIME_ATTRIBUTE\",\"EventTimingMonitor\",\"FrameTimingMonitor\",\"GCSignalDetector\",\"HANG_JOURNAL_STALE_MS\",\"HANG_JOURNAL_WRITE_INTERVAL_MS\",\"HANG_REPORT_MARK_PREFIX\",\"HISTOGRAM_BOUNDARIES\",\"IdleAvailabilityMonitor\",\"InpCalculator\",\"LIVENESS_BUFFER_BYTES\",\"LONG_CALLBACK_THRESHOLD_MS\",\"LagLogger\",\"LagMonitor\",\"LagWorker\",\"LayoutShiftMonitor\",\"LifecycleStateMachine\",\"LivenessWatcher\",\"LongAnimationFrameMonitor\",\"LongCallbackMonitor\",\"MAX_EVENT_TIME_OFFSET_MS\",\"METRICS\",\"METRIC_CATALOG\",\"MacrotaskLag\",\"MemoryMonitor\",\"MonitorRegistry\",\"NAVIGATION_TYPES\",\"ObserverMonitor\",\"PEER_BEAT_INTERVAL_MS\",\"PEER_CHANNEL_NAME\",\"PEER_CLAIM_HOLD_MS\",\"PEER_GRACE_MS\",\"PEER_HANG_THRESHOLD_MS\",\"PageViewVitals\",\"PeerHangWatch\",\"RateLimiter\",\"ReliabilityTracker\",\"SHORT_INTERACTION_ESTIMATE_MS\",\"SPANS\",\"SPAN_CATALOG\",\"SchedulingFairnessMonitor\",\"SharedLivenessMonitor\",\"TimerThrottleDetector\",\"VITAL_THRESHOLDS\",\"ViewCollector\",\"WorkerClockSync\",\"WorkerLagMonitor\",\"activeSpanName\",\"beatingSetTimeout\",\"callbackSourceKind\",\"createAbsoluteClock\",\"createBrowserDeps\",\"createCounter\",\"createForwardingMeter\",\"createFrameViewport\",\"createHandle\",\"createHistogram\",\"createIndexedDbHangJournal\",\"createInstrumentedBrowserReports\",\"createInstrumentedClockDrift\",\"createInstrumentedClockReliability\",\"createInstrumentedComputePressure\",\"createInstrumentedDriftLag\",\"createInstrumentedEventTiming\",\"createInstrumentedFrameTiming\",\"createInstrumentedGCSignal\",\"createInstrumentedIdleAvailability\",\"createInstrumentedLayoutShift\",\"createInstrumentedLifecycle\",\"createInstrumentedLoaf\",\"createInstrumentedLongCallbacks\",\"createInstrumentedMacrotaskLag\",\"createInstrumentedMemory\",\"createInstrumentedPageViewContext\",\"createInstrumentedPageViewVitals\",\"createInstrumentedPeerHangWatch\",\"createInstrumentedSchedulingFairness\",\"createInstrumentedSharedLiveness\",\"createInstrumentedThrottleDetector\",\"createInstrumentedWorkerLag\",\"createLagWorker\",\"createLivenessBeacon\",\"createMeasurementConditions\",\"createMemoryHangJournal\",\"createMessageTaskQueue\",\"createMeterReceiver\",\"createNoopEventSink\",\"createNoopMeter\",\"createNoopSpanSink\",\"createOtelEventSink\",\"createOtelLoggerAdapter\",\"createOtelSpanSink\",\"createPageSource\",\"createPageViewSpans\",\"createRandomId\",\"createStorageHangReportMarks\",\"createTeeLogger\",\"createWorkerHandler\",\"defaultMemoryIntervalMs\",\"describeNode\",\"driftStepMs\",\"encodeOtlpLogs\",\"findAbandonedHangs\",\"formatEventLine\",\"highFrequencyLagIntervalMs\",\"interactionType\",\"isPeerMessage\",\"isSpanIdentity\",\"isVisibleState\",\"lagLoggingIntervalMs\",\"longLagDuration\",\"longLagThreshold\",\"macrotaskLagIntervalMs\",\"millisToUnixNanoString\",\"peerLockName\",\"placeEventTime\",\"pressureStateOrdinals\",\"rateVital\",\"setupAllMonitors\",\"setupLongCallbacks\",\"shortLagDuration\",\"shortLagThreshold\",\"stripUrlParameters\",\"summarizeTransitions\",\"validatedRecorder\",\"withEventContext\"] },\n \"@mark1russell7/lag-hud\": { version: \"0.1.1\", names: [\"createHudMeter\",\"fanOutMeter\",\"formatLagStat\",\"lagHudText\",\"mountLagHud\",\"quantile\"] },\n \"@mark1russell7/layout-contract\": { version: \"0.5.2\", names: [\"AdvanceFn\",\"AnyOption\",\"BALANCE_MEASURE_SUFFIXES\",\"BALANCE_SIDE_DEPTH\",\"Balance\",\"BalanceMeasureSuffix\",\"BooleanOption\",\"CIRCLE_SCATTERED\",\"CORPUS_DIMENSIONS\",\"CanvasTextContext\",\"CatalogCheck\",\"CatalogCheckOptions\",\"CatalogEntry\",\"CatalogLimit\",\"CatalogOptionsOptions\",\"CellsOptions\",\"ClaimBreak\",\"ComposeOptions\",\"ContainerTest\",\"CorpusDimension\",\"CorpusEntry\",\"CorpusFamily\",\"CorpusSplit\",\"CorpusStep\",\"CrossEngine\",\"DEFAULT_FAMILY_BY\",\"DEFAULT_RNG\",\"DEFAULT_SHAPES\",\"DEFAULT_TOLERANCE\",\"DIGITS\",\"DeclaredClaim\",\"DeclaredStrategy\",\"Declares\",\"DimensionValues\",\"Direction\",\"EDGES_STEP\",\"EDGE_DENSITY\",\"EDGE_KEY_STEP\",\"EDGE_KEY_STEP_VERSION\",\"EDGE_STEP_VERSION\",\"EPS\",\"EPS_STEPS\",\"EdgeKey\",\"EdgeKeyParams\",\"EdgeShape\",\"EdgeStepParams\",\"EnumOption\",\"EnumerateOptions\",\"ExerciseEvidence\",\"FAMILY_ANY_KIND\",\"FamilyBy\",\"FamilyCell\",\"FamilyRegistry\",\"FamilyVerdict\",\"GenerateContext\",\"GenerateOptions\",\"GridOptions\",\"HARD_RULE_VERSION\",\"HashOptions\",\"INVALIDATED_FIELD\",\"Item\",\"JOINT_MEASURES\",\"JOINT_MOVED_MIN\",\"JointMeasureId\",\"LayoutBox\",\"LayoutCell\",\"LayoutContainer\",\"LayoutEdge\",\"LayoutGenerator\",\"LayoutInput\",\"LayoutRecord\",\"ListItem\",\"Margin\",\"MeasureSpec\",\"MeasurerOptions\",\"MeasurerStats\",\"Member\",\"MemberRule\",\"MemberStatus\",\"MemberTrace\",\"NODE_POSITIONS_DIMENSION\",\"NoDefault\",\"NoDefaultReason\",\"NumberOption\",\"OUTPUT_CLASS_MIN_INPUTS\",\"OUTPUT_GRID_PROPERTIES\",\"OUTPUT_NEAR_WHOLE\",\"Obstacle\",\"OptionDeclaration\",\"OptionIssue\",\"OptionRef\",\"OptionScale\",\"OptionSchema\",\"OptionSetting\",\"OptionSupports\",\"OutputEvidence\",\"OutputGridClass\",\"OutputGridCounts\",\"OutputGroup\",\"OutputRow\",\"OwnerDimensionSpec\",\"PACK_HARD_RULES\",\"PRINTABLE_ASCII\",\"PackHard\",\"PackInput\",\"PackInputOptions\",\"PackLink\",\"PackOutput\",\"PairGap\",\"ParamKind\",\"ParamRoute\",\"ParamValue\",\"ParamWhen\",\"PickSpec\",\"PlacedBox\",\"PlacedCircle\",\"Placement\",\"Point\",\"Port\",\"Portfolio\",\"PortfolioKey\",\"PortfolioLevel\",\"PortfolioOptions\",\"PortfolioPick\",\"PortfolioTrace\",\"ProcrustesOptions\",\"RECORD_EPS\",\"RECORD_SCALE\",\"RECT_SCATTERED\",\"Rect\",\"Region\",\"RegistryCell\",\"RegistryEntry\",\"RngFactory\",\"RuleLevel\",\"RunEnv\",\"RunFacts\",\"SHAPE_KINDS\",\"SHAPE_KIND_IDS\",\"SIDES\",\"SPLIT_SCHEMA\",\"STRATEGY_CATALOG_SCHEMA\",\"STRATEGY_CATALOG_SCHEMAS\",\"STRATEGY_SPACE_SCHEMA\",\"SampleOptions\",\"SelectCandidate\",\"SelectLevel\",\"Selection\",\"ShapeBound\",\"ShapeCheck\",\"ShapeFilter\",\"ShapeGeometry\",\"ShapeInput\",\"ShapeKind\",\"ShapeKindSpec\",\"ShapeLevel\",\"ShapeLimit\",\"ShapeLink\",\"ShapeSupport\",\"Side\",\"Sides\",\"SizedRect\",\"SpaceConstraint\",\"SpaceParam\",\"SpaceSize\",\"SpaceSizeOptions\",\"SpaceStage\",\"SplitCorpus\",\"SplitFold\",\"Stage\",\"StageChoice\",\"StageOption\",\"StageTrace\",\"StrategyCatalog\",\"StrategyCatalogParse\",\"StrategyCatalogSchema\",\"StrategyCatalogSource\",\"StrategyConfig\",\"StrategyInfo\",\"StrategyKind\",\"StrategyMember\",\"StrategySpace\",\"SupportProbe\",\"SupportedRange\",\"SupportedValues\",\"Supports\",\"SweepOptions\",\"TEXT_MEASURES\",\"TEXT_UNITS\",\"TextCharset\",\"TextCharsetOptions\",\"TextLayout\",\"TextLayoutCache\",\"TextLayoutCacheOptions\",\"TextLayoutCacheStats\",\"TextLayoutOptions\",\"TextMeasureId\",\"TextMeasurer\",\"TextSizing\",\"Tolerance\",\"VERDICT_DRAWS\",\"VERDICT_EXACT_CAP\",\"VERDICT_EXACT_MAX\",\"VERDICT_RUNS\",\"VERDICT_SEED\",\"ValueOption\",\"Verdict\",\"VerdictBreadth\",\"VerdictInterval\",\"VerdictLabel\",\"VerdictOptions\",\"VerdictPermutation\",\"VerdictRecord\",\"VerdictResult\",\"VerdictScope\",\"VerdictSide\",\"VerdictSignTest\",\"applyPack\",\"balanceMeasureSpecs\",\"balanceMeasures\",\"balanceOf\",\"boundsOf\",\"boxArea\",\"canonicalConfig\",\"canonicalInput\",\"canonicalJson\",\"canvasAdvance\",\"catalogChoices\",\"catalogDefaults\",\"catalogKey\",\"catalogOptions\",\"checkCatalog\",\"checkConfig\",\"checkDeclared\",\"checkInput\",\"checkLayoutRecord\",\"checkOptions\",\"checkSchema\",\"checkShapes\",\"checkSpace\",\"checkSplit\",\"circleOverlaps\",\"circlesOutside\",\"clampOptions\",\"compareMeasure\",\"composeFamily\",\"configId\",\"corpusHashOf\",\"countLinksThroughShapes\",\"countObstacleHits\",\"countOutside\",\"countOverlaps\",\"countPortsOffBorder\",\"createFamilyRegistry\",\"createMeasurer\",\"createTextCharset\",\"createTextLayoutCache\",\"crossingPoint\",\"declarationIssues\",\"declaredClaimOf\",\"declaredCounts\",\"decodeOptionValue\",\"dimensionAt\",\"dimensionSupports\",\"dimensionUnit\",\"documentHash\",\"edgeKeyStep\",\"edgeStep\",\"encodeOptionValue\",\"enumerateSpace\",\"exercised\",\"familyKind\",\"familyOf\",\"fnv1a32\",\"fontKey\",\"graphemesOf\",\"grow\",\"hardRuleOf\",\"inputShapeLevel\",\"isShapeKind\",\"itemShapeOf\",\"joinConfigs\",\"layoutText\",\"leaveOneSeedOut\",\"levelsOf\",\"listOptions\",\"marginSides\",\"minEffectOf\",\"mulberry32\",\"nearestGaps\",\"optionDefaults\",\"optionIssue\",\"outputGridClass\",\"outputGroups\",\"outputHash\",\"overlapOf\",\"ownerDimension\",\"packHard\",\"packLinks\",\"paramActive\",\"paramLevels\",\"paramProblem\",\"paramValue\",\"parseLayoutRecord\",\"parseStrategyCatalog\",\"perChange\",\"pickMoves\",\"placedCircle\",\"placedRect\",\"pointSegmentDistance\",\"portPoint\",\"portfolio\",\"procrustesOf\",\"productSpace\",\"randomInt\",\"rectInRegion\",\"regionArea\",\"regionHitsRect\",\"resolveDimensions\",\"ruleLevel\",\"segmentThroughShape\",\"segmentsCross\",\"selectBest\",\"sha256Hex\",\"shapeKindOf\",\"shapeKindProblem\",\"shapeKindsOf\",\"shapeLevel\",\"shapeSupportProblems\",\"shapesOf\",\"shapesOverlap\",\"sharedDimension\",\"spaceShapeKinds\",\"spaceSize\",\"splitConfig\",\"splitFileName\",\"splitFolds\",\"stepRandom\",\"sweepGrid\",\"sweepOf\",\"sweepValues\",\"textMeasures\",\"toLayoutRecord\",\"toPackInput\",\"toRect\",\"toSizedRect\",\"translate\",\"turnBox\",\"turnMargin\",\"turnPoint\",\"turnPort\",\"turnRegion\",\"turnSide\",\"verdict\",\"writeStrategyCatalog\"] },\n \"@mark1russell7/optional\": { version: \"1.1.0\", names: [\"None\",\"Optional\",\"Some\",\"filter\",\"flatMap\",\"fromNullable\",\"fromSentinel\",\"getOr\",\"isNone\",\"isSome\",\"map\",\"none\",\"some\",\"toSentinel\",\"unwrap\"] },\n \"@mark1russell7/otel-ts\": { version: \"0.3.0\", names: [\"ContextManagerOption\",\"DEFAULT_METRICS_EXPORT_INTERVAL_MS\",\"DEFAULT_OTLP_ENDPOINT\",\"DEFAULT_SERVICE_NAME\",\"DEFAULT_SERVICE_VERSION\",\"NodeTelemetry\",\"NodeTelemetryOptions\",\"OtelTsConfig\",\"StubCollector\",\"createInstanceId\",\"createTraceEcho\",\"getOrCreateSessionId\",\"init\",\"outgoingTraceparent\",\"runInRemoteTrace\",\"startNodeTelemetry\",\"startStubCollector\"] },\n \"@mark1russell7/packing\": { version: \"0.10.0\", names: [\"ANCHOR_GAIN_LIMIT\",\"ANCHOR_MEASURE_IDS\",\"ANCHOR_STEPS\",\"ANNEAL_STAGE\",\"ASPECT_FIT_FACTORS\",\"ASPECT_FIT_LEVELS\",\"ASPECT_FIT_STAGE\",\"BBOX_SHAPES\",\"BEAM_WIDTH\",\"BEASLEY_GCUT_COUNTS\",\"BEASLEY_GCUT_SIDES\",\"BERKEY_WANG_RULES\",\"BEST_FIT_SIDES\",\"BINARY_HEIGHT_STAGE\",\"BL_TRAP_WIDTH\",\"BL_TRAP_WIDTHS\",\"BOTTOM_LEFT_RULES\",\"BOUND_KINDS\",\"BURKE_KENDALL_WHITWELL_RULES\",\"CHANGE_WALK_KINDS\",\"CHANGE_WALK_STEPS\",\"CIRCLE_QUASI_PHYSICAL_MAX_ITERATIONS\",\"CIRCLE_QUASI_PHYSICAL_STAGE\",\"CLASS_COUNTS\",\"DEFAULT_STRATEGY\",\"DEFAULT_TOLERANCE\",\"EPS\",\"EXACT_STRATEGY_NODE_LIMIT\",\"EXACT_STRIP_MAX_ITEMS\",\"EXACT_STRIP_MAX_SIDE\",\"EXACT_STRIP_NODE_LIMIT\",\"FORCE_MAX_BOXES\",\"FORCE_MAX_FIXED\",\"FORCE_STAGE\",\"GENETIC_STAGE\",\"GRAPH_ORDERS\",\"GUILLOTINE_CHOICES\",\"GUILLOTINE_SPLITS\",\"HALF_WIDE_WIDTH\",\"HOLE_DEGREE_MAX_STEPS\",\"HOLE_DEGREE_STAGE\",\"HOPPER_TURTON_RULES\",\"LADDER_RUNGS\",\"LADDER_SIDE\",\"LADDER_WIDTH\",\"LEVEL_COUNTS\",\"MARTELLO_VIGO_BIN\",\"MARTELLO_VIGO_TYPES\",\"MASONRY_METHOD_IDS\",\"MAXRECTS_BANDS\",\"MAXRECTS_RULES\",\"MEASURE_SPECS\",\"NEAR_RECTS_STAGE\",\"OVERLAP_MIN_STAGE\",\"PACK_DEFAULT_TABLE\",\"PACK_SPACE_LEFT_OUT\",\"PACK_SPACE_OPTIONS\",\"PORTFOLIO_FRAME_MS\",\"PORTFOLIO_LEVELS\",\"PORTFOLIO_SETS\",\"PORTFOLIO_STAGE\",\"RASTER_NOFIT_MAX_CELLS\",\"RASTER_NOFIT_STAGE\",\"RECORD_EPS\",\"RELAX_MAX_CONSTRAINTS\",\"RELAX_PULL_MAX_BOXES\",\"RELAX_STAGE\",\"RESTARTS_STAGE\",\"RESTART_PERTURBS\",\"RUIN_KINDS\",\"RUIN_RECREATE_STAGE\",\"Rect\",\"SELECT_MAX_DEPTH\",\"SELECT_MEMBERS\",\"SELECT_STAGE\",\"SELECT_TABLE\",\"SHELF_FITS\",\"SKYLINE_RULES\",\"SORT_ORDERS\",\"SPREAD_THRESHOLDS\",\"STANDALONE_MAX_ITEMS\",\"STRATEGY_CATALOG_ENGINE\",\"TABU_STAGE\",\"THIN_INPUTS\",\"TREEMAP_METHOD_IDS\",\"UnsupportedCell\",\"UnsupportedShape\",\"Vector\",\"WALL_LOCKS_MAX\",\"WALL_LOCK_WALLS\",\"WORK_BUDGET\",\"WORK_SPENT\",\"WORK_STOPPED\",\"WORST_COUNTS\",\"WORST_WIDTH\",\"allStrategies\",\"anchorGenerators\",\"anchorStability\",\"anchorStep\",\"annealStrategy\",\"aspectError\",\"aspectFit\",\"aspectFitStrategy\",\"assertSupported\",\"balanceContainerOf\",\"bboxStrategy\",\"beamStrip\",\"beasleyGcut\",\"beasleyGcutFamily\",\"beasleyGcutRange\",\"berkeyWang\",\"berkeyWangFamily\",\"bestFit\",\"binCountBound\",\"blTrap\",\"blTrapFamily\",\"bottomLeft\",\"boundGap\",\"boundMeasures\",\"boundShare\",\"burkeKendallWhitwell\",\"burkeKendallWhitwellFamily\",\"burkeKendallWhitwellOf\",\"canonicalJson\",\"cards\",\"cardsFamily\",\"cellKey\",\"cellOf\",\"changeGenerators\",\"changeWalk\",\"checkHard\",\"checkInput\",\"checkSelectTable\",\"checkSideAnchors\",\"circleOverlaps\",\"circleQuasiPhysical\",\"circlesOutside\",\"classGenerators\",\"columnBalance\",\"columnReading\",\"columnsLinearPartition\",\"compactUp\",\"compareRects\",\"composites\",\"configOfStrategy\",\"consecutiveSquares\",\"consecutiveSquaresFamily\",\"corpus\",\"corpusFamilies\",\"countCell\",\"createContext\",\"dashboard\",\"dashboardFamily\",\"defaultLayoutOf\",\"edgeCases\",\"edgeCasesFamily\",\"exactStrip\",\"exactStripRefusal\",\"fnv1a32\",\"forceStrategy\",\"freeSpace\",\"fromRects\",\"gallery\",\"galleryFamily\",\"gapToOpt\",\"generator\",\"generators\",\"geneticStrategy\",\"graphOrder\",\"guillotine\",\"halfWide\",\"halfWideFamily\",\"hardBreaks\",\"hashInput\",\"holeDegree\",\"hopperTurton\",\"hopperTurtonFamily\",\"hopperTurtonOf\",\"isAnchor\",\"isDeterministic\",\"isGraphOrder\",\"keepOrthogonal\",\"keepPrefix\",\"ladder\",\"ladderFamily\",\"ladderRung\",\"legalizeRows\",\"logSweep\",\"lowestWindow\",\"marginOf\",\"martelloVigo\",\"martelloVigoFamily\",\"masonryLpt\",\"masonryShortest\",\"matchPlaces\",\"maxrects\",\"measure\",\"measureChange\",\"measureSeed\",\"medianRatio\",\"mmvBound\",\"moveAnchor\",\"mulberry32\",\"objectiveBound\",\"objectiveResult\",\"orderRects\",\"outputHash\",\"overlapMinStrategy\",\"pack\",\"packBinaryHeight\",\"packConfig\",\"packDefault\",\"packFree\",\"packGuillotine\",\"packMaxRects\",\"packNearRects\",\"packPortfolio\",\"packRasterNofit\",\"packRows\",\"packShelf\",\"packSideAnchors\",\"packSkyline\",\"packSpace\",\"packWith\",\"packWork\",\"packingMetrics\",\"pairedRatio\",\"perfectCut\",\"perfectCutFamily\",\"perfectCutOf\",\"pinUnchanged\",\"placeRow\",\"portPoint\",\"portfolioCell\",\"portfolioDefaultMembers\",\"portfolioMembers\",\"portfolioSetOf\",\"portfolioStrategy\",\"push\",\"pushCascade\",\"quantile\",\"rasterCell\",\"rasterCover\",\"rectFeatures\",\"rectGrid\",\"rectGridFamily\",\"rectGridV2\",\"rectGridV2Family\",\"rectScattered\",\"relaxStrategy\",\"restartsStrategy\",\"round3\",\"roundMeasures\",\"rows\",\"ruinRecreateStrategy\",\"selectFeatures\",\"selectLeaf\",\"selectStrategy\",\"shapeStrategies\",\"shelf\",\"sideAnchorsStrategy\",\"skyline\",\"skylineGap\",\"skylineGapFamily\",\"sleatorRefusal\",\"sleatorStrip\",\"spreadBand\",\"spreadOf\",\"stabilityUnitOf\",\"standaloneStrategies\",\"strategies\",\"strategy\",\"strategyCatalog\",\"stripGenerators\",\"supportsCell\",\"tabuStrategy\",\"tailShare\",\"tallRow\",\"tallRowFamily\",\"toPackInput\",\"toRects\",\"treemapPack\",\"treemapPivotSplit\",\"treemapSliceDice\",\"treemapSquarified\",\"treemapStrip\",\"turnItem\",\"turnPoint\",\"turnPort\",\"turnRegion\",\"unsupportedOf\",\"wallLocks\",\"wallLocksFamily\",\"windowOrder\",\"wordCloud\",\"wordCloudFamily\",\"worstGenerators\"] },\n \"@mark1russell7/quantity\": { version: \"0.3.0\", names: [\"ATOMS\",\"BASES\",\"KINDS\",\"KIND_NAMES\",\"KindOrDerived\",\"QuantityOptions\",\"SPELLINGS\",\"STATISTICS\",\"UnitError\",\"add\",\"atomBySymbol\",\"canonicalUnit\",\"compare\",\"convert\",\"convertExact\",\"convertible\",\"extentSchema\",\"format\",\"formatDuration\",\"formatUnit\",\"isCanonicalUnit\",\"isQuantity\",\"isQuantitySchema\",\"isUnbounded\",\"kindOf\",\"kindOfQuantity\",\"lookupAtom\",\"max\",\"mean\",\"min\",\"parseUnit\",\"quantity\",\"quantitySchema\",\"rationals\",\"round\",\"sameVector\",\"scale\",\"statisticSchema\",\"sub\",\"sum\",\"toNanoseconds\",\"tryParseUnit\",\"unbounded\",\"unitSchema\",\"unknownSchema\",\"valueIn\",\"whyNotConvertible\"] },\n \"@mark1russell7/render-dsl\": { version: \"0.3.0\", names: [\"NO_VALUE\",\"app\",\"chain\",\"checkExpr\",\"evaluate\",\"evaluateIn\",\"formatExpr\",\"isExpr\",\"isExprPart\",\"isLiteral\",\"issuesOf\",\"lit\",\"literalOf\",\"machineOf\",\"objectResolver\",\"opOf\",\"parseExpr\",\"partsOf\",\"plannerOf\",\"record\",\"ref\",\"renderWorld\",\"resolverThing\"] },\n \"@mark1russell7/render-node\": { version: \"0.3.0\", names: [\"MAX_CYCLE_ROUNDS\",\"addNode\",\"batch\",\"defaultDeref\",\"defaultFlow\",\"defaultOps\",\"defaultSplash\",\"defaultTargets\",\"expandNode\",\"fillMany\",\"forkStore\",\"getNode\",\"isPlainObject\",\"nodeStore\",\"readTargets\",\"readValue\",\"readsOf\",\"removeNode\",\"resolveAll\",\"setExpr\",\"setSlot\",\"setValue\",\"storeResolver\",\"toposort\",\"valueEquals\"] },\n \"@mark1russell7/rigor-generators\": { version: \"0.1.6\", names: [\"DIAGRAM_BOX_AREA\",\"GIT_BLOB_BYTES\",\"RECORDED_TABLES\",\"dependsOnLibm\",\"deriveSeed\",\"fnv1a32\",\"mulberry32\",\"random\",\"randomOf\",\"recordedSpec\",\"sampler\",\"seedOf\",\"seedsFrom\",\"stablePick\"] },\n \"@mark1russell7/rigor-statistics\": { version: \"0.1.13\", names: [\"KENDALL_EXACT\",\"RESPONSE_LAMBDAS\",\"RESPONSE_MAX_POWER\",\"RESPONSE_MAX_TERMS\",\"RESPONSE_RECORDS_SCHEMA\",\"Z95\",\"bestSmoothLaw\",\"binomialInterval\",\"bootstrap\",\"bootstrapClusters\",\"bootstrapLeastSquares\",\"bootstrapMedian\",\"bootstrapMedianRatio\",\"bootstrapTwo\",\"brier\",\"calibration\",\"compareRatios\",\"fitResponse\",\"heldOutError\",\"heldOutErrorAt\",\"holm\",\"kendallTau\",\"leastSquares\",\"mean\",\"median\",\"medianInterval\",\"modeCount\",\"negativeBinomialInterval\",\"noiseFloor\",\"noiseVerdict\",\"pairedPermutation\",\"parseResponseRecord\",\"partialConjunction\",\"predictResponse\",\"quantile\",\"quantileInterval\",\"quantileSamples\",\"quantileSorted\",\"ranks\",\"responseCells\",\"ridgeSolve\",\"sd\",\"signTest\",\"signTestPower\",\"sliceResponse\",\"smoothLawScores\",\"sorted\",\"spearman\",\"summarize\",\"surfaceResponse\",\"twoSamplePermutation\",\"whenHolds\",\"wilson\"] },\n \"@mark1russell7/service\": { version: \"0.6.5\", names: [\"AMQP_HEADER\",\"BOUND_RULES\",\"Backoff\",\"Behavior\",\"CLOSE_BOUND_RULE\",\"Cancel\",\"Clock\",\"DECLARATION_RULE\",\"DEFAULT_RESTART\",\"DRAIN_RULES\",\"DRAIN_RULE_IDS\",\"DURATION_FRACTIONS\",\"DelayBand\",\"EPISODES_KEPT\",\"EXIT_MACHINE\",\"EXIT_SIGNALS\",\"FORMAT\",\"GATE_MACHINE\",\"GRPC_CLIENT_MACHINE\",\"GRPC_CLIENT_STARTING_KNOBS\",\"GRPC_CLIENT_STARTING_POLL\",\"GRPC_CLIENT_STARTING_WITHOUT_CALLS\",\"GRPC_CODES\",\"GRPC_OPERATIONS\",\"GRPC_STATES\",\"HEALTH_CHECK\",\"HELLO\",\"HTTP2_PREFACE\",\"HTTP_CLIENT_MACHINE\",\"HTTP_CLIENT_STARTING_KNOBS\",\"HTTP_CLIENT_STARTING_POLL\",\"HTTP_OPERATIONS\",\"Heartbeat\",\"HeartbeatOptions\",\"Jitter\",\"LATCH_MACHINE\",\"LAW_STATISTIC\",\"LIMITER_RULES\",\"LIMITER_SCRIPT\",\"LOG_LEVELS\",\"MACHINES\",\"MANIFESTATIONS\",\"MONGO_CLIENT_MACHINE\",\"MONGO_STARTING_KNOBS\",\"MONGO_STARTING_POLL\",\"NAME_RULE\",\"O04\",\"O09\",\"O10\",\"O16\",\"OPTIONS_STAR\",\"PG_CLIENT_MACHINE\",\"PG_STARTING_KNOBS\",\"PG_STARTING_POLL\",\"PLATFORM_MARKS\",\"POLLER_MACHINE\",\"PROBE_KINDS\",\"PROCESS_TRIGGERS\",\"PROGRESS_RULE\",\"PlatformClockOptions\",\"QuietServer\",\"RABBIT_CLIENT_MACHINE\",\"RABBIT_STARTING_KNOBS\",\"RABBIT_STARTING_POLL\",\"REDIS_CLIENT_MACHINE\",\"REDIS_OPERATIONS\",\"SERVICE_RULES\",\"SESSION_CHECK_CLOSE\",\"SLIDING_WINDOW_MACHINE\",\"STAGES\",\"STARTING_POLL\",\"START_MARGIN_MS\",\"STOPS\",\"STOP_RULE\",\"ScriptedCheck\",\"TOKEN_BUCKET_MACHINE\",\"TestLogger\",\"UNCAUGHT_ORIGINS\",\"UNIT_BOUND_RULE\",\"WATCHDOG_MACHINE\",\"WINDOW_MACHINE\",\"WS_CLIENT_MACHINE\",\"WS_CLIENT_STARTING_KNOBS\",\"WS_CLIENT_STARTING_MISSES\",\"WS_CLIENT_STARTING_POLL\",\"WS_OPERATIONS\",\"acquireInstanceLock\",\"adaptGrpc\",\"adaptWs\",\"agentOptions\",\"amqpDial\",\"asDebounce\",\"asWindow\",\"atLeast\",\"backoffBand\",\"backoffDelay\",\"backoffProblems\",\"capKnob\",\"codeName\",\"commandName\",\"compress\",\"compression\",\"compressionOf\",\"consoleLogger\",\"contractCases\",\"cooperativeAbortAt\",\"daemon\",\"decide\",\"deliveryCount\",\"detachedLifecycle\",\"detectionTime\",\"discoveryOf\",\"drainMachine\",\"embeddedProcess\",\"endRecord\",\"ephemeral\",\"evaluate\",\"failSpan\",\"failureOutcome\",\"fakeClock\",\"fakeHost\",\"fakeProcess\",\"firstDetector\",\"freeAt\",\"groupProblems\",\"grpcClient\",\"grpcDial\",\"grpcMeetings\",\"grpcOperations\",\"grpcOptions\",\"grpcOutcome\",\"grpcTarget\",\"handle\",\"healthRequest\",\"healthStatus\",\"heartbeat\",\"heartbeatDetection\",\"helloCommandDial\",\"helloJudge\",\"httpClient\",\"httpClientMeetings\",\"httpDial\",\"httpTransport\",\"idleSpan\",\"inequalities\",\"inspectInstanceLock\",\"installService\",\"ioredis\",\"isExitCode\",\"isExitSignal\",\"isMessageShape\",\"joinPath\",\"keyedLimiter\",\"kubernetes\",\"limitRule\",\"limitedResponse\",\"limiterMachine\",\"limiterProblems\",\"limiterStateOf\",\"lint\",\"lintStop\",\"localDev\",\"lockText\",\"logEvents\",\"longestRetryAfter\",\"matchesMessage\",\"mayReissue\",\"meetings\",\"memoryStore\",\"mongoClient\",\"mongoMeetings\",\"mongoOptions\",\"ndjson\",\"nodeAgent\",\"nodeAmqp\",\"nodeGrpc\",\"nodeHostPorts\",\"nodeMongo\",\"nodePostgres\",\"nodeProcess\",\"nodeWs\",\"optionsRequest\",\"outcomeResponse\",\"parseDiscovery\",\"parseEnvFile\",\"parseLockOwner\",\"pathOf\",\"pgClient\",\"pgMeetings\",\"platformClock\",\"poolOptions\",\"probeHandler\",\"probeOnce\",\"probeProblems\",\"probeResponse\",\"probeServer\",\"processPortOf\",\"queueDrain\",\"quietServer\",\"rabbitClient\",\"rabbitMeetings\",\"rabbitOptions\",\"readDiscovery\",\"readyWait\",\"realClock\",\"recoverSpan\",\"redact\",\"redeliverOnce\",\"redisClient\",\"redisLimiterStore\",\"removeDiscovery\",\"renderSystemdTimer\",\"renderSystemdUnit\",\"renderTaskXml\",\"replay\",\"retrier\",\"retry\",\"retryAfterDelay\",\"retryAfterSeconds\",\"retryBackoff\",\"retryProblems\",\"retrySchedule\",\"rotatingLog\",\"sameProcess\",\"scriptedCheck\",\"seeded\",\"service\",\"serviceBindings\",\"servicePaths\",\"serviceProblems\",\"serviceStatus\",\"sessionCheck\",\"sessionCheckDetection\",\"sessionCheckProblems\",\"settingsJudge\",\"specProblems\",\"sse\",\"sslRequestDial\",\"stageRank\",\"startJudge\",\"startOrder\",\"startService\",\"statusJudge\",\"statusLineJudge\",\"stopService\",\"stopTree\",\"superviseGroup\",\"symbolsOf\",\"systemdArg\",\"tcpDial\",\"testLogger\",\"transportConformance\",\"uninstallService\",\"unwatched\",\"upgradeJudge\",\"upgradeRequest\",\"utf16le\",\"verdictOf\",\"watchdog\",\"windowsArg\",\"workerLoop\",\"writeDiscovery\",\"writeOutcome\",\"wsClient\",\"wsDial\",\"wsMeetings\",\"wsOptions\",\"wsUrl\"] },\n \"@mark1russell7/site-pages\": { version: \"0.2.26\", names: [\"AttributeValue\",\"BASE_CSS\",\"BuildInfo\",\"Child\",\"CopyTextOptions\",\"DATA_STAMP_SCHEMA\",\"DEFAULT_CHANGELOGS\",\"GITHUB_API\",\"GITHUB_GRAPHQL\",\"HELP\",\"KPI_FILE\",\"KPI_FORMAT\",\"KpiError\",\"MAX_DATA_AGE_DAYS\",\"MAX_LIMIT_DAYS_WITHOUT_RULING\",\"MAX_MINORS_BEHIND\",\"MAX_PANELS\",\"MAX_STEPS\",\"MIN_STEPS\",\"NPM_REGISTRY\",\"OPEN_CLASSES\",\"READ_BUDGET\",\"RELEASES_SCRIPT\",\"RehypeNode\",\"ReleaseDataError\",\"RoadmapParseError\",\"STAMPS_FILE\",\"STAMP_MARK\",\"STATUS_CLASSES\",\"STATUS_SCRIPT\",\"SURFACE_BUDGET_MS\",\"SiteEnv\",\"SiteKpiContext\",\"SiteKpiInput\",\"SiteKpiPlugin\",\"SiteShellConfig\",\"SiteShellConfigInput\",\"SiteShellOptions\",\"SiteShellPlugin\",\"SiteShellTag\",\"SiteStampsPage\",\"SiteStampsPlugin\",\"SiteTarget\",\"THEMES\",\"TYPESCRIPT_PROBE\",\"Theme\",\"UsageError\",\"applyTheme\",\"axisChoices\",\"build\",\"buildInfo\",\"buildStatusBoard\",\"byId\",\"changelogFaults\",\"changelogVersions\",\"checkFreshness\",\"checkStateOf\",\"classCounts\",\"commitTime\",\"compareVersions\",\"copyText\",\"copyToClipboard\",\"cronLines\",\"currentTheme\",\"dayRange\",\"escapeHtml\",\"facetChoices\",\"failingCases\",\"firstSentence\",\"gitTagDates\",\"githubGreenRun\",\"githubOpenWork\",\"githubReleases\",\"globFiles\",\"greenRunOf\",\"h\",\"headCommit\",\"headingAnchor\",\"headingDate\",\"holdControls\",\"inlineMarkdown\",\"isShallow\",\"kindOf\",\"kpiFile\",\"kpiProblems\",\"kpiText\",\"laneCenter\",\"latestAt\",\"linksOf\",\"longDate\",\"markdownTables\",\"mergeReleases\",\"minorsBehind\",\"mountExplorer\",\"nextStepsCap\",\"nextTheme\",\"npmPublishTimes\",\"numberTable\",\"oldestFirst\",\"openGroups\",\"openRecord\",\"originRepository\",\"pageShell\",\"parseBuildArgs\",\"parseChangelog\",\"parseDataStamps\",\"parseRoadmap\",\"parseVersion\",\"plainText\",\"planSteps\",\"probeScript\",\"readChangelogs\",\"readKpi\",\"readReleases\",\"readStatusBoard\",\"rehypeScrollCue\",\"releaseBodyEntries\",\"releaseReading\",\"releaseSummary\",\"releasesLead\",\"renderDataStamp\",\"renderReleasesPage\",\"renderStatusPage\",\"roadmapItems\",\"runCli\",\"safeUrl\",\"sectionMarksBreak\",\"sectionsOf\",\"setAxis\",\"setFacet\",\"setHold\",\"setMeasure\",\"settle\",\"setupTheme\",\"shortDate\",\"showBuild\",\"siteBase\",\"siteKpi\",\"siteShell\",\"siteStamps\",\"slugOf\",\"splitRow\",\"statusClassOf\",\"statusLead\",\"themeScript\",\"timelineLayout\",\"utcDay\",\"versionCommitTime\",\"versionOfTag\",\"viewOf\",\"writeKpi\"] },\n \"@mark1russell7/splay\": { version: \"0.2.0\", names: [\"DataType\",\"Position\",\"RenderContext\",\"Size\",\"TYPE_SYMBOL\",\"ViewerFactory\",\"arrayPath\",\"createRegistry\",\"dispatch\",\"gridLayout\",\"inferType\",\"isDynamic\",\"listLayout\",\"objectPath\",\"pathDepth\",\"resolve\",\"splitLayout\"] },\n \"@mark1russell7/ste-lint\": { version: \"0.1.2\", names: [\"CONFIG_FILE_NAME\",\"ConfigError\",\"DEFAULT_IGNORE\",\"DEFAULT_INCLUDE\",\"DEFAULT_LIMITS\",\"DEFAULT_WORD_LIST\",\"DICTIONARY_ENV\",\"DICTIONARY_FORMAT\",\"Dictionary\",\"DictionaryError\",\"Linter\",\"ProseLinter\",\"RULES\",\"RULE_IDS\",\"USAGE\",\"baseConfig\",\"buildLexicon\",\"extractCode\",\"fileKind\",\"findConfigFile\",\"findFiles\",\"formatJson\",\"formatText\",\"getRule\",\"globToRegExp\",\"isRuleId\",\"lintText\",\"loadConfig\",\"loadDictionary\",\"mergeWordList\",\"parseArgs\",\"parseDictionary\",\"resolveConfig\",\"runCli\",\"summarize\",\"validateConfig\"] },\n \"@mark1russell7/template-cli\": { version: \"0.1.5\", names: [\"template\"] },\n \"@mark1russell7/vex\": { version: \"0.17.2\", names: [\"Addr\",\"AllowsOther\",\"AnyDomain\",\"Arg\",\"ArgInput\",\"ArgValue\",\"ArrayKey\",\"Axis\",\"AxisBody\",\"AxisOpts\",\"CELL_KIND\",\"CallArgs\",\"CallReturn\",\"CallableFns\",\"CellFormulas\",\"CellRef\",\"ChainBase\",\"ChainContext\",\"ChainOf\",\"CompileFn\",\"CompileOptions\",\"DeclaredType\",\"Dependency\",\"Domain\",\"DomainFor\",\"DomainMembers\",\"DomainSpec\",\"DomainValue\",\"ErrorCode\",\"ErrorDetails\",\"ErrorKind\",\"EvalOptions\",\"Expr\",\"ExprOf\",\"ExprTag\",\"ExtContext\",\"ExtHandler\",\"FixedMove\",\"FnCalls\",\"FnDef\",\"FnOp\",\"FnParamKind\",\"FnTable\",\"FreeFn\",\"GridKey\",\"ItemNames\",\"KernelPlan\",\"KernelRunOptions\",\"KeysOfType\",\"KindValue\",\"LIST_OPS\",\"Law\",\"LiftedOp\",\"ListBody\",\"ListChain\",\"ListItem\",\"ListOp\",\"ListOptions\",\"ListOpts\",\"LoopNext\",\"LoopStep\",\"LoopVar\",\"LoopVars\",\"MAX_DOCUMENT_DEPTH\",\"MAX_ITERATIONS\",\"MAX_NESTING\",\"Merge\",\"MethodKeys\",\"Monoid\",\"Move\",\"Names\",\"NoFns\",\"OpNames\",\"OpParams\",\"OpReturn\",\"OpSpec\",\"OpTable\",\"OpsProxy\",\"Optional\",\"OtherMembers\",\"ParamChains\",\"ParamKind\",\"Position\",\"PrimitiveKind\",\"Program\",\"Read\",\"ReduceOpts\",\"ResolvedOp\",\"Result\",\"ReturnKind\",\"Root\",\"RunOptions\",\"SPECIAL_FORMS\",\"Sheet\",\"SheetOptions\",\"SheetRoot\",\"SheetRow\",\"SheetRun\",\"SheetTable\",\"Space\",\"SpaceKind\",\"SpecialForm\",\"TERM_KINDS\",\"Trace\",\"TraceEvent\",\"TraceSink\",\"Traversal\",\"TraversalItem\",\"VEX_WORLD\",\"ValueOf\",\"ValueOfDomain\",\"VexEntry\",\"VexError\",\"VexList\",\"VexOptions\",\"addrExprs\",\"app\",\"applyMove\",\"axes\",\"axisExprs\",\"axisTargets\",\"call\",\"cell\",\"chainResult\",\"children\",\"codeOf\",\"compile\",\"defineDomain\",\"deps\",\"describeType\",\"domainOf\",\"each\",\"evaluate\",\"explain\",\"ext\",\"fail\",\"findMethod\",\"fixAddr\",\"fn\",\"fold\",\"formatError\",\"formatTrace\",\"fromDocument\",\"getOr\",\"index\",\"isAxis\",\"isDepthError\",\"isDocument\",\"isExpr\",\"isFieldName\",\"isFixedAddr\",\"isListOp\",\"isMove\",\"isNone\",\"isOpName\",\"isSome\",\"isStackOverflow\",\"isVexList\",\"iterate\",\"kernelPlan\",\"key\",\"labelOf\",\"let_\",\"liftsAt\",\"listOf\",\"lit\",\"mapResult\",\"matchesKind\",\"monoids\",\"moveExpr\",\"nestingOf\",\"none\",\"offset\",\"ok\",\"origin\",\"other\",\"parent\",\"parse\",\"previewValue\",\"rec\",\"ref\",\"resolveAddr\",\"resolveOp\",\"safeIs\",\"serialize\",\"shapeError\",\"sizeOf\",\"some\",\"space\",\"toDocument\",\"toKernelError\",\"toOptional\",\"toPath\",\"toVexError\",\"toVexResult\",\"traversal\",\"v\",\"vex\",\"vexChecker\",\"vexDefinitions\",\"vexError\",\"vexList\",\"vexMachine\",\"vexSelf\"] },\n \"@mark1russell7/vex-compiler\": { version: \"0.17.2\", names: [\"FALLBACK\",\"createRuntime\",\"emitModule\",\"emitSheetModule\",\"generate\",\"load\",\"tiered\"] },\n \"@mark1russell7/vex-domains\": { version: \"0.17.2\", names: [\"Angle\",\"AngleDomain\",\"AngleOps\",\"BoolDomain\",\"BoolOps\",\"Color\",\"ColorDomain\",\"ColorOps\",\"DateDomain\",\"DateOps\",\"Fn\",\"FnDomain\",\"FnOps\",\"JsonDomain\",\"JsonFieldSchema\",\"JsonItemKind\",\"JsonKind\",\"JsonLeaf\",\"JsonOps\",\"JsonValue\",\"LiftedNDVectorDomain\",\"LiftedNDVectorOps\",\"LocalDate\",\"MAX_DAYS\",\"Maybe\",\"MaybeDomain\",\"MaybeOps\",\"NDVector\",\"NDVectorDomain\",\"NDVectorOps\",\"NumDomain\",\"NumOps\",\"NumRecord\",\"NumRecordDomain\",\"NumRecordOps\",\"SCHEMA_DOMAINS\",\"SCHEMA_PROGRAM\",\"TextDomain\",\"TextOps\",\"Vec2\",\"Vec2Domain\",\"Vec2Ops\",\"XY\",\"XYDomain\",\"XYOps\",\"schemaOf\"] },\n \"@procedures/client\": { version: \"0.48.1\", names: [\"BatchExecutor\",\"BodyError\",\"CIRCUIT_BREAKER_MACHINE\",\"CONSOLE_LOGGER\",\"CONTRACT_COLLECTION\",\"CONTRACT_PATHS\",\"CONTRACT_PRINCIPAL\",\"CONTRACT_TOKEN\",\"CircuitBreakerError\",\"Client\",\"ClientError\",\"CollectionTopicCollisionError\",\"DEADLINE_METADATA_KEY\",\"DEFAULT_FIND_LIMIT\",\"DEFAULT_KEPT_METADATA\",\"DEFAULT_LIVE_KEYS\",\"DEFAULT_LIVE_TOPICS\",\"DEFAULT_LIVE_VALUE_BYTES\",\"DEFAULT_QUERY_OPERATORS\",\"DEFAULT_QUERY_POLICY\",\"DELIVERY_METADATA_KEY\",\"DefaultEventBus\",\"ERROR_CODES\",\"ERROR_REGISTRY\",\"EVENTS_SUBSCRIBE_PATH\",\"ErrorCategory\",\"ErrorSeverity\",\"EventBus\",\"EventPublisher\",\"HIDDEN_ERROR_MESSAGE\",\"HandlerNotFoundError\",\"HttpServerTransport\",\"HttpTransport\",\"IDEMPOTENCY_KEY_METADATA\",\"INFERRED_EFFECTS_METADATA_KEY\",\"IdempotencyCache\",\"InvocationError\",\"LITERAL_KEY\",\"LIVE_LEAVE_PATH\",\"LIVE_SET_PATH\",\"LIVE_SNAPSHOT_PATH\",\"LOCAL_CREDENTIALS\",\"LOCAL_MARKER\",\"LiveState\",\"LocalTransport\",\"LogStorage\",\"MANIFEST_FORMAT\",\"MAX_DATA_DEPTH\",\"MAX_EXPECTED_VERSION_LENGTH\",\"MAX_IDEMPOTENCY_KEY_LENGTH\",\"MAX_LIVE_KEY_LENGTH\",\"MAX_SUBSCRIPTION_TOPICS\",\"MAX_TOPIC_LENGTH\",\"MockTransport\",\"NARROWING_HEADER\",\"NARROWING_METADATA_KEY\",\"NO_ELICITATION_REASON\",\"PARTITION_PATTERN\",\"PRECONDITION_NOT_SUPPORTED\",\"PROCEDURE_JSON_KEY\",\"PROCEDURE_NAME_KEY\",\"PROCEDURE_REGISTRY\",\"PROCEDURE_SYMBOL\",\"PROCEDURE_WHEN_KEY\",\"PROGRAM_WORLD\",\"PROTOCOL_HEADER\",\"PROTOCOL_VERSION\",\"PURE_EFFECTS\",\"PortTransport\",\"ProcedureBuilder\",\"ProcedureRefBuilder\",\"ProcedureRegistry\",\"ProcedureServer\",\"QUERY_OPERATORS\",\"RAW_INPUT_TAG\",\"REGISTRY_READ_EFFECTS\",\"RUNS_REFS_TAG\",\"RateLimitError\",\"RegistryError\",\"RouteResolver\",\"STANDARD_RESOURCES\",\"STREAM_GAP_METADATA_KEY\",\"STREAM_ITEM_METADATA_KEY\",\"STREAM_METADATA_KEY\",\"Semaphore\",\"Server\",\"ServerError\",\"StorageFieldOperators\",\"StoragePatch\",\"StoragePatchOperations\",\"StorageQueryOperator\",\"StorageQueryOptions\",\"StorageQueryPolicy\",\"StorageSelector\",\"StorageSort\",\"StorageSortDirection\",\"SubscriptionError\",\"TIMEOUT_METADATA_KEY\",\"TIMER_DEFAULTS\",\"TRACEPARENT_METADATA_KEY\",\"UNLIMITED_CAPABILITY\",\"VERSION_CONFLICTS_METADATA_KEY\",\"ValidationError\",\"VersionConflictError\",\"WEBSOCKET_CONNECTION_MACHINE\",\"WHEN_IMMEDIATE\",\"WHEN_NEVER\",\"WHEN_PARENT\",\"WebSocketServerTransport\",\"WebSocketState\",\"WebSocketTransport\",\"absorbTimeout\",\"addNarrowing\",\"admitsRow\",\"admittedStorage\",\"allCoreModules\",\"allCoreProcedures\",\"allProcedure\",\"andProcedure\",\"anyProcedure\",\"anySchema\",\"applyPatch\",\"asVersionConflictError\",\"assertValidPath\",\"bearerOf\",\"bodyPathAddressing\",\"buildResponse\",\"bundle\",\"callMatches\",\"callerOf\",\"capabilityRefusal\",\"chainProcedure\",\"checkBrowserRequest\",\"checkEffects\",\"clearRuntimeProcedures\",\"clientCaller\",\"clientModule\",\"collectionChangeTopic\",\"collectionTopicPartition\",\"collectionTopicReads\",\"collectionTopicRule\",\"collectionTopicTarget\",\"compareStorageValues\",\"compileSelector\",\"compose\",\"conditionalProcedure\",\"constantProcedure\",\"contractDescription\",\"cookiesOf\",\"coreModule\",\"coreProcedures\",\"createAndRegister\",\"createApiKeyAuthMiddleware\",\"createAuthMiddleware\",\"createBatchExecutor\",\"createBearerAuthMiddleware\",\"createCacheMiddleware\",\"createChannelPrefix\",\"createCircuitBreakerMiddleware\",\"createCollectionProcedures\",\"createCombinedTimeoutMiddleware\",\"createElicit\",\"createError\",\"createErrorFromException\",\"createErrorFromHTTPStatus\",\"createEventBus\",\"createLazyRegistry\",\"createOverallTimeoutMiddleware\",\"createPaginationMiddleware\",\"createPerServiceRateLimiter\",\"createProcedure\",\"createProcedureServer\",\"createRateLimitMiddleware\",\"createRefScope\",\"createRegistry\",\"createRetryMiddleware\",\"createRoute\",\"createRouteResolver\",\"createSimpleTracingMiddleware\",\"createTimeoutMiddleware\",\"createTracingMiddleware\",\"createTypedCaller\",\"createTypedEventBus\",\"createZodMiddleware\",\"credentialedCors\",\"credentialsOf\",\"deadlineOf\",\"debounceChannel\",\"declaredCalls\",\"decodeSegment\",\"defaultServerUrlStrategy\",\"defaultUrlPattern\",\"defineModule\",\"definePackage\",\"defineProcedure\",\"defineProcedureProcedure\",\"defineStub\",\"deleteProcedureProcedure\",\"deliveryOf\",\"describeIssues\",\"describeProcedureEntry\",\"describeRegistry\",\"describeTransportContract\",\"desugarControlValue\",\"desugarInput\",\"desugarProgram\",\"documentAt\",\"effectsIn\",\"effectsOf\",\"effectsValue\",\"elicitConfirmation\",\"elicitInput\",\"elicitWithPolicy\",\"encodeSegment\",\"examinesNestedCall\",\"executeRef\",\"executeWithConcurrency\",\"explainInvocation\",\"exposeError\",\"exposePatterns\",\"exposedProcedures\",\"extractTemplate\",\"extractTracingInfo\",\"faceRules\",\"filterChannel\",\"flattenRoute\",\"formatError\",\"formatTraceparent\",\"forwardChannel\",\"fromEnvelopeProgram\",\"fromJson\",\"getAllRuntimeProcedures\",\"getErrorMetadata\",\"getGlobalEventBus\",\"getMissingPaths\",\"getProcedureProcedure\",\"getRefName\",\"getRefWhen\",\"getRuntimeProcedure\",\"hasAmbientCredentials\",\"hasCallPolicy\",\"hasRuntimeProcedure\",\"hashOf\",\"hiddenReach\",\"hintImagesOf\",\"hostNameOf\",\"hostPolicy\",\"hostProcedures\",\"hours\",\"httpStatusOf\",\"hydrateInput\",\"idempotencyKeyOf\",\"idempotentIn\",\"identityProcedure\",\"inferredEffectsOf\",\"invalidateCache\",\"invokePath\",\"invokeProcedure\",\"isAnyProcedureRef\",\"isAsyncIterable\",\"isBatchRoute\",\"isCallOptions\",\"isControlFlowPath\",\"isDataDriven\",\"isDestructive\",\"isDuration\",\"isEnvelopeProgram\",\"isExpectedVersion\",\"isKnownError\",\"isKnownErrorCode\",\"isLiteral\",\"isLocalCredentials\",\"isLoopbackAddress\",\"isLoopbackHost\",\"isNotSentError\",\"isOpenWorld\",\"isPatchOperations\",\"isPlainObject\",\"isProcedureRef\",\"isProcedureRefJson\",\"isProtocolErrorCode\",\"isReadOnly\",\"isRepeatable\",\"isRuntimeDefined\",\"isStandardSchema\",\"isUnboundedStream\",\"isValidRoute\",\"isW3cIds\",\"jsonSchemaOf\",\"keyToMethod\",\"keyToPath\",\"ladder\",\"lastResortError\",\"listProceduresProcedure\",\"liveTopic\",\"liveTopicTarget\",\"liveView\",\"loadAllIn\",\"lookupOutputRef\",\"manifestProcedure\",\"mapChannel\",\"mapProcedure\",\"markDataDriven\",\"matchPath\",\"matchesSelector\",\"mathProcedures\",\"mcpCaller\",\"mergeChannels\",\"mergeContext\",\"mergePatch\",\"mergeRoutes\",\"metaProcedures\",\"methodName\",\"methodToKey\",\"methodToPath\",\"metricsInterceptor\",\"minutes\",\"mockBuilder\",\"moduleClosure\",\"ms\",\"nameKey\",\"nameOfKey\",\"namesOfScope\",\"namespace\",\"narrowCapability\",\"narrowDeadline\",\"narrowWithin\",\"narrowingOf\",\"nestedCallRefusal\",\"newIdempotencyKey\",\"newSpanId\",\"newTraceId\",\"noneProcedure\",\"normalizeCallOptions\",\"normalizeRef\",\"notProcedure\",\"observeHydration\",\"operatorAnswer\",\"optionalMs\",\"orProcedure\",\"originOf\",\"outputItems\",\"outputSchema\",\"outputValue\",\"paginateAll\",\"parallelProcedure\",\"parseProcedureJson\",\"parseTraceparent\",\"patchProblems\",\"pathToKey\",\"pathToMethod\",\"postOnlyStrategy\",\"preconditionNotSupported\",\"preloadRefPaths\",\"prepareRootCall\",\"proc\",\"procedureHandler\",\"procedureServerOptions\",\"programMachine\",\"protocolVersionOf\",\"queryEntries\",\"queryOptionsProblems\",\"rawInputRule\",\"readJsonBody\",\"realClock\",\"reduceProcedure\",\"registerClientProcedures\",\"registerModule\",\"registerModules\",\"registerProcedures\",\"remoteEvents\",\"replayTransitions\",\"requestCredentials\",\"resetGlobalEventBus\",\"resilience\",\"resolveIn\",\"resolveOutputRef\",\"restfulHttpMethodStrategy\",\"restoreDeadline\",\"retryableOf\",\"rpcServerUrlStrategy\",\"runControl\",\"runDocument\",\"runOperand\",\"runProgram\",\"runtimeProgramOf\",\"scopeOf\",\"scopeOfNames\",\"seconds\",\"segmentsToTopic\",\"selectorProblems\",\"shouldExecuteRef\",\"streamOutput\",\"stringifyProcedureJson\",\"subscribeRemote\",\"surfaceRule\",\"takesRawInput\",\"throttleChannel\",\"throwProcedure\",\"timeoutInterceptor\",\"toEnvelopeProgram\",\"toJson\",\"toMs\",\"tokenMatches\",\"toolHintOverrideOf\",\"toolHintOverrideRefusal\",\"toolHints\",\"toolHintsOf\",\"topicMatcher\",\"topicToSegments\",\"traceProcedure\",\"tracingInterceptor\",\"tryCatchProcedure\",\"typed\",\"typedAnySchema\",\"untrustedFieldsOf\",\"untrustedText\",\"untrustedTextsOf\",\"upgradeHandler\",\"urlAddressing\",\"validateCalls\",\"validateProcedure\",\"validateSchema\",\"validateSchemaAsync\",\"versionConflict\",\"versionConflicts\",\"versionConflictsOf\",\"withEffects\",\"withEventBusSignal\",\"withHintImages\",\"withScope\",\"withoutSecretHeaders\",\"wrapWithAsyncMiddlewares\",\"wrapWithSyncMiddlewares\",\"writeLog\",\"writeNdjsonStream\",\"writeRemainingTime\",\"zodAdapter\"] },\n \"@procedures/collections\": { version: \"0.48.1\", names: [\"ArrayDeque\",\"ArrayList\",\"AsyncEmitter\",\"AsyncQueue\",\"Channel\",\"CollectionBuilder\",\"ContractViolation\",\"DEFAULT_CONFLICT_POLICY\",\"DEFAULT_EVICTION_POLICY\",\"DEFAULT_FIND_LIMIT\",\"DEFAULT_GROWTH_POLICY\",\"DEFAULT_OVERFLOW_POLICY\",\"DEFAULT_QUERY_OPERATORS\",\"DEFAULT_QUERY_POLICY\",\"DEFAULT_RETRY_POLICY\",\"DEFAULT_UNDERFLOW_POLICY\",\"DEFAULT_VALIDATION_POLICY\",\"DELETED_FIELD\",\"Emitter\",\"Err\",\"EventBatcher\",\"HashMap\",\"HashSet\",\"InMemoryStorage\",\"KEY_DIGITS\",\"LAYER_FIELD\",\"LRUCache\",\"LinkedHashMap\",\"LinkedList\",\"MAX_EXPECTED_VERSION_LENGTH\",\"None\",\"Ok\",\"PRECONDITION_NOT_SUPPORTED\",\"PriorityQueue\",\"QUERY_OPERATORS\",\"Some\",\"StorageListeners\",\"SummaryTree\",\"TTLCache\",\"TreeMap\",\"TreeSet\",\"UNSET\",\"UndoConflictError\",\"UndoLog\",\"VERSION_CONFLICTS_METADATA_KEY\",\"VersionConflictError\",\"applyPatch\",\"arrayContains\",\"arrayDeque\",\"arrayIterator\",\"arrayList\",\"arrayRemove\",\"arrayRemoveAll\",\"asSettled\",\"asVersionConflictError\",\"asyncQueue\",\"average\",\"averagingNumber\",\"blockMethods\",\"booleanCompare\",\"bounded\",\"boundedDeque\",\"boundedList\",\"boundedMap\",\"boundedQueue\",\"buffered\",\"buildList\",\"buildMap\",\"bundle\",\"channel\",\"checkBounds\",\"checkInsertBounds\",\"checkRangeBounds\",\"chunk\",\"clamp\",\"collect\",\"collectToArray\",\"collectToList\",\"collectToMap\",\"collectToSet\",\"collectionStorageContract\",\"combineHashes\",\"compareKeys\",\"compareStorageValues\",\"comparing\",\"comparingKey\",\"compileSelector\",\"compose\",\"concat\",\"contractVersionOf\",\"copyAsPatch\",\"count\",\"counting\",\"createEmitter\",\"dateCompare\",\"deepEq\",\"deepEqual\",\"defaultCompare\",\"defaultEq\",\"defaultHash\",\"delegate\",\"describeCollectionStorageContract\",\"distinct\",\"distinctConsecutive\",\"dropIndex\",\"emptyList\",\"emptyMap\",\"emptyQueue\",\"enhanceMethod\",\"enumerate\",\"eqBy\",\"evented\",\"eventedDeque\",\"eventedList\",\"eventedMap\",\"eventedQueue\",\"every\",\"fanIn\",\"fanOut\",\"filter\",\"filtering\",\"find\",\"findIndex\",\"findLastIndex\",\"fingerprintOf\",\"first\",\"flatMap\",\"flatMapOption\",\"flatMapResult\",\"flatMapping\",\"flatten\",\"forwardEvent\",\"fromNullable\",\"getOrElse\",\"getOrElseResult\",\"groupBy\",\"groupingBy\",\"groupingByWith\",\"hasCapability\",\"hashBy\",\"hashMap\",\"hashNumber\",\"hashSet\",\"hashString\",\"immutableListOf\",\"immutableMapOf\",\"interceptMethods\",\"inversePatch\",\"isErr\",\"isExpectedVersion\",\"isNone\",\"isOk\",\"isPatchOperations\",\"isSome\",\"isUnset\",\"isValidKey\",\"iterToMap\",\"joining\",\"keyBetween\",\"keysBetween\",\"keysForDrop\",\"last\",\"linkedHashMap\",\"linkedList\",\"listOf\",\"lruCache\",\"lruMap\",\"map\",\"mapAsyncOption\",\"mapAsyncResult\",\"mapError\",\"mapOf\",\"mapOption\",\"mapResult\",\"mapping\",\"matchesSelector\",\"max\",\"maxBy\",\"merge\",\"mergeCopies\",\"mergePatch\",\"min\",\"minBy\",\"mutableListOf\",\"mutableMapOf\",\"nCopies\",\"none\",\"normalizeStorageResult\",\"nullsFirst\",\"nullsLast\",\"numberCompare\",\"onWhen\",\"optionToResult\",\"partition\",\"partitioningBy\",\"patchProblems\",\"pipe\",\"pipeline\",\"preconditionNotSupported\",\"priorityQueue\",\"queryEntries\",\"queryOptionsProblems\",\"queueOf\",\"range\",\"rangeTo\",\"readWriteLock\",\"readonly\",\"readonlyCollection\",\"readonlyList\",\"readonlyMap\",\"readonlyQueue\",\"reduce\",\"reducing\",\"reducingWith\",\"reentrantSynchronized\",\"reportListenerError\",\"requireNonEmpty\",\"requireNonNull\",\"resolveStacks\",\"resultToOption\",\"reverse\",\"reverseArrayIterator\",\"reversed\",\"safe\",\"safeDeque\",\"safeList\",\"safeMap\",\"safeQueue\",\"scan\",\"select\",\"selectorProblems\",\"sequence\",\"sequenceResults\",\"shallowEq\",\"singletonList\",\"singletonMap\",\"skip\",\"skipWhile\",\"some\",\"sort\",\"stackOf\",\"stringCompare\",\"stringCompareIgnoreCase\",\"stringHashCode\",\"sum\",\"summarizingNumber\",\"summaryTree\",\"summingNumber\",\"synchronized\",\"synchronizedCollection\",\"synchronizedList\",\"synchronizedMap\",\"synchronizedSet\",\"take\",\"takeWhile\",\"tap\",\"teeing\",\"thenComparing\",\"ticker\",\"timeout\",\"toArray\",\"toList\",\"toMap\",\"toNullable\",\"toSet\",\"treeMap\",\"treeSet\",\"tryCatch\",\"tryCatchAsync\",\"ttlCache\",\"ttlCollection\",\"ttlMap\",\"unbuffered\",\"unmodifiableCollection\",\"unmodifiableList\",\"unmodifiableMap\",\"unwrap\",\"unwrapResult\",\"versionConflict\",\"versionConflicts\",\"versionConflictsOf\",\"window\",\"workerPool\",\"zip\"] },\n \"@procedures/compiler\": { version: \"0.48.1\", names: [\"CallExplanationOutput\",\"CapabilityInput\",\"CapabilityInputSchema\",\"CompiledProgram\",\"EffectsOutput\",\"MAX_REF_DEPTH\",\"NO_EFFECTS\",\"OPENRPC_VERSION\",\"ParallelResult\",\"ProgramCheckInput\",\"ProgramCheckInputSchema\",\"ProgramCheckOutput\",\"ProgramCheckOutputSchema\",\"ProgramCompileInput\",\"ProgramCompileInputSchema\",\"ProgramCompileOutput\",\"ProgramCompileOutputSchema\",\"ProgramContext\",\"ProgramDiagramInput\",\"ProgramDiagramInputSchema\",\"ProgramDiagramOutput\",\"ProgramDiagramOutputSchema\",\"ProgramExplainInput\",\"ProgramExplainInputSchema\",\"ProgramExplainOutput\",\"ProgramExplainOutputSchema\",\"RuntimeFrame\",\"SdkInput\",\"SdkOpenrpcInput\",\"SdkOpenrpcInputSchema\",\"SdkOpenrpcOutput\",\"SdkOpenrpcOutputSchema\",\"SdkTypescriptInput\",\"SdkTypescriptInputSchema\",\"SdkTypescriptOutput\",\"SdkTypescriptOutputSchema\",\"UNKNOWN_EFFECTS\",\"bindScopes\",\"call\",\"callRaw\",\"checkCalls\",\"checkProgram\",\"checkShape\",\"childPointer\",\"childrenOf\",\"compileClosure\",\"compileProgram\",\"compilerModule\",\"coreProcedureOf\",\"deferred\",\"diagramProgram\",\"emitText\",\"entryTakesRawInput\",\"execWithInput\",\"explainProgram\",\"fail\",\"findDefinitions\",\"foldProgram\",\"get\",\"hasErrors\",\"inferEffects\",\"isCallLike\",\"isControl\",\"items\",\"manifestFacts\",\"merge\",\"mermaidText\",\"message\",\"nameDiagnostics\",\"normalize\",\"object\",\"parallel\",\"printIR\",\"programCheckInterceptor\",\"programModule\",\"registerCompilerProcedures\",\"registryFacts\",\"resolveScopes\",\"schemaToType\",\"scope\",\"shapeOf\",\"sortDiagnostics\",\"toCapability\",\"toEffects\",\"toMermaid\",\"toOpenRpc\",\"toTypeScriptSdk\",\"truthy\",\"unknownName\",\"walk\",\"withDefinitions\"] },\n \"@procedures/dag\": { version: \"0.48.1\", names: [\"DagTraverseInputSchema\",\"DagTraverseOutputSchema\",\"buildLeveledDAG\",\"buildNodeMap\",\"callsGit\",\"createNode\",\"createProcessor\",\"dagModule\",\"dagTraverse\",\"executeDAG\",\"executeDAGSequential\",\"filterDAGFromRoot\",\"getAncestors\",\"getDescendants\",\"getTopologicalOrder\",\"hubBreadthFirstOrder\",\"keyedLock\",\"packageNodes\",\"registerDagProcedures\",\"repositoryRoot\",\"visualizeDAG\"] },\n \"@procedures/env\": { version: \"0.48.1\", names: [\"DEFAULT_ENV_SETTINGS\",\"DEFAULT_SECRET_PATTERNS\",\"EnvCheckInput\",\"EnvCheckOutput\",\"EnvGetInput\",\"EnvGetOutput\",\"EnvListEntry\",\"EnvListInput\",\"EnvListOutput\",\"EnvModuleOptions\",\"EnvSource\",\"createEnvModule\",\"envCheck\",\"envGet\",\"envList\",\"envModule\",\"isDefaultSecret\",\"registerEnvProcedures\",\"secretMatcher\"] },\n \"@procedures/fs\": { version: \"0.48.1\", names: [\"ConfinedFs\",\"FsModuleOptions\",\"KeyedLock\",\"NDJSON_LINE_TOO_LONG\",\"OUTSIDE_ROOT\",\"ResolvedRoot\",\"confineFsProcedures\",\"confineToRoot\",\"copy\",\"createFsModule\",\"editFile\",\"exists\",\"fsHash\",\"fsModule\",\"fsTemp\",\"fsWatch\",\"fsWriteJson\",\"glob\",\"healNdjsonTail\",\"healNdjsonTailSync\",\"inRoot\",\"isInside\",\"isOutsideRoot\",\"mkdir\",\"move\",\"outsideRoot\",\"read\",\"readJson\",\"readdir\",\"realPathIsInside\",\"realPathOf\",\"registerFsProcedures\",\"resolveRoot\",\"rm\",\"rootDecisionOf\",\"rootRulesOf\",\"stat\",\"withLock\",\"write\",\"writeFileAtomic\",\"writeFileAtomicSync\"] },\n \"@procedures/gh\": { version: \"0.48.1\", names: [\"GhApiFieldValue\",\"GhApiInput\",\"GhApiMethod\",\"GhApiOutput\",\"GhCommonInput\",\"GhCreatedOutput\",\"GhIssueCommentInput\",\"GhIssueCommentOutput\",\"GhIssueCreateInput\",\"GhIssueCreateOutput\",\"GhIssueListInput\",\"GhIssueListOutput\",\"GhIssueViewInput\",\"GhIssueViewOutput\",\"GhItemOutput\",\"GhListOutput\",\"GhPrChecksInput\",\"GhPrChecksOutput\",\"GhPrCreateInput\",\"GhPrCreateOutput\",\"GhPrListInput\",\"GhPrListOutput\",\"GhPrViewInput\",\"GhPrViewOutput\",\"GhReleaseListInput\",\"GhReleaseListOutput\",\"GhReleaseViewInput\",\"GhReleaseViewOutput\",\"GhRunDownloadInput\",\"GhRunDownloadOutput\",\"GhRunListInput\",\"GhRunListOutput\",\"GhRunRerunInput\",\"GhRunRerunOutput\",\"GhRunViewInput\",\"GhRunViewOutput\",\"GhWorkflowRunInput\",\"GhWorkflowRunOutput\",\"ghModule\",\"registerGhProcedures\"] },\n \"@procedures/git\": { version: \"0.48.1\", names: [\"GitError\",\"classifyStatus\",\"git\",\"gitAdd\",\"gitBlame\",\"gitBranch\",\"gitBranchAdd\",\"gitBranchDelete\",\"gitBranchList\",\"gitCheckout\",\"gitClone\",\"gitCommit\",\"gitDiff\",\"gitFetch\",\"gitInit\",\"gitLog\",\"gitMerge\",\"gitMergeAbort\",\"gitModule\",\"gitPull\",\"gitPush\",\"gitRebase\",\"gitRebaseAbort\",\"gitRebaseContinue\",\"gitRemote\",\"gitRemoteSet\",\"gitReset\",\"gitRestore\",\"gitRevParse\",\"gitShow\",\"gitStashApply\",\"gitStashDrop\",\"gitStashExport\",\"gitStashImport\",\"gitStashList\",\"gitStashPop\",\"gitStashPush\",\"gitStatus\",\"gitTagAdd\",\"gitTagDelete\",\"gitTagList\",\"gitWorktreeAdd\",\"gitWorktreeList\",\"gitWorktreeRemove\",\"parseNumstat\",\"parsePorcelainV1\",\"registerGitProcedures\"] },\n \"@procedures/http\": { version: \"0.48.1\", names: [\"DEFAULT_HOST_POLICY\",\"DEFAULT_ITEM_BYTES\",\"DEFAULT_MAX_BYTES\",\"DEFAULT_SETTINGS\",\"DEFAULT_TIMEOUT_MS\",\"HOST_NOT_ALLOWED\",\"HttpError\",\"HttpJsonInput\",\"HttpJsonOutput\",\"HttpMethod\",\"HttpModuleOptions\",\"HttpNdjsonInput\",\"HttpNdjsonOutput\",\"HttpRequestInput\",\"HttpRequestOutput\",\"HttpSseInput\",\"HttpSseOutput\",\"HttpStreamInput\",\"HttpTarget\",\"JsonValue\",\"checkHost\",\"createHostFetch\",\"createHostPolicy\",\"createHttpModule\",\"httpJson\",\"httpModule\",\"httpNdjson\",\"httpRequest\",\"httpSettings\",\"httpSse\",\"isHostNotAllowed\",\"isPublicAddress\",\"ndjsonLines\",\"parseAddress\",\"registerHttpProcedures\",\"specialClass\",\"sseEvents\",\"systemResolver\"] },\n \"@procedures/json\": { version: \"0.48.1\", names: [\"CsvParseInput\",\"CsvParseOutput\",\"CsvStringifyInput\",\"CsvStringifyOutput\",\"JsonDiffInput\",\"JsonDiffOutput\",\"JsonError\",\"JsonMergeInput\",\"JsonMergeOutput\",\"JsonPatchInput\",\"JsonPatchOutput\",\"JsonQueryInput\",\"JsonQueryOutput\",\"JsonValidateInput\",\"JsonValidateOutput\",\"NOT_EXAMINED\",\"PROTOTYPE_KEYS\",\"YamlParseInput\",\"YamlParseOutput\",\"YamlStringifyInput\",\"YamlStringifyOutput\",\"applyPatch\",\"arrayIndex\",\"assertJson\",\"cloneJson\",\"csvParse\",\"csvStringify\",\"diffJson\",\"escapeToken\",\"formatPointer\",\"jsonDiff\",\"jsonEqual\",\"jsonMerge\",\"jsonModule\",\"jsonPatch\",\"jsonQuery\",\"jsonValidate\",\"lookup\",\"mergePatch\",\"parseCsv\",\"parsePath\",\"parsePointer\",\"parseYaml\",\"queryPath\",\"registerJsonProcedures\",\"stringifyCsv\",\"stringifyYaml\",\"validateJson\",\"yamlParse\",\"yamlStringify\"] },\n \"@procedures/mcp-server\": { version: \"0.48.1\", names: [\"DEFAULT_ELICIT_TIMEOUT_MS\",\"DEFAULT_SERVE_BUNDLE\",\"DEFAULT_UNTRUSTED_TAG\",\"MCP_HTTP_LIMITS\",\"MCP_TASK_LIMITS\",\"McpServerTransport\",\"McpTaskStore\",\"assertLoopbackBind\",\"createMcpHost\",\"createSseTransport\",\"createStdioTransport\",\"createUntrustedEnvelopes\",\"decodePath\",\"defaultUntrustedNotice\",\"encodePath\",\"exposeRule\",\"guardMcpRequest\",\"importBundles\",\"mcpExposeRule\",\"mcpFace\",\"mcpListToolsProcedure\",\"mcpModule\",\"mcpServeProcedure\",\"mcpTaskShareKey\",\"mergeSurfaces\",\"prepareServe\",\"procedureToMcpTool\",\"proceduresToMcpTools\",\"redirectConsoleToStderr\",\"registerMcpProcedures\",\"resolveBundleRegister\",\"taskSupportOf\"] },\n \"@procedures/npm\": { version: \"0.48.1\", names: [\"NpmCommandOutput\",\"NpmCommandOutputSchema\",\"NpmDeprecateInput\",\"NpmDeprecateInputSchema\",\"NpmDeprecateOutput\",\"NpmDeprecateOutputSchema\",\"NpmDistTagsAddInput\",\"NpmDistTagsAddInputSchema\",\"NpmDistTagsAddOutput\",\"NpmDistTagsAddOutputSchema\",\"NpmDistTagsListInput\",\"NpmDistTagsListInputSchema\",\"NpmDistTagsListOutput\",\"NpmDistTagsListOutputSchema\",\"NpmDistTagsRemoveInput\",\"NpmDistTagsRemoveInputSchema\",\"NpmDistTagsRemoveOutput\",\"NpmDistTagsRemoveOutputSchema\",\"NpmJsonOutput\",\"NpmJsonOutputSchema\",\"NpmPackInput\",\"NpmPackInputSchema\",\"NpmPackOutput\",\"NpmPackOutputSchema\",\"NpmViewInput\",\"NpmViewInputSchema\",\"NpmViewOutput\",\"NpmViewOutputSchema\",\"NpmWhoamiInput\",\"NpmWhoamiInputSchema\",\"NpmWhoamiOutput\",\"NpmWhoamiOutputSchema\",\"npmDeprecate\",\"npmDistTagsAdd\",\"npmDistTagsList\",\"npmDistTagsRemove\",\"npmModule\",\"npmPack\",\"npmView\",\"npmWhoami\",\"parseDistTags\",\"registerNpmProcedures\",\"resolveNpm\"] },\n \"@procedures/peer\": { version: \"0.48.1\", names: [\"HOST_PROBE_PREFIX\",\"LOCAL_LISTENER_KNOBS\",\"LockfileData\",\"LockfileHandle\",\"PEER_PROFILE\",\"callOperations\",\"checkServer\",\"connect\",\"createPeer\",\"createProcedureHost\",\"disconnect\",\"discoveryAnnounceProcedure\",\"exposeRule\",\"faceHandler\",\"findServer\",\"generateJson\",\"generateJsonString\",\"generateTypeScript\",\"getActivePeerIds\",\"getConnection\",\"getConnectionIds\",\"getMarkDir\",\"getPeer\",\"getProcedureInfos\",\"getServersDir\",\"httpFace\",\"httpTracker\",\"localFace\",\"lockfileHandle\",\"manifestGenerateProcedure\",\"operationOfCall\",\"peerHostOptions\",\"procedures\",\"readAllLockfiles\",\"readLockfileForPort\",\"registerServerProcedures\",\"removeLockfileForPort\",\"serverCallProcedure\",\"serverConnectProcedure\",\"serverConnectionsProcedure\",\"serverCreateProcedure\",\"serverDisconnectProcedure\",\"serverModule\",\"watchProcedures\",\"writeLockfile\",\"wsFace\"] },\n \"@procedures/shell\": { version: \"0.48.1\", names: [\"CliToolError\",\"DEFAULT_MAX_OUTPUT_BYTES\",\"FLAG_NAME\",\"FOLLOW_BUFFER_BYTES\",\"FakeShell\",\"FakeShellInput\",\"FakeShellOptions\",\"FakeShellResult\",\"FakeShellResults\",\"ProcessRegistry\",\"ShellExecInputSchema\",\"ShellRunInputSchema\",\"ShellStreamInputSchema\",\"ShellWhichInputSchema\",\"buildArgv\",\"cliArg\",\"cliToolJsonOutputSchema\",\"cliToolOutputFields\",\"cliToolOutputSchema\",\"defineCliTool\",\"execPathProgram\",\"fakeShell\",\"findInPath\",\"killTree\",\"nodeScript\",\"parseJsonDocument\",\"parseJsonOutput\",\"processes\",\"registerShellProcedures\",\"runCommand\",\"shellExec\",\"shellModule\",\"shellRun\",\"shellStream\",\"shellWhich\",\"streamCommand\"] },\n \"async-browser-context\": { version: \"0.3.0\", names: [\"AsyncContext\",\"AsyncContextManager\",\"AsyncContextPluginOptions\",\"AsyncLocalStorage\",\"AsyncSnapshot\",\"AsyncVariable\",\"DEFAULT_RUNTIME\",\"METADATA_KEY\",\"ModuleFilter\",\"OverloadYield\",\"PresetOptions\",\"Snapshot\",\"Variable\",\"addCallbackHook\",\"asyncContext\",\"asyncGenerator\",\"asyncGeneratorDelegate\",\"awaitAsyncGenerator\",\"bindGenerator\",\"coroutine\",\"supportsResourceManagement\"] },\n \"ireko\": { version: \"0.1.5\", names: [\"AnyStrategy\",\"ArrangeInput\",\"Arrangement\",\"AuditInput\",\"BUILTIN_STRATEGY_NAMES\",\"Band\",\"ChildEdge\",\"Context2D\",\"Direction\",\"EdgeSpec\",\"Example\",\"Fit\",\"FlowNodeSpec\",\"GroupNode\",\"IrekoEdge\",\"IrekoEdgeData\",\"IrekoError\",\"IrekoNode\",\"IrekoNodeData\",\"Issue\",\"IssueCode\",\"KEYWORDS\",\"LABEL_SCALE\",\"Layout\",\"LayoutFlowOptions\",\"LayoutInput\",\"LayoutOptions\",\"LayoutRef\",\"LayoutSvg\",\"LayoutSvgProps\",\"LayoutView\",\"LayoutViewProps\",\"LayoutWithOptions\",\"MAX_SPRING_STRENGTH\",\"MeasuredChild\",\"Mode\",\"NodeSpec\",\"PlacedEdge\",\"PlacedNode\",\"PolylineEdge\",\"RELAX_DEFAULTS\",\"RendererKind\",\"Screen\",\"Severity\",\"Shape\",\"Strategy\",\"SvgOptions\",\"ToXYFlowOptions\",\"TraceEvent\",\"TreeEdges\",\"avoid\",\"borderPoint\",\"builder\",\"builtinRouters\",\"builtinStrategies\",\"canvasSurface\",\"centerOf\",\"clipRoots\",\"contains\",\"createEngine\",\"createViewport\",\"darkTheme\",\"defaultLimits\",\"defaultsOf\",\"defineRouter\",\"defineStrategy\",\"domSurface\",\"drawFrame\",\"easeInOut\",\"edgeTypes\",\"estimateWidth\",\"examples\",\"fitText\",\"force\",\"forceStrategy\",\"frameOf\",\"grid\",\"gridStrategy\",\"haloOf\",\"inflate\",\"interpolate\",\"isContainer\",\"labelAt\",\"layers\",\"layersStrategy\",\"layout\",\"layoutFlow\",\"lightTheme\",\"morph\",\"mount\",\"mountCanvas\",\"mountDom\",\"mountSvg\",\"node\",\"nodeTypes\",\"orthogonal\",\"overlaps\",\"paintOrder\",\"parse\",\"pathOf\",\"pickIn\",\"print\",\"radial\",\"radialStrategy\",\"rectAt\",\"relaxForces\",\"resample\",\"straight\",\"svgSurface\",\"themeOf\",\"toSVG\",\"toXYFlow\",\"translate\",\"tree\",\"treeStrategy\",\"union\",\"unionAll\",\"useLayout\",\"widthOfCanvas\"] },\n \"page-lifecycle-tracker\": { version: \"0.1.0\", names: [\"PageLifecycle\",\"createPageLifecycle\",\"eventTime\",\"getPageLifecycle\",\"isVisibleState\",\"resetSharedPageLifecycle\",\"summarizeTransitions\"] },\n \"polite-crawler\": { version: \"0.5.0\", names: [\"ALLOW_ALL\",\"AiInput\",\"BOT_PAGE\",\"CAPTURE_SCHEMA\",\"CHUNK_LIMITS\",\"CRAWL_LIMITS\",\"CaptureLog\",\"Classified\",\"Clock\",\"Crawler\",\"DAEMON_DEFAULTS\",\"DAEMON_STATE_SCHEMA\",\"DAYS\",\"DEADLINE_NOTE\",\"DEFAULT_POLICY\",\"DEFAULT_SECRET_PARAMS\",\"DEFAULT_TOKEN\",\"DIFF_LIMITS\",\"DISALLOW_ALL\",\"DISCOVER_LIMITS\",\"Day\",\"DocIndex\",\"DomNode\",\"EgressRefused\",\"Extractors\",\"FAST_RANK_SHARE\",\"FIELD_KINDS\",\"FileBlobStore\",\"HELD_BACK\",\"HTML_ROBOTS\",\"HYBRID_DEFAULTS\",\"HostCounts\",\"HostResult\",\"HostScheduler\",\"HostStateStore\",\"HostStop\",\"HostStopped\",\"Hours\",\"HoursComparison\",\"Interval\",\"KEY_DIRECTORY_PATH\",\"KEY_DIRECTORY_TYPE\",\"MAX_STOP_MS\",\"MemoryHostStateStore\",\"NO_EMBEDDER\",\"NO_OLLAMA\",\"NO_PLAYWRIGHT\",\"NO_SIGNALS\",\"NO_TRANSFORMERS\",\"OLLAMA_MODELS\",\"Outcome\",\"PRODUCT_LIMITS\",\"Paced\",\"PageExtract\",\"PageLink\",\"PolicyOptions\",\"PolitenessPolicy\",\"RECIPE_LIMITS\",\"RESERVED_RECIPES\",\"ROBOTS_MAX_BYTES\",\"RenderRefused\",\"Rest\",\"RestInput\",\"Robots\",\"RobotsDecision\",\"RobotsGroup\",\"RobotsRule\",\"RobotsSignal\",\"SITEMAP_LIMITS\",\"STOPS_HOST\",\"SchedulerOptions\",\"Signals\",\"SqliteHostStateStore\",\"TRANSFORMERS_MODELS\",\"VALIDATOR_MEMO\",\"VECTORS_SCHEMA\",\"VENUE_LIMITS\",\"VERSION\",\"ValidatorAnswer\",\"ValidatorLimits\",\"ValidatorMemo\",\"ValidatorReport\",\"ValidatorVerdict\",\"VectorStore\",\"WATCH_LIMITS\",\"WATCH_SCHEMA\",\"WatchStore\",\"Week\",\"archiveExtractor\",\"archivedDocId\",\"backoffMs\",\"bodyEncoding\",\"browserMissing\",\"canonicalUrl\",\"catchUpIndex\",\"changeCommand\",\"checkFields\",\"checkPolicy\",\"chunkText\",\"chunkTokensOf\",\"classify\",\"compareHours\",\"crawlSite\",\"createHybridSearch\",\"createRuntime\",\"createWebBotAuthSigner\",\"daemonStateFile\",\"dayRange\",\"decide\",\"decodeBody\",\"defaultUserAgent\",\"defineRecipe\",\"describeWeek\",\"diffDocument\",\"diffTexts\",\"disagreements\",\"discoverSite\",\"durationMs\",\"egressLookup\",\"equalJitterMs\",\"estimateTokens\",\"exportWacz\",\"exportWarc\",\"extractDocument\",\"extractPage\",\"feedDate\",\"fetchAndIndex\",\"fetchPage\",\"findDocuments\",\"formatDiff\",\"fromCompact\",\"fromSchemaOrg\",\"fromText\",\"fuseRanks\",\"heldBackMeta\",\"isClientError\",\"isHeldBack\",\"isHtmlRobots\",\"isLoopback\",\"isMailbox\",\"isPdf\",\"isProductToken\",\"isoTime\",\"keyDirectory\",\"locate\",\"locationMatches\",\"makeRecord\",\"matchesPattern\",\"metaSignals\",\"namesVenue\",\"nextValidatorMemo\",\"normalizePath\",\"ollamaEmbedder\",\"openCrawler\",\"parseHttpDate\",\"parseRetryAfter\",\"parseRobots\",\"pickProduct\",\"pickVariant\",\"playwrightRenderer\",\"policyFor\",\"productOf\",\"productToken\",\"rankHoursLinks\",\"readAmount\",\"readDaemonState\",\"readDocument\",\"readJson\",\"readJsonLd\",\"readPdf\",\"readProduct\",\"readRange\",\"readSignals\",\"readSitemap\",\"readVenue\",\"realClock\",\"recordOverride\",\"registerRecipe\",\"reindex\",\"restAfter\",\"robotsFromResponse\",\"robotsFromStatus\",\"runRecipe\",\"runWatch\",\"scheduleWatches\",\"signalsFor\",\"startDaemon\",\"toHoursWeek\",\"transformersEmbedder\",\"typesOf\",\"unitVector\",\"unreachableRobots\",\"validatorsToSend\",\"venueReadingsOf\",\"verifyQuote\",\"verifySignature\",\"versionAtTime\",\"visibleText\"] },\n \"polite-crawler-mcp\": { version: \"0.5.0\", names: [\"INSTRUCTIONS\",\"MCP_HTTP_DEFAULTS\",\"McpTaskStore\",\"SERVER_NAME\",\"VERSION\",\"checkToken\",\"crawlContent\",\"crawlHostOptions\",\"crawlTools\",\"createMcpServer\",\"makeToken\",\"mcpHttpHost\",\"sameToken\",\"serveMcpHttp\",\"startMcpHttpServer\",\"startMcpServer\"] },\n};\n","// The map of homes: for each area of code, the one package where that code lives.\nimport { readFileSync } from \"node:fs\";\n\n/** The state of a home: on npm, in a repository but not on npm, only on a roadmap, or with no package. */\nexport type HomeState = \"published\" | \"unpublished\" | \"planned\" | \"none\";\n\n/** One area of code and its home. */\nexport interface Home {\n /** The id of the area, in kebab case. */\n readonly area: string;\n /** The area in a few plain words. */\n readonly title: string;\n /** The code that belongs in the home. */\n readonly covers: string;\n /** The packages of the home. A planned home has no package yet. */\n readonly packages: readonly string[];\n /** The repository of the home, as owner/name. */\n readonly repo: string;\n /**\n * The other repositories that hold code of the home while it moves, as owner/name: the source or the target of the move.\n * The rule home-package does not break in them. Remove an entry when the move ends.\n */\n readonly alsoIn?: readonly string[];\n /** The state of the home. */\n readonly state: HomeState;\n /** More words that find the area in a search. */\n readonly words: readonly string[];\n /**\n * The names of the functions that only the home has: each is a regular expression of a whole name, for example `median(Of)?`.\n * The rule home-package of conventions breaks on a new function with such a name in another repository. Names that many\n * areas use (for example `parse` or `record`) are not signatures: they give false breaks.\n */\n readonly signatures?: readonly string[];\n /** A note: the code that goes to another home, or a known split. */\n readonly note?: string;\n}\n\n/** The rule of the map. Each session and each review applies it. */\nexport const MAP_RULE =\n \"Before you write a helper, find its home in this map. If the home does not have the function, add it to the home, in a pull request of the home repository. Do not make a local copy, a new package or a new repository for an area that has a home: that needs the strategist. A home that is not on npm is used with workspace:* or a github: specifier pinned to a commit. If no area fits, ask the strategist for a home before you write the code.\";\n\n/** The public homes. Each package that other code can use has one area. */\nexport const HOMES: readonly Home[] = [\n {\n area: \"statistics\",\n title: \"Statistics\",\n covers: \"quantiles, medians, means, SD, bootstrap intervals, sign and permutation tests, Holm, Wilson, Brier, calibration, correlation, noise floors, fits of laws to values, likelihoods, mixtures\",\n packages: [\"@mark1russell7/rigor-statistics\"],\n repo: \"mark1russell7/rigor\",\n alsoIn: [\"mark1russell7/algebra\", \"mark1russell7/math\"],\n state: \"published\",\n words: [\"stats\", \"quantile\", \"median\", \"mean\", \"percentile\", \"bootstrap\", \"interval\", \"confidence\", \"p-value\", \"brier\", \"wilson\", \"holm\", \"spearman\", \"kendall\", \"noise\", \"stddev\", \"variance\", \"resample\", \"resampling\", \"bonferroni\", \"regression\", \"histogram\", \"pvalue\", \"significance\", \"welch\", \"ttest\", \"mann\", \"whitney\", \"pearson\", \"correlation\"],\n signatures: [\"quantiles?\", \"percentiles?\", \"median(Of)?\", \"std[Dd]ev\", \"standardDeviation\", \"variance\", \"bootstrap(?:Median|Mean|Interval|Ci|CI|Quantile|Percentile|Ratio|Diff|Difference|Samples?|Resamples?)?\", \"wilson[A-Za-z0-9]*\", \"holm[A-Za-z0-9]*\", \"brier[A-Za-z0-9]*\", \"spearman[A-Za-z0-9]*\", \"kendall[A-Za-z0-9]*\", \"signTest\", \"pairedPermutation\", \"permutationTest\", \"noiseFloor\", \"iqr\"],\n },\n {\n area: \"random\",\n title: \"Seeded random and generated inputs\",\n covers: \"seeded random numbers, seeds from names, hashes for seeds, draws, input families with dimensions and ranges\",\n packages: [\"@mark1russell7/rigor-generators\"],\n repo: \"mark1russell7/rigor\",\n alsoIn: [\"mark1russell7/algebra\", \"mark1russell7/math\"],\n state: \"published\",\n words: [\"seed\", \"prng\", \"mulberry32\", \"fnv\", \"hash\", \"shuffle\", \"sample\", \"fixture\", \"generator\", \"random\", \"rng\", \"seeded\", \"xorshift\", \"splitmix\", \"latin\", \"hypercube\", \"saltelli\", \"sobol\", \"halton\", \"sampler\"],\n signatures: [\"mulberry32\", \"splitmix[A-Za-z0-9]*\", \"xorshift[A-Za-z0-9]*\", \"sfc32\", \"xoshiro[A-Za-z0-9]*\", \"fnv1a[A-Za-z0-9]*\", \"deriveSeed\", \"seededRandom\", \"seededRng\", \"makeRng\", \"createRng\"],\n },\n {\n area: \"bench\",\n title: \"Benchmarks and speed gates\",\n covers: \"the bench harness: a fresh process per case, the order turned each round, A/A pairs, the CPU model, paired-time records, speed gates, determinism gates\",\n packages: [],\n repo: \"mark1russell7/rigor\",\n state: \"planned\",\n words: [\"benchmark\", \"harness\", \"timing\", \"perf\", \"gate\", \"paired-time\", \"a/a\", \"warm-up\", \"bench\", \"measure\", \"timer\", \"stopwatch\", \"profile\", \"elapsed\", \"hrtime\", \"determinism\", \"deterministic\", \"baseline\", \"ratchet\", \"threshold\"],\n note: \"Five repositories have their own harness today (vex, packing, highways, layout-stack, typeset). Do not grow a local harness: the shared one replaces them.\",\n },\n {\n area: \"test-generation\",\n title: \"Test helpers and test generation\",\n covers: \"property tests on fast-check, pairwise and covering arrays, metamorphic relations, chaos and load schedules, shared test fixtures, the capture of the OpenTelemetry SDK and the propagation gate for tests\",\n packages: [],\n repo: \"mark1russell7/rigor\",\n state: \"planned\",\n words: [\"test\", \"testing\", \"property\", \"fast-check\", \"arbitrary\", \"pairwise\", \"metamorphic\", \"chaos\", \"load\", \"fake\", \"fastcheck\", \"covering\", \"combinatorial\", \"fault\", \"injection\", \"soak\", \"stress\", \"throughput\", \"shrink\", \"capture\", \"in-memory\", \"exporter\", \"testkit\"],\n note: \"@mark1russell7/vex-testkit is only for Vex domains. A fake shell for tests is in @procedures/shell. The capture of the OpenTelemetry SDK for tests (captureTelemetry) and the propagation gate are in @mark1russell7/rigor-testkit, entries /otel and /propagation.\",\n },\n {\n area: \"exact-math\",\n title: \"Expressions and exact arithmetic\",\n covers: \"expression documents, exact rationals, floats with error bounds, intervals, robust geometric predicates (orientation, in-circle)\",\n packages: [\"@mark1russell7/expression\", \"@mark1russell7/rational\"],\n repo: \"mark1russell7/algebra\",\n state: \"unpublished\",\n words: [\"math\", \"arithmetic\", \"rational\", \"bigint\", \"interval\", \"error bound\", \"predicate\", \"orientation\", \"symbolic\", \"exact\"],\n signatures: [\"orient2d\", \"orientation\", \"inCircle\", \"incircle\"],\n note: \"Statistics go to rigor-statistics, and geometry records go to layout-contract. There is no math package.\",\n },\n {\n area: \"units\",\n title: \"Amounts with units\",\n covers: \"amounts in typed units, exact conversion factors between units\",\n packages: [\"@mark1russell7/quantity\"],\n repo: \"mark1russell7/systems\",\n state: \"published\",\n words: [\"unit\", \"quantity\", \"duration\", \"bytes\", \"conversion\"],\n },\n {\n area: \"state-machines\",\n title: \"State machines and timers\",\n covers: \"state machines as data, closed forms of their timers, clocks (a real clock and a test clock, @mark1russell7/algebra/clock), failure detection, recovery and trace replay\",\n packages: [\"@mark1russell7/algebra\"],\n repo: \"mark1russell7/systems\",\n state: \"published\",\n words: [\"state machine\", \"timer\", \"timeout\", \"heartbeat\", \"failover\", \"detection\", \"clock\", \"test clock\", \"fake clock\"],\n note: \"The npm name @mark1russell7/algebra is this package of systems, not the algebra repository.\",\n },\n {\n area: \"service\",\n title: \"Services and servers\",\n covers: \"a service declared as data, its lifecycle and checks, jittered loops, backoff and retries, and concurrency on the clock of algebra: channels, select, tickers, time-outs, worker pools, pipelines, fan-in and fan-out (service); the HTTP, WebSocket and MCP host of procedures (peer)\",\n packages: [\"@mark1russell7/service\", \"@procedures/peer\"],\n repo: \"mark1russell7/systems\",\n state: \"published\",\n words: [\"server\", \"http server\", \"lifecycle\", \"shutdown\", \"health\", \"loop\", \"backoff\", \"retry\", \"jitter\", \"websocket\", \"channel\", \"select\", \"ticker\", \"worker pool\", \"pipeline\", \"fan-in\", \"fan-out\", \"concurrency\"],\n signatures: [\"exponentialBackoff\", \"backoffDelay\", \"withRetry\", \"retryWithBackoff\", \"withJitter\"],\n note: \"A server package is made with the template preset service. @procedures/peer is in mark1russell7/client.\",\n },\n {\n area: \"procedures\",\n title: \"Typed calls and MCP tools\",\n covers: \"procedures as data: one typed call model in process, over HTTP, WebSocket, CLI and MCP, with streaming and middleware\",\n packages: [\"@procedures/client\", \"@procedures/mcp-server\", \"@procedures/compiler\"],\n repo: \"mark1russell7/client\",\n state: \"published\",\n words: [\"rpc\", \"procedure\", \"mcp\", \"tool\", \"middleware\", \"api client\"],\n },\n {\n area: \"files\",\n title: \"Paths and files on Node.js\",\n covers: \"paths, home folder expansion, a path inside a folder, finding a file up the folders, glob matching, file walks with excludes: plain functions on node: modules only, for each general package. @procedures/fs builds on them\",\n packages: [],\n repo: \"mark1russell7/files\",\n state: \"planned\",\n words: [\"path\", \"home folder\", \"expand home\", \"find up\", \"glob\", \"walk\", \"inside folder\", \"posix path\"],\n signatures: [\"expandHome\", \"findUp\", \"isInside\", \"globToRegExp\", \"matchesGlob\"],\n },\n {\n area: \"system-io\",\n title: \"Files, commands, git, GitHub and npm\",\n covers: \"atomic file and JSON writes, globs, safe commands with argv and no shell, git, the GitHub CLI and API, npm registry lookups, HTTP requests, JSON, YAML and CSV, environment variables\",\n packages: [\"@procedures/fs\", \"@procedures/shell\", \"@procedures/git\", \"@procedures/gh\", \"@procedures/npm\", \"@procedures/http\", \"@procedures/json\", \"@procedures/env\"],\n repo: \"mark1russell7/client\",\n state: \"published\",\n words: [\"file\", \"atomic\", \"write\", \"spawn\", \"exec\", \"shell\", \"command\", \"github\", \"registry\", \"fetch\", \"yaml\", \"csv\", \"env\"],\n signatures: [\"atomicWrite[A-Za-z0-9]*\", \"writeFileAtomic\", \"writeJsonAtomic\", \"writeAtomic\"],\n note: \"The plain path, glob and walk functions go to the area files (mark1russell7/files). These packages wrap them as procedures.\",\n },\n {\n area: \"headless-browser\",\n title: \"Headless browser runs\",\n covers: \"finding the browser of the system, a headless run with argv, a temporary profile, a time limit and a signal, and its output: PDF files, screenshots in PNG or JPEG, page text\",\n packages: [],\n repo: \"mark1russell7/client\",\n state: \"planned\",\n words: [\"browser\", \"chromium\", \"chrome\", \"headless\", \"screenshot\", \"pdf\", \"print\", \"png\", \"jpeg\", \"puppeteer\", \"playwright\"],\n signatures: [\"findBrowser\", \"renderScreenshot\"],\n note: \"The home is @procedures/browser (planned). Today findBrowser and renderPdf are in @procedures/pdf, which re-exports them from the new home when it ships.\",\n },\n {\n area: \"cli\",\n title: \"Command-line arguments\",\n covers: \"argument parsing and the help text of command-line tools, from a schema\",\n packages: [],\n repo: \"mark1russell7/client\",\n state: \"planned\",\n words: [\"argv\", \"arguments\", \"flags\", \"options\", \"parser\", \"help text\", \"command line\"],\n signatures: [\"parseArgs\", \"parseArgv\"],\n note: \"Nine hand-written parsers exist (10-25). Until the library is ready, use @procedures/cli-run or keep the parser small.\",\n },\n {\n area: \"data-structures\",\n title: \"Collections and graphs of dependencies\",\n covers: \"lists, deques, maps, trees and heaps; DAGs, cycles, topological order; the typed event emitter that evented collections use. @procedures/collections and @procedures/dag are the same code as procedures: new code goes to @mark1russell7/collections\",\n packages: [\"@mark1russell7/collections\", \"@procedures/collections\", \"@procedures/dag\"],\n repo: \"mark1russell7/collections\",\n state: \"published\",\n words: [\"list\", \"queue\", \"deque\", \"heap\", \"tree map\", \"graph\", \"dag\", \"topological\", \"cycle\", \"event emitter\", \"emitter\", \"listener\", \"subscribe\", \"unsubscribe\"],\n signatures: [\"topoSort\", \"topologicalSort\", \"toposort\", \"topoOrder\", \"detectCycles?\", \"findCycles?\"],\n },\n {\n area: \"optional\",\n title: \"Optional values\",\n covers: \"a value that is present or absent, and Result, a value or an error (1.2.0), with the functor and monad laws\",\n packages: [\"@mark1russell7/optional\"],\n repo: \"mark1russell7/optional\",\n state: \"published\",\n words: [\"option\", \"maybe\", \"some\", \"none\", \"monad\", \"functor\", \"result\", \"either\", \"error\"],\n note: \"@mark1russell7/render-optional is a second copy. It moves to @mark1russell7/optional.\",\n },\n {\n area: \"geometry\",\n title: \"Geometry and layout records\",\n covers: \"points, boxes, segments, tolerances, the input and record formats of the layout engines, converters\",\n packages: [\"@mark1russell7/layout-contract\"],\n repo: \"mark1russell7/layout-contract\",\n state: \"published\",\n words: [\"point\", \"rect\", \"box\", \"segment\", \"polygon\", \"tolerance\", \"overlap\", \"intersection\", \"bounds\"],\n signatures: [\"segmentsIntersect\", \"segmentsCross\", \"segmentIntersection\", \"segmentsIntersection\", \"boxesOverlap\", \"rectsOverlap\", \"rectsIntersect\", \"pointInPolygon\", \"distanceToSegment\", \"pointSegmentDistance\"],\n note: \"Exact predicates go to algebra. @mark1russell7/vex-domains has 2D vectors for Vex formulas only.\",\n },\n {\n area: \"strategy-space\",\n title: \"Strategy spaces and grammars\",\n covers: \"a strategy space as data (stages, options, typed params, constraints), config checks and config ids, counts, grids and seeded samples of a space, the operator format strategy-operators/1, combinators as terms (portfolio, sequence, fallback, product), the distinctness gate\",\n note: \"The strategy catalog stays in layout-contract. Engines, records and probes stay in the contract and the engines.\",\n packages: [\"@mark1russell7/strategy-space\"],\n repo: \"mark1russell7/strategy-space\",\n state: \"published\",\n words: [\"strategy grammar\", \"strategy combinator\", \"operator format\", \"config id\", \"space enumeration\", \"distinctness gate\", \"racing\", \"seeded config sample\"],\n },\n {\n area: \"packing\",\n title: \"Rectangle packing\",\n covers: \"shelf, guillotine, skyline and max-rects strategies, push cascades, measures of a placement\",\n packages: [\"@mark1russell7/packing\"],\n repo: \"mark1russell7/packing\",\n state: \"published\",\n words: [\"pack\", \"bin packing\", \"placement\", \"rectangles\", \"fill\"],\n },\n {\n area: \"edge-routing\",\n title: \"Edge routing\",\n covers: \"edge routers for node-link diagrams: trunks, bundles, plugs and zoom levels\",\n packages: [\"@mark1russell7/highways\"],\n repo: \"mark1russell7/highways\",\n state: \"published\",\n words: [\"edge\", \"route\", \"bundle\", \"path\", \"orthogonal\", \"spline\"],\n },\n {\n area: \"graph-layout\",\n title: \"Graph and tree layout\",\n covers: \"a layout for each container of a graph or tree, with boxes and routed edges for any renderer\",\n packages: [\"ireko\"],\n repo: \"mark1russell7/ireko\",\n state: \"published\",\n words: [\"layout\", \"tree layout\", \"radial\", \"force\", \"hierarchy\", \"container\"],\n },\n {\n area: \"text\",\n title: \"Text measurement and line breaking\",\n covers: \"Unicode segmentation, text widths from font tables, line breaking, incremental relayout after edits\",\n packages: [],\n repo: \"mark1russell7/typeset\",\n state: \"planned\",\n words: [\"string\", \"unicode\", \"grapheme\", \"font\", \"width\", \"measure text\", \"line break\", \"wrap\", \"hyphen\"],\n signatures: [\"graphemes\", \"segmentGraphemes\", \"wrapText\", \"breakLines\", \"measureText\", \"textWidth\", \"stringWidth\"],\n note: \"Plain string helpers (escaping, case, padding, templates, English word forms) go to the area plain-text (mark1russell7/text).\",\n },\n {\n area: \"plain-text\",\n title: \"Plain text helpers\",\n covers: \"escaping for HTML, attributes, regular expressions and Markdown, case conversion, padding and truncation, templates, English word forms (plurals, lists). Escaping comes first\",\n packages: [],\n repo: \"mark1russell7/text\",\n state: \"planned\",\n words: [\"escape\", \"html escape\", \"case\", \"camel case\", \"kebab case\", \"pad\", \"truncate\", \"template\", \"plural\", \"slug\"],\n signatures: [\"escapeHtml\", \"escapeAttribute\", \"escapeRegExp\", \"escapeMarkdown\", \"kebabCase\", \"camelCase\", \"pascalCase\", \"snakeCase\", \"pluralize\"],\n },\n {\n area: \"language-kernel\",\n title: \"Declarative languages\",\n covers: \"documents in envelopes, evaluators found by a ladder, parsers, incremental schedulers\",\n packages: [\"@mark1russell7/coeval\"],\n repo: \"mark1russell7/coeval\",\n state: \"published\",\n words: [\"parser\", \"evaluator\", \"dsl\", \"language\", \"ast\", \"scheduler\", \"incremental\"],\n },\n {\n area: \"formulas\",\n title: \"Formulas over records\",\n covers: \"typed spreadsheet formulas evaluated at each record, tree node or grid cell; domains for vectors, colors, angles and numbers\",\n packages: [\"@mark1russell7/vex\", \"@mark1russell7/vex-domains\", \"@mark1russell7/vex-compiler\"],\n repo: \"mark1russell7/vex\",\n state: \"published\",\n words: [\"formula\", \"spreadsheet\", \"roll-up\", \"aggregate\", \"per record\", \"grid\"],\n },\n {\n area: \"reactive-ui\",\n title: \"Reactive expressions and rendering by type\",\n covers: \"the reactive node store and expressions of render, its viewer; splay renders any data with a viewer for each type\",\n packages: [\"@mark1russell7/render-dsl\", \"@mark1russell7/render-node\", \"@mark1russell7/splay\"],\n repo: \"mark1russell7/render\",\n state: \"published\",\n words: [\"reactive\", \"signal\", \"subscription\", \"viewer\", \"render\", \"react\"],\n note: \"@mark1russell7/splay is in mark1russell7/splay.\",\n },\n {\n area: \"browser-monitoring\",\n title: \"Observability and context\",\n covers: \"OpenTelemetry for browsers and Node services, and the one context of logs, metrics and traces: trace and baggage in process and across calls (otel-ts, its /context and /node entries); main-thread lag, long tasks, Web Vitals, the page lifecycle, async context in browsers\",\n packages: [\"@mark1russell7/otel-ts\", \"async-browser-context\", \"@mark1russell7/lag\", \"@mark1russell7/lag-hud\", \"page-lifecycle-tracker\"],\n repo: \"mark1russell7/otel-ts\",\n state: \"published\",\n words: [\"telemetry\", \"web vitals\", \"inp\", \"long task\", \"visibility\", \"opentelemetry\", \"async context\", \"observability\", \"baggage\", \"traceparent\", \"tracing\", \"span\", \"asynclocalstorage\", \"context manager\"],\n },\n {\n area: \"repo-structure\",\n title: \"Repository structure, CI and conventions\",\n covers: \"new repositories and packages, the CUE presets, shared CI workflows, the API report, import boundaries, the conventions check, the release and status pages\",\n packages: [\"@mark1russell7/conventions\", \"@mark1russell7/template-cli\", \"@mark1russell7/cue\", \"@mark1russell7/api-report\", \"@mark1russell7/boundaries\", \"@mark1russell7/site-pages\"],\n repo: \"mark1russell7/template\",\n state: \"published\",\n words: [\"template\", \"ci\", \"workflow\", \"tsconfig\", \"package.json\", \"lint\", \"site\", \"pages\"],\n },\n {\n area: \"prose\",\n title: \"Prose rules\",\n covers: \"the ASD-STE100 writing rules for Markdown and doc comments\",\n packages: [\"@mark1russell7/ste-lint\"],\n repo: \"mark1russell7/ste-lint\",\n state: \"published\",\n words: [\"docs\", \"readme\", \"writing\", \"ste\"],\n },\n {\n area: \"machine-resources\",\n title: \"Memory and jobs on one computer\",\n covers: \"leases of memory and processors for jobs, queues of heavy jobs, alerts\",\n packages: [],\n repo: \"mark1russell7/headroom\",\n state: \"unpublished\",\n words: [\"memory\", \"lease\", \"job\", \"queue\", \"load\"],\n },\n {\n area: \"releases\",\n title: \"Release order of the packages\",\n covers: \"the npm release and update plan in dependency order, provenance checks\",\n packages: [],\n repo: \"mark1russell7/release-train\",\n state: \"unpublished\",\n words: [\"release\", \"version\", \"semver\", \"provenance\", \"update\"],\n },\n {\n area: \"duplication\",\n title: \"The duplication atlas\",\n covers: \"function shapes, clone classes, shared names and packages by purpose over all public repositories\",\n packages: [],\n repo: \"mark1russell7/codeatlas\",\n state: \"unpublished\",\n words: [\"duplicate\", \"clone\", \"copy\"],\n },\n {\n area: \"web-crawling\",\n title: \"Web crawling\",\n covers: \"polite fetches with robots.txt and one request per site, a store of fetched pages\",\n packages: [\"polite-crawler\", \"polite-crawler-mcp\"],\n repo: \"mark1russell7/crawler\",\n state: \"published\",\n words: [\"crawl\", \"scrape\", \"robots\", \"fetch page\"],\n },\n];\n\n/** A file of more homes, for example the private repositories, in the shape `{ \"homes\": Home[] }`. */\nexport function readOverlay(file: string): readonly Home[] {\n const data = JSON.parse(readFileSync(file, \"utf8\")) as { homes?: unknown };\n if (!Array.isArray(data.homes)) throw new Error(`${file}: the field \"homes\" must be an array`);\n for (const home of data.homes as Home[]) {\n if (typeof home.area !== \"string\" || typeof home.title !== \"string\" || typeof home.repo !== \"string\") throw new Error(`${file}: each home needs area, title and repo`);\n if (home.alsoIn !== undefined && !(Array.isArray(home.alsoIn) && home.alsoIn.every((repo) => typeof repo === \"string\"))) throw new Error(`${file}: alsoIn of ${home.area} must be an array of owner/name strings`);\n }\n return data.homes as Home[];\n}\n\n/** This function merges the homes. A home of `extra` with the area of a home of `base` takes its place. */\nexport function mergeHomes(base: readonly Home[], extra: readonly Home[]): readonly Home[] {\n const areas = new Set(extra.map((home) => home.area));\n return [...base.filter((home) => !areas.has(home.area)), ...extra];\n}\n\n/** This function gives the homes that match each word of `query`, best match first. */\nexport function findHomes(query: string, homes: readonly Home[] = HOMES): readonly Home[] {\n const terms = query.toLowerCase().split(/\\s+/).filter((term) => term.length > 0);\n if (terms.length === 0) return homes;\n const score = (home: Home): number => {\n const strong = [home.area, home.title, ...home.packages, ...home.words].join(\" \").toLowerCase();\n const weak = `${home.covers} ${home.note ?? \"\"}`.toLowerCase();\n return terms.reduce((sum, term) => sum + (strong.includes(term) ? 2 : weak.includes(term) ? 1 : 0), 0);\n };\n return homes\n .map((home, index) => ({ home, index, score: score(home) }))\n .filter((row) => row.score > 0)\n .sort((a, b) => b.score - a.score || a.index - b.index)\n .map((row) => row.home);\n}\n\nconst STATE_TEXT: Record<HomeState, string> = { published: \"\", unpublished: \" (not on npm)\", planned: \" (planned)\", none: \" (no home)\" };\n\n/** This function writes the map as a Markdown table, with the rule first. */\nexport function mapMarkdown(homes: readonly Home[] = HOMES): string {\n const cell = (text: string): string => text.replaceAll(\"|\", \"\\\\|\");\n const rows = homes.map((home) => {\n const where = home.packages.length > 0 ? home.packages.map((name) => `\\`${name}\\``).join(\", \") : `\\`${home.repo}\\``;\n const covers = home.note === undefined ? home.covers : `${home.covers}. ${home.note}`;\n return `| ${cell(home.title)} | ${where}${STATE_TEXT[home.state]} | ${cell(covers)} |`;\n });\n return [MAP_RULE, \"\", \"| Area | Home | Covers |\", \"| --- | --- | --- |\", ...rows, \"\"].join(\"\\n\");\n}\n\n/** This function writes the homes as plain text for a terminal. */\nexport function mapText(homes: readonly Home[]): string {\n if (homes.length === 0) return \"No area matches. Ask the strategist for a home before you write the code.\\n\";\n return homes\n .map((home) => {\n const where = home.packages.length > 0 ? home.packages.join(\", \") : home.repo;\n const lines = [`${home.title} (${home.area}): ${where}${STATE_TEXT[home.state]}`, ` covers: ${home.covers}`, ` repo: ${home.repo}`];\n if (home.alsoIn !== undefined && home.alsoIn.length > 0) lines.push(` also in, while it moves: ${home.alsoIn.join(\", \")}`);\n if (home.note !== undefined) lines.push(` note: ${home.note}`);\n return lines.join(\"\\n\");\n })\n .join(\"\\n\\n\")\n .concat(\"\\n\");\n}\n","/**\n * The rule `home-package`: a change does not add a function that belongs in the home of another area (the map of homes).\n */\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { addedLines } from \"../change.ts\";\nimport { HOME_EXPORTS } from \"../home-exports.ts\";\nimport { HOMES, type Home } from \"../map.ts\";\nimport type { Break, Rule, RuleContext } from \"../rule.ts\";\nimport { byCode } from \"../workspace.ts\";\n\n/** The files of code that the rule reads. A declaration file has no functions of its own. */\nconst CODE_FILE = /\\.(?:[cm]?[jt]s|[jt]sx)$/;\nconst SKIPPED = /(?:^|\\/)(?:node_modules|build|dist|vendor)\\/|\\.d\\.[cm]?ts$/;\n\n/** A declaration of a function: `function name`, or `const name = (` / `= function` / `= <T>(`, with `export` and `async`. */\nconst DECLARATION = /^\\s*(?:export\\s+)?(?:default\\s+)?(?:async\\s+)?function\\s*(?:\\*\\s*)?([A-Za-z_$][\\w$]*)|^\\s*(?:export\\s+)?(?:const|let)\\s+([A-Za-z_$][\\w$]*)\\s*(?::[^=]+)?=\\s*(?:async\\s*)?(?:\\(|function\\b|<[A-Za-z])/;\n\n/** One signature of a home, as a regular expression of a whole name. */\ninterface Signature {\n readonly home: Home;\n readonly pattern: RegExp;\n}\n\n/** This function gives the repositories, in lower case, that hold code of a home: its repository and each of `alsoIn`. */\nexport function reposOf(home: Home): readonly string[] {\n return [home.repo, ...(home.alsoIn ?? [])].map((repo) => repo.toLowerCase());\n}\n\n/** This function gives the signatures of the homes that a repository can use: on npm, or in a repository with a pin. */\nexport function signaturesOf(homes: readonly Home[]): Signature[] {\n return homes.filter((home) => home.state === \"published\" || home.state === \"unpublished\").flatMap((home) => (home.signatures ?? []).map((source) => ({ home, pattern: new RegExp(`^(?:${source})$`) })));\n}\n\n/** This function gives the name of the function that a line declares, or undefined. */\nexport function declaredName(line: string): string | undefined {\n const match = DECLARATION.exec(line);\n return match?.[1] ?? match?.[2];\n}\n\n/** This function gives the repository of the root as owner/name, in lower case: the remote origin, or GITHUB_REPOSITORY. */\nexport function repoOf(context: RuleContext): string | undefined {\n const url = context.git([\"remote\", \"get-url\", \"origin\"])?.trim();\n const match = url === undefined ? null : /github\\.com[:/]([^/]+\\/[^/]+?)(?:\\.git)?\\/?$/.exec(url);\n if (match?.[1] !== undefined) return match[1].toLowerCase();\n const env = context.env[\"GITHUB_REPOSITORY\"];\n return env === undefined || env === \"\" ? undefined : env.toLowerCase();\n}\n\n/** This function gives the message of a break: the home, and if the home already exports the name. */\nexport function messageOf(file: string, name: string, home: Home): string {\n const exporter = home.packages.find((pkg) => HOME_EXPORTS[pkg]?.names.includes(name) === true);\n const where = home.packages.length === 0 ? home.repo : home.packages.map((pkg) => `\\`${pkg}\\``).join(\", \");\n const use = home.state === \"unpublished\" ? ` (not on npm: use a github: specifier pinned to a commit of ${home.repo})` : \"\";\n return exporter === undefined\n ? `${file} adds \\`${name}\\`, a function of the area ${home.title} (${home.area}). Its home is ${where}${use}, which does not export \\`${name}\\` yet: add it to the home in a pull request of ${home.repo}, then import it.`\n : `${file} adds \\`${name}\\`, a function of the area ${home.title} (${home.area}). Import \\`${name}\\` from \\`${exporter}\\`${use} in place of a local copy.`;\n}\n\nexport const homePackage: Rule = {\n id: \"home-package\",\n title: \"A change does not add a function that belongs in the home of another area: a name that a home of the map of homes gives as its signature.\",\n reason:\n \"Each area of code has one home package (conventions map). A local copy of a helper of another area drifts from the home and splits the fixes: on 2026-11-02 the repositories had 68 local statistics functions (median, quantile, bootstrap and more) in 14 repositories, while @mark1russell7/rigor-statistics was on npm. The check examines only the lines that a change adds, so the copies that exist do not break, and the count can only go down.\",\n fix: \"Import the function from its home. If the home does not have it, add it to the home in a pull request of the home repository, then import it. A function that only has the name of a signature and does another thing gets a new name.\",\n sources: [{ repo: \"private\", rule: \"direction-18\", doc: \"docs/STRATEGY.md (2026-11-02, one map of homes, checked when the code is written)\" }],\n options: {\n scope: {\n type: \"string\",\n default: \"change\",\n description: \"`change`: only the lines that the change adds (a pull request, or `--base`). `all`: each line of each tracked file, for a sweep of the copies that exist.\",\n },\n },\n check(context, options) {\n const scope = options[\"scope\"];\n if (scope !== \"change\" && scope !== \"all\") throw new Error(`The option scope is \"change\" or \"all\", not ${JSON.stringify(scope)}.`);\n const repo = repoOf(context);\n const signatures = signaturesOf(HOMES).filter((signature) => !reposOf(signature.home).includes(repo ?? \"\"));\n if (signatures.length === 0) return [];\n let files: readonly string[];\n let added: ReadonlyMap<string, ReadonlySet<number>> | undefined;\n if (scope === \"change\") {\n added = addedLines(context);\n if (added === undefined) return { skipped: \"no change: the rule examines the lines that a pull request or --base adds (option scope: all examines each line)\" };\n files = [...added.keys()];\n } else {\n const tracked = context.gitFiles();\n if (tracked === undefined) return { skipped: \"the root is not in a git repository\" };\n files = tracked;\n }\n const breaks: Break[] = [];\n for (const file of files.filter((path) => CODE_FILE.test(path) && !SKIPPED.test(path)).sort(byCode)) {\n let text: string;\n try {\n text = readFileSync(join(context.root, file), \"utf8\");\n } catch {\n continue;\n }\n const lines = added?.get(file);\n text.split(/\\r?\\n/).forEach((line, index) => {\n if (lines !== undefined && !lines.has(index + 1)) return;\n const name = declaredName(line);\n if (name === undefined) return;\n const signature = signatures.find((item) => item.pattern.test(name));\n if (signature !== undefined) breaks.push({ file, line: index + 1, message: messageOf(file, name, signature.home) });\n });\n }\n return breaks;\n },\n};\n","/**\n * The rule `license-file`. Each public package has a license field and, in its own folder, a license file with the\n * same license. A repository with a public package has a license file at its root.\n */\nimport { existsSync, readdirSync, readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { inFolder, lineOf, rootAndCodePackages, type Break, type PackageInfo, type Rule, type RuleContext } from \"../rule.ts\";\n\n/** The names of a license file, without case. */\nconst LICENSE_NAME = /^licen[cs]e(?:\\.(?:md|txt))?$/i;\n\n/** For each license that the rule knows, a pattern of its text. The text of another license is not checked. */\nexport const LICENSE_TEXTS: Readonly<Record<string, RegExp>> = {\n MIT: /\\bMIT License\\b|Permission is hereby granted, free of charge/,\n ISC: /\\bISC License\\b|Permission to use, copy, modify, and\\/or distribute/,\n \"Apache-2.0\": /Apache License,?\\s+Version 2\\.0/,\n \"BSD-3-Clause\": /Redistribution and use in source and binary forms[\\s\\S]*Neither the name/,\n};\n\n/** This function gives the name of the license file in a folder, or undefined. */\nexport function licenseFileOf(dir: string): string | undefined {\n if (!existsSync(dir)) return undefined;\n return readdirSync(dir, { withFileTypes: true }).find((entry) => entry.isFile() && LICENSE_NAME.test(entry.name))?.name;\n}\n\n/** This function gives the name of the author of a manifest: the string before `<` or `(`, or the field `name`. */\nexport function authorOf(author: unknown): string | undefined {\n // A search for one character, not a pattern with a repetition: the time is linear in the length of the field\n const before = (text: string): string => {\n const at = text.search(/[<(]/);\n return at === -1 ? text : text.slice(0, at);\n };\n const name = typeof author === \"string\" ? before(author) : typeof author === \"object\" && author !== null && typeof (author as { name?: unknown }).name === \"string\" ? (author as { name: string }).name : undefined;\n return name === undefined || name.trim() === \"\" ? undefined : name.trim();\n}\n\n/** This function gives the text of the MIT license. */\nexport function mitText(year: number, holder: string): string {\n return `MIT License\n\nCopyright (c) ${year} ${holder}\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n`;\n}\n\nexport const isPublic = (pkg: PackageInfo): boolean => pkg.manifest[\"private\"] !== true;\n\n/**\n * This function tells if the repository is public, from the event file of a GitHub Actions run. Outside a run, or with no\n * field `repository.private` in the event, it gives undefined.\n */\nexport function repositoryIsPublic(context: RuleContext): boolean | undefined {\n const file = context.env[\"GITHUB_EVENT_PATH\"];\n if (file === undefined || file === \"\" || !existsSync(file)) return undefined;\n try {\n const event = JSON.parse(readFileSync(file, \"utf8\")) as { repository?: { private?: unknown } };\n return typeof event.repository?.private === \"boolean\" ? !event.repository.private : undefined;\n } catch {\n return undefined;\n }\n}\n\nexport const licenseFile: Rule = {\n id: \"license-file\",\n title: \"Each public package has a license field and, in its own folder, a license file with the same license. A public repository, or a repository with a public package, has a license file at its root.\",\n reason:\n \"npm packs the license file of the folder of the package only, and GitHub reads the license file of the root only. On 2026-11-02 five public repositories (packing, rigor, layout-contract, typeset, template) had no license file at the root, so GitHub showed them as without a license while their packages on npm said MIT.\",\n fix: \"Add a license field to package.json (the option `license`, MIT by default, is the license of the root of a public repository with no public package). `conventions fix` writes each missing license file: a copy of a license file of the repository with the same license, or else the MIT text with the author of the manifest. Correct a license file whose text is not the license of the field.\",\n sources: [\"vex\", \"coeval\", \"client\", \"highways\"].map((repo) => ({ repo, rule: \"license-file\", doc: \"LICENSE (MIT, at the root, with license MIT in each package.json)\" })),\n options: {\n license: { type: \"string\", default: \"MIT\", description: \"The license of the root of a public repository with no public package.\" },\n },\n check(context, options) {\n const unique = rootAndCodePackages(context);\n const published = unique.filter(isPublic);\n // A public repository needs a license file at its root, also with no public package (typeset, 11-02)\n const publicRepo = repositoryIsPublic(context) === true;\n if (published.length === 0 && !publicRepo) return [];\n const breaks: Break[] = [];\n // The license files that exist, by license, as the source of a copy\n const texts = new Map<string, string>();\n const licenseOf = (pkg: PackageInfo): string | undefined => (typeof pkg.manifest[\"license\"] === \"string\" ? (pkg.manifest[\"license\"] as string) : undefined);\n for (const pkg of unique) {\n const name = licenseFileOf(pkg.dir);\n if (name === undefined) continue;\n const text = readFileSync(join(pkg.dir, name), \"utf8\");\n // The license of a file is the license whose text it has, or else the license field of its package\n const license = Object.keys(LICENSE_TEXTS).find((id) => LICENSE_TEXTS[id]?.test(text) === true) ?? licenseOf(pkg);\n if (license !== undefined && !texts.has(license)) texts.set(license, text);\n }\n const missing = (folder: string, license: string, author: unknown, why: string): void => {\n const file = inFolder(folder, \"LICENSE\");\n const holder = authorOf(author) ?? authorOf(context.rootPackage.manifest[\"author\"]);\n const text = texts.get(license) ?? (license === \"MIT\" && holder !== undefined ? mitText(new Date().getFullYear(), holder) : undefined);\n breaks.push({ file, message: `${folder === \"\" ? \"The root\" : folder} has no license file: ${why}`, ...(text === undefined ? {} : { edits: [{ file, before: \"\", after: text }] }) });\n };\n for (const pkg of published) {\n const license = licenseOf(pkg);\n const name = String(pkg.manifest[\"name\"] ?? pkg.folder);\n if (license === undefined) {\n breaks.push({ file: pkg.file, message: `The public package ${name} has no license field.` });\n continue;\n }\n const found = licenseFileOf(pkg.dir);\n if (found === undefined) {\n missing(pkg.folder, license, pkg.manifest[\"author\"], `npm packs only the license file of the folder of ${name} (${license}).`);\n continue;\n }\n const text = readFileSync(join(pkg.dir, found), \"utf8\");\n if (LICENSE_TEXTS[license]?.test(text) === false) {\n const line = lineOf(pkg.text, '\"license\"');\n breaks.push({ file: inFolder(pkg.folder, found), message: `${inFolder(pkg.folder, found)} is not the text of ${license}, the license field of ${name}${line === undefined ? \"\" : ` (${pkg.file}:${line})`}.` });\n }\n }\n if (!published.includes(context.rootPackage) && licenseFileOf(context.root) === undefined) {\n const license = published.map(licenseOf).find((item) => item !== undefined) ?? (publicRepo ? String(options[\"license\"]) : undefined);\n if (license !== undefined) missing(\"\", license, published[0]?.manifest[\"author\"], \"GitHub reads only the license file of the root.\");\n }\n return breaks;\n },\n};\n","/**\n * The rule `main-check`: a script does not find out that it is the main module by a compare of `process.argv[1]` with\n * its own path. Through a link (a junction, a symbolic link, `~/git` to `D:/git`), the two paths differ. Then the\n * script does nothing, and it ends with exit code 0.\n */\nimport { readFileSync, statSync } from \"node:fs\";\nimport { extname, join } from \"node:path\";\nimport { codePackages, type Break, type Rule } from \"../rule.ts\";\n\n/** The extensions of the files that the rule reads. */\nconst SCRIPT = new Set([\".ts\", \".mts\", \".cts\", \".js\", \".mjs\"]);\n\n/** The largest file that the rule reads, in bytes. */\nconst MAX_BYTES = 1024 * 1024;\n\n/** The compare of two real paths. It is true through a link too, and it works on each Node version. */\nexport const REAL_COMPARE = \"process.argv[1] !== undefined && realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url))\";\n\n/** The imports that the compare of two real paths uses. */\nconst REAL_IMPORTS: readonly (readonly [string, string])[] = [\n [\"realpathSync\", \"node:fs\"],\n [\"fileURLToPath\", \"node:url\"],\n];\n\n/** The names of the imports that only a path compare uses. The fix removes the ones that become unused. */\nconst PATH_NAMES = [\"fileURLToPath\", \"pathToFileURL\", \"resolve\", \"realpathSync\"] as const;\n\n/** This function tells if a text compares `process.argv[1]` with the path of the module, without a real path of each side. */\nexport function isPathCompare(text: string): boolean {\n if (!text.includes(\"process.argv[1]\") || !/import\\.meta\\.(url|filename|dirname)\\b/.test(text)) return false;\n // A text with no compare only uses the two values, for example a record of them in a test\n if (!/[!=]=|\\.(?:endsWith|startsWith|includes)\\(/.test(text)) return false;\n // Two real paths are equal through a link too\n return (text.match(/realpathSync\\s*\\(/g) ?? []).length < 2;\n}\n\n/** The lowest version of a range of `engines.node` (for example `>=22.19` or `^24.2.0`). It is undefined when the range has no single lower bound. */\nexport function lowestNode(range: unknown): readonly [number, number] | undefined {\n if (typeof range !== \"string\" || range.includes(\"||\")) return undefined;\n // One \\s* only: two of them around the optional operator are slow on a long run of spaces\n const found = /^(?:>=|\\^|~)?\\s*v?(\\d+)(?:\\.(\\d+))?/.exec(range.trim());\n return found ? [Number(found[1]), Number(found[2] ?? 0)] : undefined;\n}\n\n/** This function tells if each Node version of the range has `import.meta.main`: 22.18 and later in 22, and 24.2 and later. Node 23 does not have it. */\nexport function hasImportMetaMain(range: unknown): boolean {\n const lowest = lowestNode(range);\n if (lowest === undefined) return false;\n const [major, minor] = lowest;\n // `^22.18` stays in 22. `>=22.18` lets Node 23 in, which does not have import.meta.main\n if (major === 22) return minor >= 18 && typeof range === \"string\" && /^[\\^~]/.test(range.trim());\n return major > 24 || (major === 24 && minor >= 2);\n}\n\n/** This function gives the line with `condition` in place of the condition of its `if (...)`. It gives undefined when no `if` has only the main check. */\nexport function fixLine(line: string, condition: string): string | undefined {\n const start = line.indexOf(\"if (\");\n if (start < 0) return undefined;\n let depth = 0;\n let end = -1;\n for (let index = start + 3; index < line.length; index++) {\n if (line[index] === \"(\") depth++;\n if (line[index] === \")\" && --depth === 0) {\n end = index;\n break;\n }\n }\n if (end < 0) return undefined;\n const old = line.slice(start + 4, end);\n // Each part of the condition is about argv[1], else the condition has more than the main check\n if (!old.split(\"&&\").every((part) => part.includes(\"process.argv[1]\")) || !isPathCompare(old)) return undefined;\n return `${line.slice(0, start)}if (${condition})${line.slice(end + 1)}`;\n}\n\n/** The import line of `module` with named imports, as `[index, prefix, names, suffix]`. */\nfunction namedImport(lines: readonly string[], module: string): [number, string, string[], string] | undefined {\n const pattern = new RegExp(`^(\\\\s*import\\\\s*\\\\{)([^}]*)(\\\\}\\\\s*from\\\\s*[\"']${module}[\"'];?\\\\s*)$`);\n for (let index = 0; index < lines.length; index++) {\n const found = pattern.exec(lines[index] ?? \"\");\n if (found) return [index, found[1] ?? \"\", (found[2] ?? \"\").split(\",\").map((part) => part.trim()).filter((part) => part !== \"\"), found[3] ?? \"\"];\n }\n return undefined;\n}\n\nconst importLine = (prefix: string, names: readonly string[], suffix: string): string => `${prefix.trimEnd()} ${names.join(\", \")} ${suffix.trimStart()}`;\n\n/** The local name of an import part, for example `type A`, `A as B` or `A`. */\nconst imported = (part: string): string => part.replace(/^type\\s+/, \"\").split(/\\s+as\\s+/)[0] ?? \"\";\n\n/** This function adds the imports in `needs` that the text does not have. Then it removes the named imports of PATH_NAMES that the text does not use. */\nexport function fixImports(text: string, needs: readonly (readonly [string, string])[]): string {\n const eol = text.includes(\"\\r\\n\") ? \"\\r\\n\" : \"\\n\";\n let lines = text.split(/\\r?\\n/);\n const isImport = (line: string): boolean => /^\\s*import\\b/.test(line);\n for (const [name, module] of needs) {\n const has = lines.some((line) => isImport(line) && new RegExp(`\\\\b${name}\\\\b`).test(line));\n if (has) continue;\n const found = namedImport(lines, module) ?? namedImport(lines, module.replace(/^node:/, \"\"));\n if (found) {\n lines = lines.map((line, index) => (index === found[0] ? importLine(found[1], [...found[2], name], found[3]) : line));\n continue;\n }\n // A new import after the last import line, or at the top (after a shebang)\n let last = -1;\n lines.forEach((line, index) => {\n if (isImport(line) && /from\\s*[\"'][^\"']+[\"'];?\\s*$/.test(line)) last = index;\n });\n const at = last >= 0 ? last + 1 : lines[0]?.startsWith(\"#!\") ? 1 : 0;\n // The quote and the semicolon of the other imports of the file\n const style = lines.find((line) => isImport(line) && /from\\s*[\"']/.test(line)) ?? \"\";\n const quote = /from\\s*'/.test(style) ? \"'\" : '\"';\n const semi = style === \"\" || /;\\s*$/.test(style) ? \";\" : \"\";\n lines = [...lines.slice(0, at), `import { ${name} } from ${quote}${module}${quote}${semi}`, ...lines.slice(at)];\n }\n for (const name of PATH_NAMES) {\n if (lines.some((line) => !isImport(line) && new RegExp(`\\\\b${name}\\\\b`).test(line))) continue;\n for (const module of [\"node:url\", \"node:path\", \"node:fs\", \"url\", \"path\", \"fs\"]) {\n const found = namedImport(lines, module);\n if (!found || !found[2].some((part) => imported(part) === name)) continue;\n const kept = found[2].filter((part) => imported(part) !== name);\n lines = kept.length === 0 ? lines.filter((_, index) => index !== found[0]) : lines.map((line, index) => (index === found[0] ? importLine(found[1], kept, found[3]) : line));\n }\n }\n return lines.join(eol);\n}\n\nexport const mainCheck: Rule = {\n id: \"main-check\",\n title: \"A script finds out that it is the main module with `import.meta.main`, or with a real path of each side, not by a compare of `process.argv[1]` with its path.\",\n reason:\n \"Through a link, `process.argv[1]` has the path of the link, and the module has the real path. The compare is false, so the script does nothing and ends with exit code 0: a check that looks done but did not start.\",\n fix: \"Write `if (import.meta.main)` when `engines.node` allows only versions that have it (`^22.18`, `>=24.2`). Else compare `realpathSync(process.argv[1])` with `realpathSync(fileURLToPath(import.meta.url))`. `conventions fix` writes the one that fits.\",\n sources: [{ repo: \"private\", rule: \"main-check\", doc: \"docs/STRATEGY.md (2026-11-02, the main check through a link)\" }],\n options: {},\n check(context) {\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n // The package of a file is the deepest package folder that holds it\n const packages = [...codePackages(context), context.rootPackage].sort((a, b) => b.folder.length - a.folder.length);\n const breaks: Break[] = [];\n for (const file of files) {\n if (!SCRIPT.has(extname(file).toLowerCase()) || /(^|\\/)(node_modules|dist)\\//.test(file)) continue;\n const path = join(context.root, file);\n let text: string;\n try {\n if (statSync(path).size > MAX_BYTES) continue;\n text = readFileSync(path, \"utf8\");\n } catch {\n continue;\n }\n if (!text.includes(\"process.argv[1]\")) continue;\n const owner = packages.find((p) => p.folder === \"\" || file.startsWith(`${p.folder}/`));\n const engines = (owner?.manifest as { engines?: { node?: unknown } } | undefined)?.engines?.node;\n const main = hasImportMetaMain(engines);\n const lines = text.split(/\\r?\\n/);\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index] ?? \"\";\n const next = lines[index + 1] ?? \"\";\n // A compare on two lines: process.argv[1] on this line, and the path of the module on the next line\n const hit = isPathCompare(line) || (line.includes(\"process.argv[1]\") && !/import\\.meta/.test(line) && !isPathCompare(next) && isPathCompare(`${line} ${next}`));\n if (!hit) continue;\n const fixed = fixLine(line, main ? \"import.meta.main\" : REAL_COMPARE);\n const eol = text.includes(\"\\r\\n\") ? \"\\r\\n\" : \"\\n\";\n const after = fixed === undefined ? undefined : fixImports([...lines.slice(0, index), fixed, ...lines.slice(index + 1)].join(eol), main ? [] : REAL_IMPORTS);\n breaks.push({\n file,\n line: index + 1,\n message: \"The script compares process.argv[1] with its own path, which is false through a link.\",\n ...(after === undefined ? { fix: \"Change the condition by hand: it has more than the main check, or it is on more than one line.\" } : { edits: [{ file, before: text, after }] }),\n });\n }\n }\n return breaks;\n },\n};\n","/**\n * The rule `no-build-output`: git does not keep build output.\n */\nimport { byCode } from \"../workspace.ts\";\nimport type { Break, Rule } from \"../rule.ts\";\n\nexport const noBuildOutput: Rule = {\n id: \"no-build-output\",\n title: \"Git keeps no build output: no tracked file is in a folder named `dist` or `build`.\",\n reason:\n \"The release workflow builds each package from the source. Build output in git goes stale, makes noise in each diff, and a user can get old code from a git install.\",\n fix: \"Remove the folder from git with `git rm -r --cached <folder>`, and keep its name in `.gitignore`.\",\n sources: [\n { repo: \"client\", rule: \"no-build-output\", doc: \"CLAUDE.md:48\" },\n { repo: \"client\", rule: \"no-dist\", doc: \"CLAUDE.md:48\" },\n { repo: \"client\", rule: \"no-dist-commit\", doc: \"CLAUDE.md:48\" },\n ],\n options: {\n folders: { type: \"strings\", default: [\"dist\", \"build\"], description: \"The names of the folders of build output.\" },\n },\n check(context, options) {\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n const names = new Set(Array.isArray(options[\"folders\"]) ? options[\"folders\"] : [\"dist\", \"build\"]);\n const counts = new Map<string, number>();\n for (const file of files) {\n const segments = file.split(\"/\");\n const index = segments.slice(0, -1).findIndex((segment) => names.has(segment));\n if (index < 0) continue;\n const folder = segments.slice(0, index + 1).join(\"/\");\n counts.set(folder, (counts.get(folder) ?? 0) + 1);\n }\n return [...counts.keys()].sort(byCode).map(\n (folder): Break => ({\n file: `${folder}/`,\n message: `Git keeps ${counts.get(folder) ?? 0} file(s) in ${folder}/.`,\n fix: `Start \\`git rm -r --cached ${folder}\\`, and keep ${folder.split(\"/\").pop() ?? folder}/ in .gitignore.`,\n }),\n );\n },\n};\n","/**\n * The private name list: a JSON file outside of the public repositories, with the names of private projects. The file\n * `schema/private-names.schema.json` tells its form. This module parses the list and finds its names in a line or in a\n * path. It has no input or output.\n *\n * A result tells the place of a name by its index in the list, for example `name 3 of the private name list`. A result\n * does not show the text, the id, the project or a pattern, because the id of a name is the private name.\n */\n\n/** The name of the private name list in a break and in an error. A break does not show the path of the file. */\nexport const PRIVATE_NAME_LIST = \"the private name list\";\n\n/** One name of the private name list. */\nexport interface NameRule {\n /** The short name of the entry. An entry of `allow` refers to it. The check does not show it. */\n readonly id: string;\n /** The private project of the name, as a note for persons. The check does not read it. */\n readonly project: string;\n /**\n * The fixed texts of the name, with case. A line that has no seed of the list is no hit. A seed is a fast filter, so\n * each text that a pattern or the word finds must contain a seed.\n */\n readonly seeds: readonly string[];\n /** The regular expressions of the name, with no flags. A match in a line or in a path is a hit. */\n readonly patterns: readonly string[];\n /**\n * A word that is also a common word. A match of the whole word is a hit only in a sentence about the project.\n * The word in code, in a title or before a noun is no hit.\n */\n readonly word?: string;\n /** The lower-case words that make the word a common word when they come next, for example `corp` after `Acme`. */\n readonly commonAfter?: readonly string[];\n}\n\n/** A hit that a person examined and permitted: the name `name` in the file `path` of the repository `repo`. */\nexport interface AllowedHit {\n /** The name of the repository, with no owner. A value `owner/name` is also correct. Case is not significant. */\n readonly repo: string;\n /** The path of the file from the root of the repository, with `/`. */\n readonly path: string;\n /** The id of the permitted name. With no id, each name of the list is permitted in the file. */\n readonly name?: string;\n /** The reason of the person. */\n readonly why: string;\n}\n\n/** The private name list after a parse. */\nexport interface PrivateNameList {\n readonly names: readonly NameRule[];\n readonly allow: readonly AllowedHit[];\n}\n\n/** A name of the list that a line or a path has. */\nexport interface NameHit {\n /** The index of the name in the list, from 1. */\n readonly name: number;\n /** The entry of the name. A break does not show it. */\n readonly rule: NameRule;\n /** The position of the match in the text, from 0. */\n readonly index: number;\n}\n\n/** The place of a line: the repository and the path of its file. The list `allow` applies only to a line with a place. */\nexport interface LinePlace {\n /** The repository: `owner/name` or `name`. */\n readonly repo?: string;\n /** The path of the file from the root of the repository. */\n readonly path?: string;\n}\n\n/**\n * This error tells that a private name list is not valid. Its reason names a field by the index of its entry, and\n * does not show a value of the list.\n */\nexport class PrivateNameListError extends Error {\n /** The reason, for example `name 3 of the private name list: the field seeds has no text`. */\n readonly reason: string;\n constructor(reason: string) {\n super(`The private name list is not valid: ${reason}.`);\n this.name = \"PrivateNameListError\";\n this.reason = reason;\n }\n}\n\n/** The compiled regular expressions of a name. */\ninterface CompiledName {\n readonly patterns: readonly RegExp[];\n readonly word?: RegExp;\n}\n\n/** The compiled names, by entry. The parse fills it, and a list of another source gets its entries on the first use. */\nconst compiled = new WeakMap<NameRule, CompiledName>();\n\n/** The form of a word: letters, digits, `_` and `-`. So the word is a literal in a regular expression. */\nconst WORD = /^[A-Za-z0-9][A-Za-z0-9_-]*$/;\n\n/** The form of a word of `commonAfter`: lower-case letters. The check compares it with the next word in lower case. */\nconst AFTER = /^[a-z]+$/;\n\n/** This function gives the compiled regular expressions of a name. */\nfunction compiledOf(rule: NameRule): CompiledName {\n const known = compiled.get(rule);\n if (known !== undefined) return known;\n const made: CompiledName = {\n patterns: rule.patterns.map((source) => new RegExp(source)),\n ...(rule.word === undefined || rule.word === \"\" ? {} : { word: new RegExp(`\\\\b${rule.word}\\\\b`, \"g\") }),\n };\n compiled.set(rule, made);\n return made;\n}\n\n/** This function tells if a value is a list of texts that are not empty. */\nconst isTexts = (value: unknown): value is string[] => Array.isArray(value) && value.every((item) => typeof item === \"string\" && item !== \"\");\n\n/** This function tells if a value is an object that is not a list. */\nconst isObject = (value: unknown): value is Record<string, unknown> => typeof value === \"object\" && value !== null && !Array.isArray(value);\n\n/** This function gives the first field of `entry` that `known` does not have, or undefined. */\nconst unknownField = (entry: Record<string, unknown>, known: readonly string[]): string | undefined => Object.keys(entry).find((key) => !known.includes(key));\n\n/** This function gives a name of the list after a check of its fields. The error names the entry by its index. */\nfunction nameOf(entry: unknown, at: string): NameRule {\n const fail = (reason: string): never => {\n throw new PrivateNameListError(`${at}: ${reason}`);\n };\n if (!isObject(entry)) return fail(\"the entry is not an object\");\n const extra = unknownField(entry, [\"id\", \"project\", \"seeds\", \"patterns\", \"word\", \"commonAfter\"]);\n if (extra !== undefined) fail(\"the entry has a field that the schema does not have\");\n const { id, project, seeds, patterns, word, commonAfter } = entry;\n if (typeof id !== \"string\" || id === \"\") fail(\"the field id is not a text\");\n if (typeof project !== \"string\" || project === \"\") fail(\"the field project is not a text\");\n if (!isTexts(seeds) || seeds.length === 0) fail(\"the field seeds is not a list of one or more texts\");\n if (!isTexts(patterns)) fail(\"the field patterns is not a list of texts\");\n if (word !== undefined && (typeof word !== \"string\" || !WORD.test(word))) fail(\"the field word is not one word of letters, digits, _ and -\");\n if (commonAfter !== undefined && (!Array.isArray(commonAfter) || !commonAfter.every((item) => typeof item === \"string\" && AFTER.test(item))))\n fail(\"the field commonAfter is not a list of lower-case words\");\n if (commonAfter !== undefined && word === undefined) fail(\"the field commonAfter has no field word\");\n const rule: NameRule = {\n id: id as string,\n project: project as string,\n seeds: seeds as string[],\n patterns: patterns as string[],\n ...(word === undefined ? {} : { word: word as string }),\n ...(commonAfter === undefined ? {} : { commonAfter: commonAfter as string[] }),\n };\n rule.patterns.forEach((source, index) => {\n try {\n new RegExp(source);\n } catch {\n fail(`pattern ${String(index + 1)} is not a valid regular expression`);\n }\n });\n compiledOf(rule);\n return rule;\n}\n\n/** This function gives an entry of the list `allow` after a check of its fields. */\nfunction allowedOf(entry: unknown, at: string, ids: ReadonlySet<string>): AllowedHit {\n const fail = (reason: string): never => {\n throw new PrivateNameListError(`${at}: ${reason}`);\n };\n if (!isObject(entry)) return fail(\"the entry is not an object\");\n if (unknownField(entry, [\"repo\", \"path\", \"name\", \"why\"]) !== undefined) fail(\"the entry has a field that the schema does not have\");\n const { repo, path, name, why } = entry;\n if (typeof repo !== \"string\" || repo === \"\") fail(\"the field repo is not a text\");\n if (typeof path !== \"string\" || path === \"\") fail(\"the field path is not a text\");\n if (typeof why !== \"string\" || why === \"\") fail(\"the field why is not a text\");\n if (name !== undefined && (typeof name !== \"string\" || !ids.has(name))) fail(\"the field name is not the id of a name of the list\");\n return { repo: repo as string, path: path as string, why: why as string, ...(name === undefined ? {} : { name: name as string }) };\n}\n\n/**\n * This function parses the text of a private name list, and checks it against the schema. It also checks each regular\n * expression and the ids. It throws a `PrivateNameListError` when the text is not valid. The error shows no value of the text.\n */\nexport function parsePrivateNames(text: string): PrivateNameList {\n let data: unknown;\n try {\n data = JSON.parse(text);\n } catch {\n // The message of JSON.parse can quote the text, so the error does not give it\n throw new PrivateNameListError(\"the text is not valid JSON\");\n }\n if (!isObject(data)) throw new PrivateNameListError(\"the text is not a JSON object\");\n if (unknownField(data, [\"$schema\", \"$comment\", \"names\", \"allow\"]) !== undefined) throw new PrivateNameListError(\"the object has a field that the schema does not have\");\n if (data[\"$comment\"] !== undefined && typeof data[\"$comment\"] !== \"string\") throw new PrivateNameListError(\"the field $comment is not a text\");\n const names = data[\"names\"];\n const allow = data[\"allow\"] ?? [];\n if (!Array.isArray(names)) throw new PrivateNameListError(\"the field names is not a list\");\n if (!Array.isArray(allow)) throw new PrivateNameListError(\"the field allow is not a list\");\n const rules = names.map((entry, index) => nameOf(entry, `name ${String(index + 1)} of ${PRIVATE_NAME_LIST}`));\n const ids = new Set<string>();\n rules.forEach((rule, index) => {\n if (ids.has(rule.id)) throw new PrivateNameListError(`name ${String(index + 1)} of ${PRIVATE_NAME_LIST}: the id is also the id of an earlier name`);\n ids.add(rule.id);\n });\n return { names: rules, allow: allow.map((entry, index) => allowedOf(entry, `allow entry ${String(index + 1)} of ${PRIVATE_NAME_LIST}`, ids)) };\n}\n\n/** The words before a name in code: a declaration, a type or an operator. */\nconst CODE_BEFORE = /\\b(class|interface|type|new|extends|implements|const|let|enum|struct|typeof|instanceof|as)\\s+$/;\n/** A line of code that imports or exports names. */\nconst CODE_LINE = /^\\s*(import|export)\\b/;\n/** The words before a common noun: an article or a count. */\nconst COUNT_BEFORE = /\\b(a|an|any|each|every|one|our|this|your)\\s+$/i;\n/** A word with a capital letter before the word: a title, or a name of more words. */\nconst TITLE_BEFORE = /[A-Z][\\w-]*\\s+$/;\n/** The words with a capital letter that start a sentence part, not a title. */\nconst WORD_BEFORE = /\\b(And|By|For|From|In|Of|See|To|With)\\s+$/;\n\n/**\n * This function tells if the word of `rule` at `index` of `line` is a common word or code, and not the name of the\n * project. Code is a type, a key or a part of a path. A common word comes after an article, in a title or before a noun.\n */\nexport function isCommonUse(line: string, index: number, rule: NameRule): boolean {\n const word = rule.word ?? \"\";\n const before = line.slice(0, index);\n const after = line.slice(index + word.length);\n if (/^\\s*[\\]>{};]/.test(after) || /[\"[]$/.test(before) || /=>\\s*$/.test(before)) return true;\n if (/^[<([{]/.test(after) || /^\\.\\w/.test(after) || after.startsWith(\"::\") || /^:\\s*[{[(]/.test(after)) return true;\n if (/^[-/]/.test(after) || /[-/]$/.test(before)) return true;\n if (/[<.]$/.test(before)) return true;\n if (CODE_BEFORE.test(before) || CODE_LINE.test(line)) return true;\n if (/[`'\"]$/.test(before) && /^[`'\"]/.test(after)) return true;\n if (/[\\w)\\]?]:\\s*$/.test(before) && /^\\s*([,;)=|&>]|$)/.test(after)) return true;\n if (COUNT_BEFORE.test(before)) return true;\n if (TITLE_BEFORE.test(before) && !WORD_BEFORE.test(before)) return true;\n const next = /^\\s+([A-Za-z]+)/.exec(after)?.[1];\n if (next === undefined) return false;\n return /^[A-Z][a-z]/.test(next) || (rule.commonAfter ?? []).includes(next.toLowerCase());\n}\n\n/**\n * This function gives the first name of `names` in `line`, or undefined. For each name in sequence, a pattern match is\n * a hit. A match of the word is a hit when `isCommonUse` is false. It does not use the seeds or the list `allow`.\n */\nexport function firstNameMatch(line: string, names: readonly NameRule[]): NameHit | undefined {\n for (let at = 0; at < names.length; at++) {\n const hit = nameMatch(line, names, at);\n if (hit !== undefined) return hit;\n }\n return undefined;\n}\n\n/**\n * This function gives each name of `names` in `line`, in the sequence of the list. Each name gives one hit at most: its\n * first pattern match, or else its first word match that is not a common use.\n */\nexport function nameMatches(line: string, names: readonly NameRule[]): NameHit[] {\n const hits: NameHit[] = [];\n for (let at = 0; at < names.length; at++) {\n const hit = nameMatch(line, names, at);\n if (hit !== undefined) hits.push(hit);\n }\n return hits;\n}\n\n/** This function gives the hit of the name at position `at` of `names` in `line`, or undefined. */\nfunction nameMatch(line: string, names: readonly NameRule[], at: number): NameHit | undefined {\n const rule = names[at];\n if (rule === undefined) return undefined;\n const { patterns, word } = compiledOf(rule);\n for (const pattern of patterns) {\n const found = pattern.exec(line);\n if (found !== null) return { name: at + 1, rule, index: found.index };\n }\n if (word === undefined) return undefined;\n for (const found of line.matchAll(word)) {\n if (!isCommonUse(line, found.index, rule)) return { name: at + 1, rule, index: found.index };\n }\n return undefined;\n}\n\n/** This function gives the name part of a repository: `name` for `owner/name`, in lower case. */\nconst repoName = (repo: string): string => (repo.split(\"/\").at(-1) ?? repo).toLowerCase();\n\n/**\n * This function tells if the list `allow` permits the name `id` in the file `path` of the repository `repo`. An entry\n * with the repository `name` or `owner/name` matches the repository `owner/name`. Case of a repository is not significant.\n */\nexport function isAllowedHit(allow: readonly AllowedHit[], repo: string, path: string, id: string): boolean {\n const full = repo.toLowerCase();\n return allow.some((entry) => {\n const named = entry.repo.toLowerCase();\n const sameRepo = named.includes(\"/\") ? named === full : named === repoName(repo);\n return sameRepo && entry.path === path && (entry.name === undefined || entry.name === id);\n });\n}\n\n/**\n * This function gives each name of the list in one line of a file or of a message, in the sequence of the list. The line\n * must have a seed of the list. Each name gives one hit at most. A permitted hit at the place does not count.\n */\nexport function lineNameHits(list: PrivateNameList, line: string, place: LinePlace = {}): NameHit[] {\n if (!list.names.some((rule) => rule.seeds.some((seed) => line.includes(seed)))) return [];\n const { repo, path } = place;\n const hits = nameMatches(line, list.names);\n if (repo === undefined || path === undefined) return hits;\n return hits.filter((hit) => !isAllowedHit(list.allow, repo, path, hit.rule.id));\n}\n\n/**\n * This function gives the first name of the list in one line of a file or of a message, or undefined. It is the first\n * hit of `lineNameHits`, so a permitted hit does not hide a hit of another name.\n */\nexport function lineNameHit(list: PrivateNameList, line: string, place: LinePlace = {}): NameHit | undefined {\n return lineNameHits(list, line, place)[0];\n}\n\n/**\n * This function gives the first name of the list whose pattern matches a path of a file, or undefined. Only the patterns\n * apply, because a path has no sentence. The seeds and the list `allow` do not apply.\n */\nexport function pathNameHit(list: PrivateNameList, path: string): NameHit | undefined {\n for (let at = 0; at < list.names.length; at++) {\n const rule = list.names[at];\n if (rule === undefined) continue;\n const found = compiledOf(rule)\n .patterns.map((pattern) => pattern.exec(path))\n .find((match) => match !== null);\n if (found !== undefined && found !== null) return { name: at + 1, rule, index: found.index };\n }\n return undefined;\n}\n\n","/**\n * The rule `no-local-paths`: no tracked file names the home folder of a user of a computer. The commit messages of a\n * change and the title and the body of its pull request do not name one either. The same is true for each private\n * pattern of the environment variable `CONVENTIONS_PRIVATE_PATTERNS`. A break of a private pattern does not show the\n * text or the pattern, because a public log must not name them.\n *\n * The module also has the core of the command `conventions pre-push`. The core has the setting of the private name list,\n * the private patterns and the breaks of one text.\n */\nimport { existsSync, readFileSync, statSync } from \"node:fs\";\nimport { extname, join } from \"node:path\";\nimport { rangeOf } from \"../change.ts\";\nimport { lineNameHit, pathNameHit, PRIVATE_NAME_LIST, type PrivateNameList } from \"../private-names.ts\";\nimport type { Break, Rule, RuleContext } from \"../rule.ts\";\n\n/** The extensions of files that are not text. The rule does not read them. */\nconst BINARY = new Set(\n \".png .jpg .jpeg .gif .webp .avif .ico .bmp .tiff .pdf .zip .gz .tgz .bz2 .xz .7z .tar .woff .woff2 .ttf .otf .eot .mp3 .mp4 .webm .mov .wav .ogg .wasm .node .exe .dll .so .dylib .bin .db .sqlite .duckdb\".split(\n \" \",\n ),\n);\n\n/** The largest file that the rule reads, in bytes. */\nconst MAX_BYTES = 2 * 1024 * 1024;\n\n/** The names in a home path that do not identify a person: CI users, container users and placeholders. */\nexport const DEFAULT_ALLOWED: readonly string[] = [\"runner\", \"runneradmin\", \"user\", \"username\", \"you\", \"me\", \"name\", \"yourname\", \"your-name\", \"example\", \"node\", \"ubuntu\", \"vscode\", \"codespace\", \"public\", \"default\", \"shared\", \"all users\"];\n\n/** The forms of a home folder: Windows, macOS and Linux. The group `user` is the name of the user. */\nexport const HOME_PATTERNS: readonly RegExp[] = [\n // A Windows path does not depend on case, so `c:/users/<name>` is the same folder\n /\\b[A-Za-z]:(?:\\\\{1,2}|\\/)[Uu][Ss][Ee][Rr][Ss](?:\\\\{1,2}|\\/)(?<user>[^\\\\/\\s\"'`<>|:*?%$(){}[\\],;]+)/g,\n /(?<![\\w.~-])\\/Users\\/(?<user>[^/\\s\"'`<>|:*?%$(){}[\\],;]+)/g,\n /(?<![\\w.~-])\\/home\\/(?<user>[^/\\s\"'`<>|:*?%$(){}[\\],;]+)/g,\n];\n\n/** The name of the environment variable of the private patterns. */\nexport const PRIVATE_PATTERNS_VARIABLE = \"CONVENTIONS_PRIVATE_PATTERNS\";\n\n/** The name of the environment variable of the path of the private name list. */\nexport const PRIVATE_NAMES_FILE_VARIABLE = \"CONVENTIONS_PRIVATE_NAMES_FILE\";\n\n/** The key of the git configuration of the path of the private name list. */\nexport const PRIVATE_NAMES_FILE_CONFIG = \"conventions.privateNamesFile\";\n\n/** A private pattern: one line of the environment variable `CONVENTIONS_PRIVATE_PATTERNS`. */\nexport interface PrivatePattern {\n /** The regular expression, as text. The check uses it with the flag `g`, and case is significant. */\n readonly source: string;\n /** The line of the pattern in its source, from 1. */\n readonly line: number;\n /** The name of the source in a break: `CONVENTIONS_PRIVATE_PATTERNS`. */\n readonly label: string;\n}\n\n/** The private sources of a check. A break of a private source does not show the text or the source. */\nexport interface PrivateSources {\n /** The private name list, from `parsePrivateNames`. */\n readonly names?: PrivateNameList;\n /** The private patterns, from `privatePatterns`. */\n readonly patterns?: readonly PrivatePattern[];\n}\n\n/** The options of `privateTextBreaks`. */\nexport interface TextBreakOptions {\n /** More user names that do not identify a person, after `DEFAULT_ALLOWED`. */\n readonly allow?: readonly string[];\n /** Public regular expressions, from the option `patterns`. A break of a public pattern shows the text. */\n readonly patterns?: readonly string[];\n /**\n * The value `true` tells that the text is the root `package.json`. Then the reason of an exception can quote a home\n * folder, and the line that names a public pattern is no break. A private pattern still counts there.\n */\n readonly rootPackage?: boolean;\n /** The value `false` turns off the breaks of home folders. The default is `true`. */\n readonly homes?: boolean;\n /** The line of the first line of the text, from 1. The default is 1. */\n readonly firstLine?: number;\n /** The repository of the text, `owner/name`. The list `allow` of the private name list uses it. */\n readonly repo?: string;\n /** The path of the file of the text, from the root of the repository. The list `allow` of the private name list uses it. */\n readonly path?: string;\n /** The value `true` tells that the text is a path of a file. Then only the patterns of the private name list apply. */\n readonly isPath?: boolean;\n}\n\n/** A pattern of text that no file has: from the option `patterns`, which is public, or a private pattern. */\ninterface Matcher {\n readonly regex: RegExp;\n /** The private pattern of the matcher. A public pattern has none. */\n readonly secret?: PrivatePattern;\n}\n\n/** The compiled patterns of a check. */\ninterface Matchers {\n readonly names?: PrivateNameList;\n readonly extra: readonly Matcher[];\n readonly allowed: ReadonlySet<string>;\n readonly homes: boolean;\n}\n\n/** This function gives the regular expression of a pattern, or undefined when the pattern is not valid. */\nfunction compilePattern(source: string): RegExp | undefined {\n try {\n return new RegExp(source, \"g\");\n } catch {\n return undefined;\n }\n}\n\n/** This function compiles the patterns of a check. A private pattern that is not valid has no matcher. */\nfunction compile(privates: PrivateSources, options: TextBreakOptions): Matchers {\n const extra: Matcher[] = (options.patterns ?? []).map((source) => ({ regex: new RegExp(source, \"g\") }));\n for (const pattern of privates.patterns ?? []) {\n const regex = compilePattern(pattern.source);\n if (regex !== undefined) extra.push({ regex, secret: pattern });\n }\n return {\n ...(privates.names === undefined ? {} : { names: privates.names }),\n extra,\n allowed: new Set([...DEFAULT_ALLOWED, ...(options.allow ?? [])].map((name) => name.toLowerCase())),\n homes: options.homes !== false,\n };\n}\n\n/** This function gives the breaks of one text with compiled patterns. */\nfunction textBreaks(name: string, text: string, matchers: Matchers, options: TextBreakOptions): Break[] {\n const breaks: Break[] = [];\n const first = options.firstLine ?? 1;\n const lines = text.split(/\\r?\\n/);\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index] ?? \"\";\n const at = first + index;\n // The reason of an exception in the root package.json tells why a text is no home folder, so it can quote one\n const isReason = options.rootPackage === true && /^\\s*\"(?:reason|off)\"\\s*:/.test(line);\n if (matchers.homes && !isReason) {\n for (const pattern of HOME_PATTERNS) {\n for (const match of line.matchAll(pattern)) {\n const user = match.groups?.[\"user\"] ?? \"\";\n // A name of one character is a placeholder of a test, not a person\n if (user.length < 2 || matchers.allowed.has(user.toLowerCase())) continue;\n breaks.push({ file: name, line: at, message: `The text \"${match[0]}\" is the home folder of a user.` });\n }\n }\n }\n if (matchers.names !== undefined) {\n const place = { ...(options.repo === undefined ? {} : { repo: options.repo }), ...(options.path === undefined ? {} : { path: options.path }) };\n const hit = options.isPath === true ? pathNameHit(matchers.names, line) : lineNameHit(matchers.names, line, place);\n if (hit !== undefined)\n breaks.push({\n file: name,\n line: at,\n message: `A text names name ${String(hit.name)} of ${PRIVATE_NAME_LIST}.`,\n fix: \"Remove the text. The check does not show the text, because the name is private.\",\n });\n }\n for (const matcher of matchers.extra) {\n // The option patterns of the root package.json names the pattern itself\n if (options.rootPackage === true && matcher.secret === undefined && line.trim().replace(/,$/, \"\") === JSON.stringify(matcher.regex.source)) continue;\n for (const match of line.matchAll(matcher.regex)) {\n breaks.push(\n matcher.secret === undefined\n ? { file: name, line: at, message: `The text \"${match[0]}\" matches the pattern ${matcher.regex.source}.`, fix: \"Remove the text.\" }\n : {\n file: name,\n line: at,\n message: `A text matches the private pattern on line ${String(matcher.secret.line)} of ${matcher.secret.label}.`,\n fix: \"Remove the text. The check does not show the text, because the pattern is private.\",\n },\n );\n }\n }\n }\n return breaks;\n}\n\n/** This function gives the patterns of the lines of `text`, with the line of each (from 1). It skips empty lines. */\nfunction patternLines(text: string, label: string): PrivatePattern[] {\n return text\n .split(\"\\n\")\n .map((source, index) => ({ source: source.trim(), line: index + 1, label }))\n .filter((pattern) => pattern.source !== \"\");\n}\n\n/** This function gives the private patterns of the environment variable, with the line of each (from 1). */\nexport function privatePatterns(env: Readonly<Record<string, string | undefined>>): PrivatePattern[] {\n return patternLines(env[PRIVATE_PATTERNS_VARIABLE] ?? \"\", PRIVATE_PATTERNS_VARIABLE);\n}\n\n/**\n * This function gives the path of the private name list: the environment variable `CONVENTIONS_PRIVATE_NAMES_FILE`,\n * else the git configuration `conventions.privateNamesFile`. It gives undefined when neither has a value.\n */\nexport function privateNamesFile(env: Readonly<Record<string, string | undefined>>, git: (args: readonly string[]) => string | undefined): string | undefined {\n const fromEnv = env[PRIVATE_NAMES_FILE_VARIABLE]?.trim() ?? \"\";\n if (fromEnv !== \"\") return fromEnv;\n // The type `path` expands `~` at the start of the value\n const fromGit = git([\"config\", \"--type=path\", \"--get\", PRIVATE_NAMES_FILE_CONFIG])?.trim() ?? \"\";\n return fromGit === \"\" ? undefined : fromGit;\n}\n\n/** This function gives a break for each private pattern that is not a valid regular expression. A break does not show the pattern. */\nexport function invalidPatternBreaks(patterns: readonly PrivatePattern[]): Break[] {\n return patterns\n .filter((pattern) => compilePattern(pattern.source) === undefined)\n .map((pattern) => ({\n file: pattern.label,\n line: pattern.line,\n message: `Line ${String(pattern.line)} of ${pattern.label} is not a valid regular expression.`,\n fix: \"Correct the regular expression. The check does not show the pattern, because it is private.\",\n }));\n}\n\n/**\n * This function gives the breaks of one text: a file, a commit message or the body of a pull request. Each break has the\n * file `name`. A break of a private source does not show the text, the name or the pattern. A line has one break or no\n * break of the private name list. The breaks of home folders use `HOME_PATTERNS` and the permitted names. A private pattern\n * that is not valid gives no break here: refer to `invalidPatternBreaks`.\n */\nexport function privateTextBreaks(name: string, text: string, privates: PrivateSources, options: TextBreakOptions = {}): Break[] {\n return textBreaks(name, text, compile(privates, options), options);\n}\n\n/** A text that the rule examines, other than a file: a commit message, or the title or the body of the pull request. */\nexport interface ChangeText {\n /** The name of the text in a break: `commit <sha>`, `pull request title` or `pull request body`. */\n readonly name: string;\n readonly text: string;\n}\n\n/**\n * This function gives the texts of the change that are not files. They are each commit message of a pull request (or of the\n * range of `--base`). They are also the title and the body of the pull request, from the event file of GitHub Actions.\n */\nexport function changeTexts(context: RuleContext): ChangeText[] {\n const texts: ChangeText[] = [];\n const range = rangeOf(context);\n if (!(\"skipped\" in range)) {\n const log = context.git([\"log\", \"--no-merges\", \"--format=%H%x00%B%x1e\", ...range.log]) ?? \"\";\n for (const entry of log.split(\"\\x1e\")) {\n const [sha, message] = entry.replace(/^\\s+/, \"\").split(\"\\0\");\n if (sha !== undefined && sha !== \"\" && message !== undefined) texts.push({ name: `commit ${sha.slice(0, 12)}`, text: message });\n }\n }\n const file = context.env[\"GITHUB_EVENT_PATH\"];\n if (file !== undefined && file !== \"\" && existsSync(file)) {\n try {\n const event = JSON.parse(readFileSync(file, \"utf8\")) as { pull_request?: { title?: unknown; body?: unknown } };\n const title = event.pull_request?.title;\n const body = event.pull_request?.body;\n if (typeof title === \"string\") texts.push({ name: \"pull request title\", text: title });\n if (typeof body === \"string\") texts.push({ name: \"pull request body\", text: body });\n } catch {\n // An event file that does not parse has no pull request to examine\n }\n }\n return texts;\n}\n\nexport const noLocalPaths: Rule = {\n id: \"no-local-paths\",\n title: \"No tracked file, commit message of the change or text of its pull request has a private pattern or the home folder of a user (`C:\\\\Users\\\\<name>`, `/Users/<name>`, `/home/<name>`).\",\n reason: \"A public file must not name a computer, a user or a path of a computer. A local path also works only on one computer.\",\n fix: \"Use a path relative to the repository, `~`, an environment variable, or a placeholder such as `<you>`.\",\n sources: [\n { repo: \"client\", rule: \"I12\", doc: \"packages/documentation/ARCHITECTURE.md:201\" },\n { repo: \"systems\", rule: \"no-identifying-names\", doc: \"CLAUDE.md:12\" },\n { repo: \"systems\", rule: \"no-private-identifiers\", doc: \"CLAUDE.md:12\" },\n { repo: \"systems\", rule: \"no-private-names\", doc: \"CLAUDE.md:12\" },\n { repo: \"coeval\", rule: \"no-private-names\", doc: \"CLAUDE.md:22\" },\n ],\n options: {\n allow: { type: \"strings\", default: [], description: \"More user names that do not identify a person.\" },\n patterns: {\n type: \"strings\",\n default: [],\n description: \"More regular expressions of text that no file has. The environment variable CONVENTIONS_PRIVATE_PATTERNS adds one on each line, so a private name stays out of package.json.\",\n },\n },\n check(context, options) {\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n const settings: TextBreakOptions = {\n allow: Array.isArray(options[\"allow\"]) ? [...options[\"allow\"]] : [],\n patterns: Array.isArray(options[\"patterns\"]) ? [...options[\"patterns\"]] : [],\n };\n // A repository keeps private names out of its public files with the environment variable, for example from a secret of CI\n const privates = privatePatterns(context.env);\n const matchers = compile({ patterns: privates }, settings);\n const rootFile = context.rootPackage.file;\n // A private pattern that is not valid is a break of its own, not an error of the rule: an error message shows the pattern\n const breaks: Break[] = invalidPatternBreaks(privates);\n const add = (items: readonly Break[]): void => {\n for (const item of items) breaks.push(item);\n };\n for (const file of files) {\n if (BINARY.has(extname(file).toLowerCase())) continue;\n const path = join(context.root, file);\n let text: string;\n try {\n if (statSync(path).size > MAX_BYTES) continue;\n text = readFileSync(path, \"utf8\");\n } catch {\n // A file of the index that is not in the working tree\n continue;\n }\n if (text.includes(\"\\0\")) continue;\n add(textBreaks(file, text, matchers, { rootPackage: file === rootFile }));\n }\n // A commit message and the text of a pull request are public too, and a merged commit message stays in the history\n for (const change of changeTexts(context)) add(textBreaks(change.name, change.text, matchers, {}));\n return breaks;\n },\n};\n","/**\n * The compiler options of a tsconfig after its `extends` chain, as the rules read them.\n */\nimport { existsSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport { basename, dirname, join, relative, resolve } from \"node:path\";\nimport { readJsonc } from \"./rule.ts\";\n\n/** The value of a compiler option, and the file of the config that sets it. */\nexport interface ConfigOption {\n readonly value: unknown;\n readonly file: string;\n}\n\n/**\n * This function gives the value of the compiler option `name` that a tsconfig gets from the configs it extends. It gives\n * `null` when no config of the chain sets it. It gives `undefined` when it cannot read a config of the chain, for example\n * a package that is not installed.\n */\nexport function inheritedOption(tsconfig: string, name: string, seen: ReadonlySet<string> = new Set()): ConfigOption | null | undefined {\n const json = readJsonc(tsconfig) as { extends?: unknown } | undefined;\n if (json === undefined || seen.has(tsconfig)) return undefined;\n const specs = Array.isArray(json.extends) ? json.extends : json.extends === undefined ? [] : [json.extends];\n let found: ConfigOption | null = null;\n // A later config of the list wins, as in tsc\n for (const spec of specs) {\n if (typeof spec !== \"string\") return undefined;\n let file: string;\n try {\n file = spec.startsWith(\".\") || spec.startsWith(\"/\") ? resolve(dirname(tsconfig), spec) : createRequire(tsconfig).resolve(spec);\n } catch {\n return undefined;\n }\n if (!existsSync(file) && existsSync(`${file}.json`)) file = `${file}.json`;\n const parent = readJsonc(file) as { compilerOptions?: Record<string, unknown> } | undefined;\n if (parent === undefined) return undefined;\n const own = parent.compilerOptions?.[name];\n const value = own === undefined ? inheritedOption(file, name, new Set([...seen, tsconfig])) : { value: own, file };\n if (value === undefined) return undefined;\n if (value !== null) found = value;\n }\n return found;\n}\n\n/**\n * This function gives the value of the compiler option `name` of a tsconfig. It is its own value, or else the value from\n * the configs it extends. It gives `null` when no config sets it, and `undefined` when it cannot read a config.\n */\nexport function compilerOption(tsconfig: string, name: string): ConfigOption | null | undefined {\n const json = readJsonc(tsconfig) as { compilerOptions?: Record<string, unknown> } | undefined;\n if (json === undefined) return undefined;\n const own = json.compilerOptions?.[name];\n return own === undefined ? inheritedOption(tsconfig, name) : { value: own, file: tsconfig };\n}\n\n/**\n * This function gives the absolute path of a path option. A `${configDir}` is the folder of the tsconfig `tsconfig`. Each\n * other relative path is relative to the config that sets it.\n */\nexport function optionPath(tsconfig: string, option: ConfigOption & { readonly value: string }): string {\n const value = option.value;\n return value.startsWith(\"${configDir}\") ? resolve(dirname(tsconfig), `.${value.slice(\"${configDir}\".length)}`) : resolve(dirname(option.file), value);\n}\n\n/**\n * This function gives the absolute path of the build info file that tsc writes for a tsconfig, by the rules of tsc. It\n * gives `null` when tsc writes no build info file: `incremental` and `composite` are both off. It gives `undefined` when\n * it cannot read a config of the chain.\n */\nexport function buildInfoFile(tsconfig: string): string | null | undefined {\n const read = (name: string): ConfigOption | null | undefined => compilerOption(tsconfig, name);\n const incremental = read(\"incremental\");\n const composite = read(\"composite\");\n if (incremental === undefined || composite === undefined) return undefined;\n // `composite` turns on the incremental build, also when `incremental` is false (isIncrementalCompilation of tsc)\n if (incremental?.value !== true && composite?.value !== true) return null;\n const paths: Record<string, string | null> = {};\n for (const name of [\"tsBuildInfoFile\", \"outFile\", \"outDir\", \"rootDir\"]) {\n const option = read(name);\n if (option === undefined) return undefined;\n paths[name] = option !== null && typeof option.value === \"string\" ? optionPath(tsconfig, { file: option.file, value: option.value }) : null;\n }\n if (paths[\"tsBuildInfoFile\"]) return paths[\"tsBuildInfoFile\"];\n const withoutExtension = (path: string): string => path.replace(/\\.[^./\\\\]*$/, \"\");\n if (paths[\"outFile\"]) return `${withoutExtension(paths[\"outFile\"])}.tsbuildinfo`;\n const config = withoutExtension(resolve(tsconfig));\n const outDir = paths[\"outDir\"];\n const rootDir = paths[\"rootDir\"];\n const stem = outDir ? (rootDir ? resolve(outDir, relative(rootDir, config)) : join(outDir, basename(config))) : config;\n return `${stem}.tsbuildinfo`;\n}\n","/**\n * The rule `pack-no-buildinfo`: npm does not pack the build info file of tsc. A public package that writes it in a\n * folder of its field `files` has the negation `!<path>` there.\n */\nimport { readdirSync } from \"node:fs\";\nimport { isAbsolute, join, posix, relative } from \"node:path\";\nimport { buildInfoFile } from \"../tsconfig.ts\";\nimport { codePackages, lineOf, type Break, type PackageInfo, type Rule } from \"../rule.ts\";\nimport { globToRegExp } from \"../workspace.ts\";\n\n/** The names of the tsconfig files of a package folder. */\nconst TSCONFIG = /^tsconfig(?:\\.[\\w-]+)?\\.json$/;\n\n/** A rule of the ignore list that npm makes from the field `files`, with the index of its entry. */\ninterface PackRule {\n /** The glob, without its `!` characters. */\n readonly glob: string;\n /** True when the rule includes the paths that it matches (an odd count of `!`). */\n readonly include: boolean;\n /** The index of the entry of `files`. */\n readonly index: number;\n}\n\n/** This function gives the rule of a line of the ignore list, as minimatch reads it: each `!` inverts the rule. */\nfunction packRule(line: string, index: number): PackRule {\n let bangs = 0;\n while (line.charAt(bangs) === \"!\") bangs += 1;\n // minimatch does not keep a repeated `/` (preserveMultipleSlashes is false)\n return { glob: line.slice(bangs).replace(/\\/{2,}/g, \"/\"), include: bangs % 2 === 1, index };\n}\n\n/** This function gives the regular expression of a glob, as npm reads it: with no case, and `*` also matches a dot. */\nfunction packRegExp(glob: string): RegExp {\n return new RegExp(globToRegExp(glob).source, \"i\");\n}\n\n/**\n * This function tells if a rule matches the path (`/`, relative to the package). A glob with no `/` matches the name\n * at each depth (matchBase). A `/` at the start anchors the glob, as each glob with a `/` is. A `/` at the end\n * matches a folder only. A rule that includes also matches a folder that holds a path that the glob can match.\n */\nfunction ruleMatches(rule: PackRule, path: string, folder: boolean): boolean {\n let glob = rule.glob;\n if (glob.startsWith(\"/\")) glob = glob.slice(1);\n if (glob.endsWith(\"/\")) {\n if (!folder) return false;\n glob = glob.slice(0, -1);\n }\n if (glob === \"\") return false;\n const segments = path.split(\"/\");\n if (!rule.glob.includes(\"/\")) return packRegExp(glob).test(segments[segments.length - 1] ?? path);\n if (packRegExp(glob).test(path)) return true;\n if (!folder || !rule.include) return false;\n // A partial match: each segment of the folder matches its segment of the glob, and the glob has more segments\n const parts = glob.split(\"/\");\n for (let at = 0; at < parts.length; at++) {\n const part = parts[at] ?? \"\";\n if (part === \"**\" || at >= segments.length) return true;\n if (!packRegExp(part).test(segments[at] ?? \"\")) return false;\n }\n return false;\n}\n\n/**\n * This function gives the rules that npm 11 (npm-packlist 10) makes from the field `files`. The rules are for the\n * path and its folders. npm examines each entry on the disk. At the time of the pack, the path is a file and each of its parents\n * is a folder. This function takes each other entry as a pattern, and the rules of a pattern match the path in the\n * same way.\n */\nfunction packRules(files: readonly unknown[], path: string): { readonly strict: PackRule[]; readonly loose: PackRule[] } {\n const parts = path.split(\"/\");\n const folders = new Set(parts.slice(0, -1).map((_, at) => parts.slice(0, at + 1).join(\"/\")));\n const strict: PackRule[] = [];\n const loose: PackRule[] = [];\n files.forEach((entry, index) => {\n if (typeof entry !== \"string\") return;\n let file = entry;\n if (file.startsWith(\"./\")) file = file.slice(1);\n if (file.endsWith(\"/*\")) file += \"*\";\n const inverse = `!${file}`;\n // The path that npm gives to lstat: without the `!` characters, normalized as path.join does. After normalize,\n // the path has no repeated `/`, so it has at most one `/` at the start and one at the end.\n let target = posix.normalize(file.replace(/^!+/, \"\") || \".\");\n if (target.startsWith(\"/\")) target = target.slice(1);\n if (target.endsWith(\"/\")) target = target.slice(0, -1);\n if (target === path) {\n // A file is strict: its rule goes before the strict rules of the earlier entries, so the first entry decides\n strict.unshift(packRule(inverse, index));\n } else if (folders.has(target)) {\n loose.push(packRule(inverse, index), packRule(`${inverse}/**`, index));\n } else {\n loose.push(packRule(inverse, index));\n }\n });\n return { strict, loose };\n}\n\n/**\n * This function gives the last rule that matches the path, or undefined when no rule matches it. The rule `*` of\n * npm comes first, so a path that no rule matches is not packed.\n */\nfunction lastMatch(rules: readonly PackRule[], path: string, folder: boolean): PackRule | undefined {\n let found: PackRule | undefined;\n for (const rule of rules) if (ruleMatches(rule, path, folder)) found = rule;\n return found;\n}\n\n/**\n * This function tells if npm 11 packs `path` (relative to the package, with `/`) by the field `files`. It follows\n * npm-packlist 10. First comes the rule `*`, then a rule for each entry in its order. Last come the strict rules of\n * the entries that name the file. The last rule that matches a path decides. npm does not go into a folder that it does not take.\n * The function gives the index of the entry of the rule that takes the file, or -1 when npm does not pack it.\n */\nexport function packedBy(files: readonly unknown[], path: string): number {\n const { strict, loose } = packRules(files, path);\n const rules = [...loose, ...strict];\n const parts = path.split(\"/\");\n for (let at = 1; at < parts.length; at++) {\n if (lastMatch(rules, parts.slice(0, at).join(\"/\"), true)?.include !== true) return -1;\n }\n const rule = lastMatch(rules, path, false);\n return rule?.include === true ? rule.index : -1;\n}\n\n/**\n * This function gives the text of `package.json` with the entry `negation` after the entry `index` of the field\n * `files`, in the format of the file. It gives undefined when it cannot find the field, or when the changed text does\n * not parse as the manifest with the new entry.\n */\nexport function withNegation(pkg: PackageInfo, index: number, negation: string): string | undefined {\n const files = pkg.manifest[\"files\"];\n if (!Array.isArray(files)) return undefined;\n const expected = JSON.stringify({ ...pkg.manifest, files: [...files.slice(0, index + 1), negation, ...files.slice(index + 1)] });\n const eol = pkg.text.includes(\"\\r\\n\") ? \"\\r\\n\" : \"\\n\";\n for (const field of pkg.text.matchAll(/\"files\"\\s*:\\s*\\[/g)) {\n const open = (field.index ?? 0) + field[0].length;\n // The end of each JSON string of the list, until the entry `index`\n let at = open;\n let end = -1;\n for (let item = 0; item <= index; item++) {\n const match = /^[\\s,]*(\"(?:[^\"\\\\]|\\\\.)*\")/.exec(pkg.text.slice(at));\n if (match === null) break;\n at += match[0].length;\n if (item === index) end = at;\n }\n if (end < 0) continue;\n // A list with a line for each entry gets a new line with the indent of the entry, a list on one line gets \", \"\n const multiline = (/^\\s*/.exec(pkg.text.slice(open))?.[0] ?? \"\").includes(\"\\n\");\n const indent = /^[ \\t]*/.exec(pkg.text.slice(pkg.text.lastIndexOf(\"\\n\", end - 1) + 1))?.[0] ?? \"\";\n const separator = multiline ? `,${eol}${indent}` : \", \";\n const after = `${pkg.text.slice(0, end)}${separator}${JSON.stringify(negation)}${pkg.text.slice(end)}`;\n try {\n if (JSON.stringify(JSON.parse(after)) === expected) return after;\n } catch {\n // The next field \"files\", if any\n }\n }\n return undefined;\n}\n\nexport const packNoBuildinfo: Rule = {\n id: \"pack-no-buildinfo\",\n title: \"npm does not pack the build info file of tsc: a public package that writes it in a folder of `files` has the negation `!<path>` there.\",\n reason:\n \"The build info file changes on each build, also after a bump of a dev dependency. The release stops when the packed files of an unchanged version differ from npm. On 2026-11-09 the main of splay-react went red, because only `dist/.tsbuildinfo` differed. The cue lib preset writes this file in `dist`, and `files` packs `dist`.\",\n fix: 'Add the negation of the path after its folder in `files`, for example `\"files\": [\"dist\", \"!dist/.tsbuildinfo\"]`. `conventions fix` writes it. Keep the file in `dist`: a `tsc -b` after a clean of `dist` must build again. A package with no field `files` packs each file of its folder: give it the field. A changed list of packed files needs a PATCH version.',\n sources: [\n { repo: \"splay-react\", rule: \"pack-no-buildinfo\", doc: \"package.json (files, 1.0.2)\" },\n { repo: \"splay\", rule: \"pack-no-buildinfo\", doc: \"package.json (files)\" },\n { repo: \"cue\", rule: \"pack-no-buildinfo\", doc: \"npm/package/ts.cue (files, 2.1.3)\" },\n ],\n options: {},\n failsFrom: \"2026-11-25\",\n check(context) {\n const breaks: Break[] = [];\n const unread: string[] = [];\n // The root is a published package also when the workspace has packages (splay-react and its private site)\n const all = [context.rootPackage, ...codePackages(context)];\n for (const pkg of all.filter((item, index) => all.findIndex((other) => other.file === item.file) === index)) {\n if (pkg.manifest[\"private\"] === true) continue;\n const name = String(pkg.manifest[\"name\"] ?? pkg.folder);\n const seen = new Set<string>();\n for (const config of readdirSync(pkg.dir).filter((file) => TSCONFIG.test(file)).sort()) {\n const found = buildInfoFile(join(pkg.dir, config));\n if (found === undefined) {\n unread.push(`${pkg.folder === \"\" ? \"\" : `${pkg.folder}/`}${config}`);\n continue;\n }\n if (found === null) continue;\n const path = relative(pkg.dir, found).replace(/\\\\/g, \"/\");\n // npm never packs a path outside the folder, or in node_modules\n if (path === \"\" || path.startsWith(\"../\") || isAbsolute(path) || path.split(\"/\").includes(\"node_modules\") || seen.has(path)) continue;\n seen.add(path);\n const files = pkg.manifest[\"files\"];\n const line = lineOf(pkg.text, '\"files\"');\n if (!Array.isArray(files)) {\n breaks.push({\n file: pkg.file,\n message: `${name} has no field \"files\", so npm packs ${path}, the build info file of ${config}.`,\n fix: `Give ${name} the field \"files\" with the folders that it publishes, and \"!${path}\".`,\n });\n continue;\n }\n const index = packedBy(files, path);\n if (index < 0) continue;\n // The negation after the entry stops the pack, except after an entry that names the file: the first decides\n const negated = [...files.slice(0, index + 1), `!${path}`, ...files.slice(index + 1)];\n const negationStops = packedBy(negated, path) < 0;\n const after = negationStops ? withNegation(pkg, index, `!${path}`) : undefined;\n const fix = negationStops\n ? `Add \"!${path}\" after \"${String(files[index])}\" in \"files\".`\n : `Remove the entry \"${String(files[index])}\" of \"files\": it names ${path}.`;\n breaks.push({\n file: pkg.file,\n ...(line === undefined ? {} : { line }),\n message: `npm packs ${path}, the build info file of ${config}, by the entry \"${String(files[index])}\" of \"files\" of ${name}.`,\n ...(after === undefined ? { fix } : { edits: [{ file: pkg.file, before: pkg.text, after }] }),\n });\n }\n }\n if (breaks.length === 0 && unread.length > 0) return { skipped: `The rule cannot read the extends chain of ${unread.join(\", \")}. Install the dependencies.` };\n return breaks;\n },\n};\n","/**\n * The rule `api-report-script`: a repository with a public package has the root script that checks its API reports.\n */\nimport { DEPENDENCY_FIELDS, lineOf, rootAndCodePackages, specifiersOf, type Break, type Edit, type PackageInfo, type Rule } from \"../rule.ts\";\nimport { isPublic } from \"./license-file.ts\";\n\n/** The package of the reports. */\nconst API_REPORT = \"@mark1russell7/api-report\";\n\n/** The range that the fix adds. The train moves it after that. */\nexport const API_REPORT_RANGE = \"^0.5.0\";\n\n/** The command of the script. */\nconst COMMAND = \"api-report check\";\n\n/**\n * This function gives `text` with one more entry in the block `field` of a `package.json` file. The entry goes in the\n * order of the names when `sorted` is true, else at the end. It gives undefined when the block is not on separate lines.\n */\nfunction addEntry(text: string, field: string, name: string, value: string, sorted: boolean): string | undefined {\n const eol = text.includes(\"\\r\\n\") ? \"\\r\\n\" : \"\\n\";\n const lines = text.split(/\\r?\\n/);\n const start = lines.findIndex((line) => line === ` \"${field}\": {`);\n if (start < 0) return undefined;\n const end = lines.findIndex((line, index) => index > start && /^ {2}\\},?$/.test(line));\n if (end < 0) return undefined;\n const entry = ` ${JSON.stringify(name)}: ${JSON.stringify(value)}`;\n const nameOf = (line: string): string => line.trim().slice(1).split('\"')[0] ?? \"\";\n const next = sorted ? lines.findIndex((line, index) => index > start && index < end && nameOf(line) > name) : -1;\n if (next >= 0) lines.splice(next, 0, `${entry},`);\n else {\n if (end - 1 > start) lines[end - 1] = `${lines[end - 1] ?? \"\"},`;\n lines.splice(end, 0, entry);\n }\n return lines.join(eol);\n}\n\n/** This function adds a block with one entry after the last block of the root object. */\nfunction addBlock(text: string, field: string, name: string, value: string): string | undefined {\n const eol = text.includes(\"\\r\\n\") ? \"\\r\\n\" : \"\\n\";\n const lines = text.split(/\\r?\\n/);\n const end = lines.lastIndexOf(\"}\");\n if (end < 1) return undefined;\n lines[end - 1] = `${lines[end - 1] ?? \"\"},`;\n lines.splice(end, 0, ` ${JSON.stringify(field)}: {`, ` ${JSON.stringify(name)}: ${JSON.stringify(value)}`, \" }\");\n return lines.join(eol);\n}\n\n/** This function gives the text of the root `package.json` with the script and the dependency, or undefined. */\nfunction withScript(root: PackageInfo, script: string): string | undefined {\n const add = (text: string, field: string, name: string, value: string, sorted: boolean): string | undefined =>\n root.manifest[field] === undefined ? addBlock(text, field, name, value) : addEntry(text, field, name, value, sorted);\n const scripted = add(root.text, \"scripts\", script, COMMAND, false);\n if (scripted === undefined) return undefined;\n const has = DEPENDENCY_FIELDS.some((field) => specifiersOf(root.manifest, field).some(([name]) => name === API_REPORT));\n return has ? scripted : add(scripted, \"devDependencies\", API_REPORT, API_REPORT_RANGE, true);\n}\n\nexport const apiReportScript: Rule = {\n id: \"api-report-script\",\n title: \"A repository with a public package has the root script `check:api`.\",\n reason:\n \"The shared CI starts each script of its list that `package.json` has, and it skips the others. On 2026-11-04, 8 of the 12 repositories without the script had a public package, so a change of their API had no check.\",\n fix: 'Add the script `\"check:api\": \"api-report check\"` and a dev dependency on `@mark1russell7/api-report`. Then build and start `api-report update`. The release train writes the first report in its update.',\n sources: [\n { repo: \"template\", rule: \"api-report\", doc: \"CLAUDE.md:27\" },\n { repo: \"packing\", rule: \"api-report\", doc: \"CLAUDE.md:20\" },\n { repo: \"layout-contract\", rule: \"api-report\", doc: \"CLAUDE.md:20\" },\n ],\n options: {\n script: { type: \"string\", default: \"check:api\", description: \"The root script that checks the API reports.\" },\n },\n check(context, options) {\n const script = typeof options[\"script\"] === \"string\" ? options[\"script\"] : \"check:api\";\n const published = rootAndCodePackages(context).filter(isPublic);\n if (published.length === 0) return [];\n const root = context.rootPackage;\n const value = root.manifest[\"scripts\"];\n const scripts = typeof value === \"object\" && value !== null ? (value as Record<string, unknown>) : {};\n if (typeof scripts[script] === \"string\" && scripts[script] !== \"\") return [];\n const names = published.map((pkg) => String(pkg.manifest[\"name\"] ?? pkg.folder));\n const line = lineOf(root.text, '\"scripts\"');\n const after = withScript(root, script);\n const edits: readonly Edit[] = after === undefined ? [] : [{ file: root.file, before: root.text, after }];\n const item: Break = {\n file: root.file,\n ...(line === undefined ? {} : { line }),\n message: `The root package.json has no script \"${script}\", and the repository has a public package: ${names.join(\", \")}.`,\n ...(edits.length > 0 ? { edits } : {}),\n };\n return [item];\n },\n};\n","/**\n * The rule `pages-site`: a public repository has a site. A workflow uses the Pages workflow of the template, and the\n * call deploys.\n */\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { byCode } from \"../workspace.ts\";\nimport type { Rule } from \"../rule.ts\";\nimport { WORKFLOW, blockEnd, indentOf, keyValue, workflowLines } from \"../workflow.ts\";\nimport { repositoryIsPublic } from \"./license-file.ts\";\n\n/** The Pages workflow of the template, as a call from another repository and as a call from the template itself. */\nexport const PAGES_WORKFLOWS: readonly string[] = [\"mark1russell7/template/.github/workflows/reusable-pages.yml\", \"./.github/workflows/reusable-pages.yml\"];\n\n/** A call of the Pages workflow: its line (from 1), and false when its job sets `deploy: false`. */\nexport interface PagesCall {\n readonly line: number;\n readonly deploys: boolean;\n}\n\n/** This function gives each call of a workflow of `workflows` in the text of a workflow file. The ref after `@` can be any ref. */\nexport function pagesCalls(text: string, workflows: readonly string[] = PAGES_WORKFLOWS): PagesCall[] {\n const lines = workflowLines(text);\n const names = new Set(workflows.map((name) => name.toLowerCase()));\n const calls: PagesCall[] = [];\n lines.forEach((line, index) => {\n const uses = keyValue(line, \"uses\");\n if (uses === undefined || !names.has((uses.split(\"@\")[0] ?? \"\").toLowerCase())) return;\n // The job of the call is the nearest line above it with a smaller indent\n let job = index - 1;\n while (job >= 0 && ((lines[job] ?? \"\").trim() === \"\" || indentOf(lines[job] ?? \"\") >= indentOf(line))) job -= 1;\n const body = job < 0 ? [line] : lines.slice(job, blockEnd(lines, job));\n calls.push({ line: index + 1, deploys: !body.some((text) => keyValue(text, \"deploy\") === \"false\") });\n });\n return calls;\n}\n\nexport const pagesSite: Rule = {\n id: \"pages-site\",\n title: \"A public repository has a workflow that calls the Pages workflow of the template (`reusable-pages.yml`, any ref), and the call deploys.\",\n reason:\n \"Each public project has a site with its Releases page and its Status page, so a reader sees the versions and the open work. On 2026-11-02 eight public repositories had no site: typeset, algebra, headroom, release-train, optional, ste-lint, lag-hud and template.\",\n fix: 'Add `.github/workflows/pages.yml` with a job `uses: mark1russell7/template/.github/workflows/reusable-pages.yml@<commit> # main` and the permissions of CI.md (\"Pages\"). Give `build`, `out` and `roadmap: docs/ROADMAP.md`. After the build, the job starts `site-pages build`, which adds the Releases page and the Status page. Then set the Pages source to \"GitHub Actions\": `gh api -X POST repos/<owner>/<repo>/pages -f build_type=workflow`.',\n sources: [\"vex\", \"crawler\", \"coeval\"].map((repo) => ({ repo, rule: \"pages-site\", doc: \".github/workflows/pages.yml (a call of reusable-pages.yml of the template)\" })),\n options: {\n workflows: { type: \"strings\", default: PAGES_WORKFLOWS, description: \"The workflows that deploy a site, without the ref after `@`.\" },\n },\n check(context, options) {\n const visible = repositoryIsPublic(context);\n if (visible === undefined) return { skipped: \"outside a GitHub Actions run, the rule cannot tell if the repository is public\" };\n if (!visible) return [];\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n const calls = files\n .filter((path) => WORKFLOW.test(path))\n .sort(byCode)\n .flatMap((file) => pagesCalls(readFileSync(join(context.root, file), \"utf8\"), options[\"workflows\"] as readonly string[]).map((call) => ({ file, ...call })));\n if (calls.some((call) => call.deploys)) return [];\n // A call with `deploy: false` builds a test site only, for example in actions-test.yml of the template\n const tests = calls.length === 0 ? \"\" : ` The calls in ${[...new Set(calls.map((call) => call.file))].join(\", \")} have deploy: false.`;\n return [{ file: \".github/workflows/pages.yml\", message: `The repository is public, and no workflow deploys its site with the Pages workflow of the template.${tests}` }];\n },\n};\n","/**\n * The rule `push-main-only`: a workflow that starts on `push` and on `pull_request` limits `push` to the default branch.\n * It also has `workflow_dispatch`. Then a commit of a branch with an open pull request starts one run, not two. A person\n * can still start a run on a branch with no pull request.\n */\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { byCode } from \"../workspace.ts\";\nimport type { Break, Rule, RuleContext } from \"../rule.ts\";\nimport { WORKFLOW, applySplices, blockEnd, childIndent, childKeys, indentOf, keyValue, valueOf, workflowLines, type Splice } from \"../workflow.ts\";\nimport { listItems } from \"./gate-trigger.ts\";\n\n/** The file of the release flow. A person changes it, with the rule `release-files`, so the fix does not write it. */\nconst RELEASE_FILE = \"release.yml\";\n\n/** The patterns that match each branch. */\nconst EACH_BRANCH: ReadonlySet<string> = new Set([\"*\", \"**\"]);\n\n/** A key of a block, in the quoted forms too. */\nconst KEY = /^\\s*(?:\"([^\"]*)\"|'([^']*)'|([^\\s:]+))\\s*:(\\s.*)?$/;\n\n/** A value with no filters: `{}`, `~` or `null`. */\nconst NO_FILTERS = /^(\\{\\s*\\}|~|null)$/;\n\n/** A text that shows that a workflow reads the tag of a run. */\nconst READS_TAGS = /refs\\/tags|ref_type/i;\n\n/** A workflow of the repository that a job calls. */\nconst LOCAL_CALL = /uses:\\s*[\"']?\\.\\/(\\.github\\/workflows\\/[^\\s\"'@]+)/g;\n\n/** A text that names a branch: `refs/heads/<branch>`, or `ref_name == '<branch>'`. */\nconst NAMED_BRANCH = /refs\\/heads\\/([\\w./-]+)|ref_name\\s*[!=]=\\s*[\"']([^\"']+)[\"']/gi;\n\n/** A trigger of a workflow: its name, the index of its line, and the text after its key. */\ninterface Trigger {\n readonly name: string;\n readonly at: number;\n readonly value: string;\n}\n\n/** The triggers of a workflow, with the form of `on`: a key on each line, a block list, `on: [a, b]`, or `on: { a: ... }`. */\ninterface Triggers {\n readonly form: \"keys\" | \"items\" | \"flow\" | \"map\";\n readonly on: number;\n /** The index after the last line of a flow value. */\n readonly end: number;\n readonly list: readonly Trigger[];\n}\n\n/** A filter of a trigger: its key, its lines and its values. The values are undefined when the rule cannot read them. */\ninterface Filter {\n readonly key: string;\n readonly at: number;\n readonly end: number;\n readonly items: readonly string[] | undefined;\n}\n\n/** The branches that the rule accepts, and the text of the workflows that a workflow calls. */\ninterface Facts {\n readonly branch: string;\n readonly more: readonly string[];\n readonly called: (text: string) => string;\n}\n\n/** A break of a workflow. */\ninterface Finding {\n readonly lines: readonly string[];\n readonly triggers: Triggers;\n readonly push: Trigger;\n readonly filters: readonly Filter[];\n /** The value `true` tells that `push` starts on more branches than the rule accepts. */\n readonly wide: boolean;\n /** The value `true` tells that the workflow has no `workflow_dispatch`. */\n readonly noDispatch: boolean;\n}\n\n/** This function tells if the brackets of a flow value are closed. */\nfunction closed(text: string): boolean {\n let depth = 0;\n let quote = \"\";\n for (const char of text) {\n if (quote !== \"\") {\n if (char === quote) quote = \"\";\n } else if (char === '\"' || char === \"'\") quote = char;\n else if (char === \"[\" || char === \"{\") depth += 1;\n else if (char === \"]\" || char === \"}\") depth -= 1;\n }\n return depth <= 0;\n}\n\n/** This function gives the whole text of a flow value that starts on the line `index`, and the index after its last line. */\nfunction flowValue(lines: readonly string[], index: number, value: string): { text: string; end: number } {\n let text = value;\n let end = index + 1;\n while (!closed(text) && end < lines.length) {\n text += ` ${valueOf(lines[end] ?? \"\")}`;\n end += 1;\n }\n return { text, end };\n}\n\n/** This function splits the text in the outer brackets of a flow value, at each comma of the first level. */\nfunction flowParts(text: string): string[] {\n const parts: string[] = [];\n let depth = 0;\n let quote = \"\";\n let part = \"\";\n for (const char of text.slice(1, -1)) {\n if (quote !== \"\") {\n if (char === quote) quote = \"\";\n } else if (char === '\"' || char === \"'\") quote = char;\n else if (char === \"[\" || char === \"{\") depth += 1;\n else if (char === \"]\" || char === \"}\") depth -= 1;\n else if (char === \",\" && depth === 0) {\n parts.push(part);\n part = \"\";\n continue;\n }\n part += char;\n }\n parts.push(part);\n return parts.map((item) => item.trim()).filter((item) => item !== \"\");\n}\n\n/** This function gives the key and the value of an entry of a flow map. */\nfunction flowEntry(part: string): { key: string; value: string } {\n const colon = part.search(/:(\\s|$)/);\n return colon < 0 ? { key: valueOf(part), value: \"\" } : { key: valueOf(part.slice(0, colon)), value: valueOf(part.slice(colon + 1)) };\n}\n\n/** This function gives the key and the value of a line of a block. */\nfunction keyOf(line: string): { key: string; value: string } | undefined {\n const found = KEY.exec(line);\n if (found === null) return undefined;\n return { key: found[1] ?? found[2] ?? found[3] ?? \"\", value: valueOf(found[4] ?? \"\") };\n}\n\nconst isItem = (line: string): boolean => line.trimStart().startsWith(\"- \");\n\n/** This function reads the triggers of a workflow, in each form of `on`. */\nfunction readTriggers(lines: readonly string[]): Triggers | undefined {\n const on = lines.findIndex((line) => indentOf(line) === 0 && keyValue(line, \"on\") !== undefined);\n if (on < 0) return undefined;\n const value = keyValue(lines[on] ?? \"\", \"on\") ?? \"\";\n if (value === \"\") {\n const next = lines.findIndex((line, index) => index > on && line.trim() !== \"\");\n const first = lines[next] ?? \"\";\n if (next >= 0 && isItem(first)) {\n const list: Trigger[] = [];\n for (let index = next; index < lines.length; index++) {\n const line = lines[index] ?? \"\";\n if (line.trim() === \"\") continue;\n if (!isItem(line) || indentOf(line) !== indentOf(first)) break;\n list.push({ name: valueOf(line.trimStart().slice(2)), at: index, value: \"\" });\n }\n return { form: \"items\", on, end: on + 1, list };\n }\n const list = childKeys(lines, on).flatMap((at) => {\n const entry = keyOf(lines[at] ?? \"\");\n return entry === undefined ? [] : [{ name: entry.key, at, value: entry.value }];\n });\n return { form: \"keys\", on, end: on + 1, list };\n }\n const flow = flowValue(lines, on, value);\n if (value.startsWith(\"[\")) return { form: \"flow\", on, end: flow.end, list: flowParts(flow.text).map((part) => ({ name: valueOf(part), at: on, value: \"\" })) };\n if (value.startsWith(\"{\")) {\n const list = flowParts(flow.text).map((part) => {\n const entry = flowEntry(part);\n return { name: entry.key, at: on, value: entry.value };\n });\n return { form: \"map\", on, end: flow.end, list };\n }\n return { form: \"flow\", on, end: on + 1, list: [{ name: value, at: on, value: \"\" }] };\n}\n\n/** This function gives the filters of a trigger, in the block form and in the flow form. */\nfunction filtersOf(lines: readonly string[], trigger: Trigger): Filter[] {\n if (trigger.value.startsWith(\"{\")) {\n const flow = flowValue(lines, trigger.at, trigger.value);\n return flowParts(flow.text).map((part) => {\n const entry = flowEntry(part);\n const items = entry.value.startsWith(\"[\") ? flowParts(entry.value).map(valueOf) : [entry.value];\n return { key: entry.key, at: trigger.at, end: flow.end, items };\n });\n }\n if (trigger.value !== \"\") return [];\n return childKeys(lines, trigger.at).flatMap((at) => {\n const entry = keyOf(lines[at] ?? \"\");\n if (entry === undefined) return [];\n const list = listItems(lines, at, entry.value);\n if (list !== undefined) return [{ key: entry.key, at, end: list.end, items: list.items }];\n return [{ key: entry.key, at, end: at + 1, items: /^[[{]/.test(entry.value) ? undefined : [entry.value] }];\n });\n}\n\n/** This function gives the break of a workflow, or undefined when the rule leaves the workflow alone. */\nfunction findBreak(text: string, facts: Facts): Finding | undefined {\n const lines = workflowLines(text);\n const triggers = readTriggers(lines);\n if (triggers === undefined) return undefined;\n const push = triggers.list.find((trigger) => trigger.name === \"push\");\n const pull = triggers.list.find((trigger) => trigger.name === \"pull_request\");\n if (push === undefined || pull === undefined) return undefined;\n // A pull request trigger that does not start on a new commit does not run the commit two times\n const types = filtersOf(lines, pull).find((filter) => filter.key === \"types\");\n if (types?.items !== undefined && !types.items.includes(\"synchronize\")) return undefined;\n const filters = filtersOf(lines, push);\n const has = (key: string): Filter | undefined => filters.find((filter) => filter.key === key);\n const branches = has(\"branches\");\n // With only a tag filter, GitHub starts the workflow on tags and on no branch\n if (branches === undefined && has(\"branches-ignore\") === undefined && (has(\"tags\") ?? has(\"tags-ignore\")) !== undefined) return undefined;\n const allowed = [facts.branch, ...facts.more];\n const items = branches?.items;\n const wide = items === undefined || items.length === 0 || !items.every((item) => allowed.includes(item));\n const noDispatch = !triggers.list.some((trigger) => trigger.name === \"workflow_dispatch\");\n if (!wide && !noDispatch) return undefined;\n return { lines, triggers, push, filters, wide, noDispatch };\n}\n\n/** This function gives the reason why a person must change the workflow, or undefined when the fix can write it. */\nfunction refusal(file: string, text: string, finding: Finding, facts: Facts): string | undefined {\n if (file.slice(file.lastIndexOf(\"/\") + 1) === RELEASE_FILE) return `${RELEASE_FILE} belongs to the release flow`;\n const { triggers, filters, wide } = finding;\n if (triggers.form === \"map\") return \"on has the flow form of a map\";\n if (triggers.end > triggers.on + 1) return \"on is a flow value of more than one line\";\n if (!wide) return undefined;\n if (filters.some((filter) => filter.key === \"branches-ignore\")) return \"on.push has branches-ignore, and only a person can tell which ignored branches stay\";\n const allowed = [facts.branch, ...facts.more];\n const branches = filters.find((filter) => filter.key === \"branches\");\n if (branches !== undefined) {\n if (branches.items === undefined) return \"the rule cannot read on.push.branches\";\n if (branches.at === finding.push.at) return \"on.push.branches is in the flow form of a map\";\n const named = branches.items.filter((item) => !EACH_BRANCH.has(item) && !allowed.includes(item));\n if (named.length > 0 || branches.items.length === 0) return `on.push.branches names ${named.join(\", \") || \"no branch\"}. Remove them, or add them to the option branches of the rule`;\n }\n const others = [...`${workflowLines(text).join(\"\\n\")}\\n${facts.called(text)}`.matchAll(NAMED_BRANCH)].map((match) => match[1] ?? match[2] ?? \"\").filter((name) => !allowed.includes(name));\n if (others.length > 0) return `the workflow reads the branch ${[...new Set(others)].join(\", \")}, so a limit on push can stop a job`;\n return undefined;\n}\n\n/** This function gives a comment at the end of a line, with its space, or an empty text. */\nconst commentOf = (line: string): string => /\\s+#.*$/.exec(line)?.[0] ?? \"\";\n\n/** This function writes the fix of a break: the new filter of `push`, and `workflow_dispatch`. Each other line stays. */\nfunction convert(text: string, file: string, finding: Finding, facts: Facts): string {\n const { lines, triggers, push, filters, wide, noDispatch } = finding;\n const original = text.split(/\\r?\\n/);\n const branches = filters.find((filter) => filter.key === \"branches\");\n // A push with no branch filter also starts on tags. A workflow that reads the tag keeps that start\n const tags = wide && branches === undefined && READS_TAGS.test(`${workflowLines(text).join(\"\\n\")}\\n${facts.called(text)}`);\n const limit = `branches: [${facts.branch}]`;\n const limits = (pad: string): string[] => (wide ? [`${pad}${limit}`, ...(tags ? [`${pad}tags: [\"**\"]`] : [])] : []);\n const name = file.slice(file.lastIndexOf(\"/\") + 1);\n const dispatch = (pad: string): string[] => (noDispatch ? [`${pad}# A person starts a run on a branch with no pull request: gh workflow run ${name} --ref <branch>`, `${pad}workflow_dispatch:`] : []);\n const splices: Splice[] = [];\n\n if (triggers.form === \"flow\") {\n const line = original[triggers.on] ?? \"\";\n const body = triggers.list.flatMap((trigger) => [` ${trigger.name}:`, ...(trigger === push ? limits(\" \") : [])]);\n splices.push({ at: triggers.on, remove: 1, insert: [`${line.slice(0, line.indexOf(\":\") + 1)}${commentOf(line)}`, ...body, ...dispatch(\" \")] });\n } else if (triggers.form === \"items\") {\n const pad = \" \".repeat(Math.max(indentOf(lines[triggers.list[0]?.at ?? 0] ?? \"\"), 2));\n for (const trigger of triggers.list) {\n splices.push({ at: trigger.at, remove: 1, insert: [`${pad}${trigger.name}:${commentOf(original[trigger.at] ?? \"\")}`, ...(trigger === push ? limits(`${pad} `) : [])] });\n }\n splices.push({ at: (triggers.list.at(-1)?.at ?? triggers.on) + 1, remove: 0, insert: dispatch(pad) });\n } else {\n const line = original[push.at] ?? \"\";\n const pad = indentOf(lines[push.at] ?? \"\");\n const inner = \" \".repeat(childIndent(lines, push.at) ?? pad + Math.max(pad - indentOf(lines[triggers.on] ?? \"\"), 2));\n if (wide && branches !== undefined) {\n splices.push({ at: branches.at, remove: branches.end - branches.at, insert: [`${\" \".repeat(indentOf(lines[branches.at] ?? \"\"))}${limit}${commentOf(original[branches.at] ?? \"\")}`] });\n } else if (wide && push.value !== \"\" && !NO_FILTERS.test(push.value)) {\n const added = [limit, ...(tags ? ['tags: [\"**\"]'] : [])].join(\", \");\n splices.push({ at: push.at, remove: 1, insert: [line.replace(/\\{\\s*/, () => `{ ${added}, `)] });\n } else if (wide) {\n splices.push({ at: push.at, remove: 1, insert: [line.replace(/:\\s+(\\{\\s*\\}|~|null)/, \":\"), ...limits(inner)] });\n }\n const last = triggers.list.at(-1)?.at ?? triggers.on;\n let end = blockEnd(lines, last);\n while (end > last + 1 && (lines[end - 1] ?? \"\").trim() === \"\") end -= 1;\n splices.push({ at: end, remove: 0, insert: dispatch(\" \".repeat(pad)) });\n }\n return applySplices(text, splices);\n}\n\n/** This function gives the default branch: the event file of GitHub Actions, the `HEAD` of the remote, or else `main`. */\nexport function defaultBranch(context: RuleContext): string {\n const file = context.env[\"GITHUB_EVENT_PATH\"];\n if (file !== undefined && file !== \"\") {\n try {\n const branch = (JSON.parse(readFileSync(file, \"utf8\")) as { repository?: { default_branch?: unknown } }).repository?.default_branch;\n if (typeof branch === \"string\" && branch !== \"\") return branch;\n } catch {\n // A missing or a wrong event file gives the next source\n }\n }\n const head = context.git([\"symbolic-ref\", \"--quiet\", \"--short\", \"refs/remotes/origin/HEAD\"])?.trim();\n return head === undefined || head === \"\" ? \"main\" : head.replace(/^origin\\//, \"\");\n}\n\nexport const pushMainOnly: Rule = {\n id: \"push-main-only\",\n title: \"A workflow that starts on push and on pull_request limits push to the default branch with branches, and has workflow_dispatch.\",\n reason:\n \"A commit on a branch with an open pull request starts such a workflow two times: one run for push and one run for pull_request. On 2026-11-04 the CI queue held about 263 jobs, and a rough estimate puts about 65 of them in such second runs. The run for pull_request gives the required checks, so the run for push adds nothing. With workflow_dispatch, a person can still start a run on a branch with no pull request.\",\n fix: 'Add `branches: [<default branch>]` under `on.push`, and add `workflow_dispatch:` under `on` (CI.md, \"One run for each commit\"). A push with only a tag filter, or a pull request trigger with no `synchronize`, is not a break. For a long-lived branch, add the branch to the option branches.',\n sources: [\n { repo: \"template\", rule: \"push-main-only\", doc: \".github/workflows/security.yml (push has branches: [main], and the file has workflow_dispatch)\" },\n { repo: \"crawler\", rule: \"push-main-only\", doc: \".github/workflows/ci.yml (push has branches: [main], and the file has workflow_dispatch)\" },\n { repo: \"systems\", rule: \"push-main-only\", doc: \".github/workflows/process.yml (push has branches: [main], and the file has workflow_dispatch)\" },\n ],\n options: {\n branches: { type: \"strings\", default: [], description: \"More branches that `on.push.branches` can name, for example a long-lived release branch.\" },\n },\n check(context, options) {\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n const workflows = files.filter((path) => WORKFLOW.test(path)).sort(byCode);\n if (workflows.length === 0) return { skipped: \"the repository has no workflow\" };\n const read = (file: string): string => {\n try {\n return readFileSync(join(context.root, file), \"utf8\");\n } catch {\n return \"\";\n }\n };\n const facts: Facts = {\n branch: defaultBranch(context),\n more: Array.isArray(options[\"branches\"]) ? (options[\"branches\"] as readonly string[]) : [],\n called: (text) => [...text.matchAll(LOCAL_CALL)].map((match) => workflowLines(read(match[1] ?? \"\")).join(\"\\n\")).join(\"\\n\"),\n };\n const breaks: Break[] = [];\n for (const file of workflows) {\n const text = read(file);\n const finding = findBreak(text, facts);\n if (finding === undefined) continue;\n const parts = [\n ...(finding.wide ? [`push starts on more branches than ${[facts.branch, ...facts.more].join(\", \")}, so a commit of a pull request starts it two times`] : []),\n ...(finding.noDispatch ? [\"it has no workflow_dispatch, so a person cannot start a run on a branch\"] : []),\n ];\n const reason = refusal(file, text, finding, facts);\n const after = reason === undefined ? convert(text, file, finding, facts) : undefined;\n breaks.push({\n file,\n line: finding.push.at + 1,\n message: `${file} starts on push and on pull_request: ${parts.join(\", and \")}.`,\n ...(after !== undefined && findBreak(after, facts) === undefined ? { edits: [{ file, before: text, after }] } : { fix: `A person must change it, because ${reason ?? \"the fix does not end the break\"}. ${pushMainOnly.fix}` }),\n });\n }\n return breaks;\n },\n};\n","/**\n * The rule `runner-budget`: the workflows share the runners of the account. Each matrix has a `max-parallel`, each\n * workflow has a concurrency group, and each schedule starts at the minute of its repository and file.\n */\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { cronLines } from \"@mark1russell7/site-pages\";\nimport { byCode } from \"../workspace.ts\";\nimport { replaceLine, type Break, type Edit, type Rule } from \"../rule.ts\";\nimport { WORKFLOW, blockEnd, childIndent, indentOf, keyValue, workflowLines } from \"../workflow.ts\";\n\n/**\n * This function gives the minute (1 to 59) of the schedules of a workflow: the FNV-1a hash of the repository and the\n * file. Two repositories with the same workflow thus start at different minutes, and no schedule starts at minute 0,\n * where GitHub has the most load.\n */\nexport function scheduleMinute(repository: string, file: string): number {\n let hash = 0x811c9dc5;\n for (const char of `${repository.toLowerCase()}/${file}`) {\n hash ^= char.codePointAt(0) ?? 0;\n hash = Math.imul(hash, 0x01000193) >>> 0;\n }\n return (hash % 59) + 1;\n}\n\n/** This function gives `owner/name` from a git remote URL, or undefined for a URL that is not of GitHub. */\nexport function repositoryOfRemote(url: string): string | undefined {\n const text = url.trim();\n for (const prefix of [\"git@github.com:\", \"ssh://git@github.com/\", \"https://github.com/\", \"http://github.com/\", \"git+https://github.com/\"]) {\n if (!text.startsWith(prefix)) continue;\n let rest = text.slice(prefix.length);\n if (rest.endsWith(\"/\")) rest = rest.slice(0, -1);\n if (rest.endsWith(\".git\")) rest = rest.slice(0, -4);\n const parts = rest.split(\"/\");\n return parts.length === 2 && parts.every((part) => part !== \"\") ? rest : undefined;\n }\n return undefined;\n}\n\n/** This function tells if a workflow is a shared workflow (`on: workflow_call`). Its caller gives the concurrency group. */\nfunction isShared(lines: readonly string[]): boolean {\n return lines.some((line) => {\n const text = line.trimStart();\n return text.startsWith(\"workflow_call:\") || text === \"workflow_call\" || text === \"- workflow_call\" || (text.startsWith(\"on:\") && text.includes(\"workflow_call\"));\n });\n}\n\n/** A job of a workflow: its name, its line (from 1), its keys with their values, and its concurrency group. */\ninterface Job {\n readonly name: string;\n readonly line: number;\n readonly grouped: boolean;\n /** The file name of the shared workflow that the job calls (`uses: .../.github/workflows/<name>`), if any. */\n readonly calls?: string;\n}\n\n/** This function gives the jobs of a workflow. */\nfunction jobsOf(lines: readonly string[]): Job[] {\n const jobs = lines.findIndex((line) => indentOf(line) === 0 && line.startsWith(\"jobs:\"));\n if (jobs < 0) return [];\n const jobIndent = childIndent(lines, jobs);\n const end = blockEnd(lines, jobs);\n const found: Job[] = [];\n for (let i = jobs + 1; i < end; i++) {\n const line = lines[i] ?? \"\";\n if (line.trim() === \"\" || indentOf(line) !== jobIndent) continue;\n const keyIndent = childIndent(lines, i);\n const keys = lines.slice(i + 1, blockEnd(lines, i)).filter((text) => indentOf(text) === keyIndent);\n const uses = keys.map((text) => keyValue(text, \"uses\")).find((value) => value !== undefined);\n const marker = \".github/workflows/\";\n const at = uses === undefined ? -1 : uses.indexOf(marker);\n const calls = uses === undefined || at < 0 ? undefined : (uses.slice(at + marker.length).split(\"@\")[0] ?? \"\");\n found.push({ name: line.trim().replace(/:$/, \"\"), line: i + 1, grouped: keys.some((text) => keyValue(text, \"concurrency\") !== undefined), ...(calls === undefined ? {} : { calls }) });\n }\n return found;\n}\n\nconst hasTopGroup = (lines: readonly string[]): boolean => lines.some((line) => indentOf(line) === 0 && line.startsWith(\"concurrency:\"));\n\n/**\n * This function gives the edit that adds a concurrency group at the top of a workflow, before `jobs:`. A new run of a pull\n * request stops the old run. A run of another event has the group of its commit, so that no release or scheduled run stops.\n */\nfunction groupEdits(file: string, text: string, lines: readonly string[]): Edit[] {\n const jobs = lines.findIndex((line) => indentOf(line) === 0 && line.startsWith(\"jobs:\"));\n if (jobs < 0) return [];\n const pad = \" \".repeat(childIndent(lines, jobs) ?? 2);\n const original = text.split(/\\r?\\n/)[jobs] ?? \"jobs:\";\n const group = [\"concurrency:\", pad + \"group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}\", pad + \"cancel-in-progress: ${{ github.event_name == 'pull_request' }}\", \"\", original];\n return [{ file, before: text, after: replaceLine(text, jobs + 1, group) }];\n}\n\n/**\n * This function gives the breaks of the concurrency groups. A workflow with no group at the top needs one in each job.\n * A job that calls a shared workflow of `grouped` gets its group from the jobs of that workflow. A shared workflow gets\n * its group from its caller, but a shared workflow of `grouped` has a group in each job.\n */\nfunction concurrencyBreaks(file: string, text: string, lines: readonly string[], grouped: readonly string[]): Break[] {\n const name = file.slice(file.lastIndexOf(\"/\") + 1);\n const jobs = jobsOf(lines);\n if (isShared(lines)) {\n if (!grouped.includes(name)) return [];\n return jobs.filter((job) => !job.grouped).map((job) => ({ file, line: job.line, message: `${file}: the job ${job.name} has no concurrency group, and its callers rely on it (the option grouped).` }));\n }\n if (hasTopGroup(lines)) return [];\n const missing = jobs.filter((job) => !job.grouped && !(job.calls !== undefined && grouped.includes(job.calls)));\n const edits = missing.length === 0 ? [] : groupEdits(file, text, lines);\n return missing.map((job) => ({ file, line: job.line, message: `${file}: the job ${job.name} has no concurrency group, and the workflow has none.`, edits }));\n}\n\n/** This function gives the breaks of the matrices: each `strategy` with a `matrix` has a `max-parallel` of `limit` or less. */\nfunction matrixBreaks(file: string, text: string, lines: readonly string[], limit: number): Break[] {\n const breaks: Break[] = [];\n const originals = text.split(/\\r?\\n/);\n lines.forEach((line, index) => {\n if (keyValue(line, \"strategy\") === undefined) return;\n const keyIndent = childIndent(lines, index);\n if (keyIndent === undefined) return;\n const keys: number[] = [];\n for (let i = index + 1; i < blockEnd(lines, index); i++) if ((lines[i] ?? \"\").trim() !== \"\" && indentOf(lines[i] ?? \"\") === keyIndent) keys.push(i);\n if (!keys.some((i) => keyValue(lines[i] ?? \"\", \"matrix\") !== undefined)) return;\n const at = keys.find((i) => keyValue(lines[i] ?? \"\", \"max-parallel\") !== undefined);\n const raw = at === undefined ? undefined : keyValue(lines[at] ?? \"\", \"max-parallel\");\n const value = raw === undefined ? Number.NaN : Number(raw);\n const wanted = `${\" \".repeat(keyIndent)}max-parallel: ${String(limit)}`;\n if (at === undefined || raw === undefined) {\n const after = replaceLine(text, index + 1, [originals[index] ?? line, wanted]);\n breaks.push({ file, line: index + 1, message: `${file}: a matrix has no max-parallel.`, edits: [{ file, before: text, after }] });\n } else if (!Number.isInteger(value) || value < 1 || value > limit) {\n const after = replaceLine(text, at + 1, [wanted]);\n breaks.push({ file, line: index + 1, message: `${file}: a matrix has max-parallel ${raw}, and the most is ${String(limit)}.`, edits: [{ file, before: text, after }] });\n }\n });\n return breaks;\n}\n\n/**\n * This function gives the minute field of a schedule that starts `perHour` times in each hour, at equal steps. One start is at\n * `minute`: `\"18\"` for 1, `\"18,48\"` for 2. The list is in the order of the numbers.\n */\nexport function minuteField(minute: number, perHour: number): string {\n const step = 60 / perHour;\n return Array.from({ length: perHour }, (_, k) => (minute + k * step) % 60)\n .sort((a, b) => a - b)\n .join(\",\");\n}\n\n/** This function gives the number of starts in each hour of a minute field (`\"*\\/30\"` or `\"5,35\"` give 2), or 1 when it cannot tell. */\nfunction startsPerHour(field: string): number {\n const step = /^\\*\\/(\\d+)$/.exec(field);\n const count = step ? 60 / Number(step[1]) : field.split(\",\").length;\n // Only a number of starts that divides the hour gives equal steps.\n return Number.isInteger(count) && count >= 1 && 60 % count === 0 ? count : 1;\n}\n\n/**\n * This function gives the breaks of the schedules: the minute of each `cron` is the minute of the repository and the file. A\n * schedule that starts more than once in each hour starts at equal steps from that minute (`18,48` for each 30 minutes).\n */\nfunction cronBreaks(file: string, text: string, minute: number): Break[] {\n const breaks: Break[] = [];\n const originals = text.split(/\\r?\\n/);\n for (const { line, cron: value } of cronLines(text)) {\n const fields = value.split(\" \").filter((field) => field !== \"\");\n const wanted = minuteField(minute, startsPerHour(fields[0] ?? \"\"));\n if (fields[0] === wanted) continue;\n const expected = [wanted, ...fields.slice(1)].join(\" \");\n const original = originals[line - 1] ?? \"\";\n const edits: Edit[] = original.includes(value) ? [{ file, before: text, after: replaceLine(text, line, [original.replace(value, () => expected)]) }] : [];\n breaks.push({ file, line, message: `${file}: the schedule \"${value}\" starts at minute ${fields[0] ?? \"?\"}, and the minute of this repository and file is ${String(minute)}.`, fix: `cron: \"${expected}\"`, edits });\n }\n return breaks;\n}\n\nexport const runnerBudget: Rule = {\n id: \"runner-budget\",\n title: \"Each matrix has a max-parallel of 3 or less, each workflow has a concurrency group, and each schedule starts at the minute that the repository and the file give.\",\n reason:\n \"All repositories of the account share 40 runners, and heavy work keeps at most 28 of them. On 2026-10-30, a matrix with no max-parallel and the sync pull requests of about 20 repositories filled 39 of the 40 runners, with 88 jobs in the queue. Each repository copied the weekly scan at `23 5 * * 1`, so all scans started at the same minute. A workflow with no concurrency group starts a new run on each push, and the old runs keep their runners.\",\n fix: \"Add `max-parallel: 3` (or less) under `strategy`. Add a concurrency group at the top of the workflow (`concurrency: { group: <name>-${{ github.event_name == 'pull_request' && github.ref || github.sha }}, cancel-in-progress: ${{ github.event_name == 'pull_request' }} }`), or in each job. Change the minute of each `cron` to the minute that the message gives; the hour and the days stay.\",\n sources: [{ repo: \"private\", rule: \"runner-slots\", doc: \"docs/STRATEGY.md (2026-10-30, the runner slots: a cap of 40, heavy work at most 28)\" }],\n options: {\n maxParallel: { type: \"number\", default: 3, description: \"The largest max-parallel of a matrix.\" },\n minute: { type: \"boolean\", default: true, description: \"When false, the rule does not examine the minute of the schedules.\" },\n grouped: {\n type: \"strings\",\n default: [\"reusable-ai-review.yml\", \"reusable-codex-review.yml\"],\n description: \"The shared workflows that give a concurrency group in each of their jobs. A job that calls one needs no group of its own.\",\n },\n },\n check(context, options) {\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n const workflows = files.filter((path) => WORKFLOW.test(path)).sort(byCode);\n if (workflows.length === 0) return { skipped: \"the repository has no workflow\" };\n const remote = context.git([\"remote\", \"get-url\", \"origin\"]);\n const repository = context.env[\"GITHUB_REPOSITORY\"] ?? (remote === undefined ? undefined : repositoryOfRemote(remote));\n const limit = Number(options[\"maxParallel\"]);\n const grouped = Array.isArray(options[\"grouped\"]) ? (options[\"grouped\"] as readonly string[]) : [];\n const breaks: Break[] = [];\n for (const file of workflows) {\n let text: string;\n try {\n text = readFileSync(join(context.root, file), \"utf8\");\n } catch {\n continue;\n }\n const lines = workflowLines(text);\n breaks.push(...matrixBreaks(file, text, lines, limit), ...concurrencyBreaks(file, text, lines, grouped));\n if (options[\"minute\"] !== false) {\n const schedules = cronLines(text).length > 0;\n if (schedules && repository === undefined) breaks.push({ file, message: `${file} has a schedule, and the rule cannot find the repository (GITHUB_REPOSITORY, or a GitHub URL of the remote origin).` });\n else if (repository !== undefined) breaks.push(...cronBreaks(file, text, scheduleMinute(repository, file)));\n }\n }\n return breaks;\n },\n};\n","/**\n * The rule `pages-after-release`: a repository that publishes a package and deploys a site starts its Pages workflow\n * after each release, and each day. Without this, the Releases page is behind npm until the next push.\n */\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { cronLines } from \"@mark1russell7/site-pages\";\nimport { byCode } from \"../workspace.ts\";\nimport type { Break, Rule, RuleContext } from \"../rule.ts\";\nimport { WORKFLOW, applySplices, blockEnd, childIndent, childKeys, indentOf, keyValue, workflowLines, type Splice } from \"../workflow.ts\";\nimport { listItems } from \"./gate-trigger.ts\";\nimport { PAGES_WORKFLOWS, pagesCalls } from \"./pages-site.ts\";\nimport { defaultBranch } from \"./push-main-only.ts\";\nimport { repositoryOfRemote, scheduleMinute } from \"./runner-budget.ts\";\n\n/** The file of the release flow. */\nconst RELEASE_FILE = \".github/workflows/release.yml\";\n\n/** The hour (UTC) of a daily build that the fix adds. */\nconst DAILY_HOUR = 5;\n\n/** A job that deploys a site with its own steps, and not with the Pages workflow of the template. */\nconst OWN_DEPLOY = /^\\s*(?:-\\s*)?uses:\\s*[\"']?actions\\/deploy-pages@/m;\n\n/** This function tells if a line is the key `on` at the top of a workflow. */\nconst onKey = (line: string): boolean => indentOf(line) === 0 && /^[\"']?on[\"']?\\s*:/.test(line);\n\n/** This function gives the name of a workflow: its key `name` at the top of the file. */\nfunction workflowName(text: string): string | undefined {\n for (const line of workflowLines(text)) {\n if (indentOf(line) !== 0) continue;\n const name = keyValue(line, \"name\");\n if (name !== undefined && name !== \"\") return name;\n }\n return undefined;\n}\n\n/** This function tells if a cron line starts on each day of each month. */\nexport function isDaily(cron: string): boolean {\n const fields = cron.split(\" \").filter((field) => field !== \"\");\n return fields.length === 5 && fields.slice(2).every((field) => field === \"*\");\n}\n\n/** The two triggers that the rule needs, as the rule reads them from a workflow. */\nexport interface PagesTriggers {\n /** The value `true` tells that the file starts after a run of the release workflow. */\n readonly afterRelease: boolean;\n /** The value `true` tells that the file has a schedule with a start on each day. */\n readonly daily: boolean;\n}\n\n/** This function gives the index of the key `name` under the key `on`, or undefined. */\nfunction triggerKey(lines: readonly string[], on: number, name: string): number | undefined {\n return childKeys(lines, on).find((index) => keyValue(lines[index] ?? \"\", name) !== undefined);\n}\n\n/** This function gives the workflows that the trigger `workflow_run` names, or undefined when the rule cannot read them. */\nfunction runWorkflows(lines: readonly string[], on: number): { at: number; items: readonly string[] } | undefined {\n const run = triggerKey(lines, on, \"workflow_run\");\n if (run === undefined) return undefined;\n const at = childKeys(lines, run).find((index) => keyValue(lines[index] ?? \"\", \"workflows\") !== undefined);\n if (at === undefined) return undefined;\n const list = listItems(lines, at, keyValue(lines[at] ?? \"\", \"workflows\") ?? \"\");\n return list === undefined ? undefined : { at, items: list.items };\n}\n\n/** This function reads the two triggers of the text of a workflow. A form of `on` on one line has neither. */\nexport function pagesTriggers(text: string, release: string = \"Release\"): PagesTriggers {\n const lines = workflowLines(text);\n const on = lines.findIndex(onKey);\n const daily = cronLines(text).some(({ cron }) => isDaily(cron));\n if (on < 0) return { afterRelease: false, daily };\n return { afterRelease: runWorkflows(lines, on)?.items.includes(release) === true, daily };\n}\n\n/** The facts of a repository that the fix writes. */\ninterface FixFacts {\n readonly release: string;\n readonly branch: string;\n /** The minute of the schedules of this file, or undefined when the rule cannot find the repository. */\n readonly minute: number | undefined;\n}\n\n/** This function gives the index after the last line with text of the block of the key at `index`. */\nfunction blockTextEnd(lines: readonly string[], index: number): number {\n let end = blockEnd(lines, index);\n while (end > index + 1 && (lines[end - 1] ?? \"\").trim() === \"\") end -= 1;\n return end;\n}\n\n/** This function gives the text with the missing triggers, or undefined when the fix cannot write them. */\nexport function addPagesTriggers(text: string, facts: FixFacts): string | undefined {\n const lines = workflowLines(text);\n const on = lines.findIndex(onKey);\n if (on < 0 || (keyValue(lines[on] ?? \"\", \"on\") ?? \"\") !== \"\") return undefined;\n const keys = childKeys(lines, on);\n const first = keys[0];\n if (first === undefined) return undefined;\n const pad = \" \".repeat(indentOf(lines[first] ?? \"\"));\n const inner = `${pad} `;\n const splices: Splice[] = [];\n const found = pagesTriggers(text, facts.release);\n if (!found.afterRelease) {\n const run = triggerKey(lines, on, \"workflow_run\");\n if (run === undefined) {\n const after = triggerKey(lines, on, \"push\") ?? keys.at(-1) ?? first;\n splices.push({\n at: blockTextEnd(lines, after),\n remove: 0,\n insert: [`${pad}# After a release, so that the Releases page has the new version`, `${pad}workflow_run:`, `${inner}workflows: [${facts.release}]`, `${inner}types: [completed]`, `${inner}branches: [${facts.branch}]`],\n });\n } else {\n const named = runWorkflows(lines, on);\n if (named === undefined) return undefined;\n const value = keyValue(lines[named.at] ?? \"\", \"workflows\") ?? \"\";\n if (value === \"\") {\n const end = blockTextEnd(lines, named.at);\n splices.push({ at: end, remove: 0, insert: [`${\" \".repeat(indentOf(lines[end - 1] ?? \"\"))}- ${facts.release}`] });\n } else {\n const original = text.split(/\\r?\\n/)[named.at] ?? \"\";\n // The first bracket closes the list. A later one is in a comment.\n const close = original.indexOf(\"]\");\n if (close < 0) return undefined;\n splices.push({ at: named.at, remove: 1, insert: [`${original.slice(0, close)}, ${facts.release}${original.slice(close)}`] });\n }\n }\n }\n if (!found.daily) {\n if (facts.minute === undefined) return undefined;\n const cron = `\"${String(facts.minute)} ${String(DAILY_HOUR)} * * *\"`;\n const schedule = triggerKey(lines, on, \"schedule\");\n if (schedule === undefined) {\n const at = blockTextEnd(lines, keys.at(-1) ?? first);\n splices.push({ at, remove: 0, insert: [`${pad}# Each day, in case a release fails after it publishes`, `${pad}schedule:`, `${inner}- cron: ${cron}`] });\n } else {\n const end = blockTextEnd(lines, schedule);\n const indent = childIndent(lines, schedule) ?? indentOf(lines[schedule] ?? \"\") + 2;\n splices.push({ at: end, remove: 0, insert: [`${\" \".repeat(indent)}- cron: ${cron}`] });\n }\n }\n return applySplices(text, splices);\n}\n\n/** This function tells if the repository has a package that it publishes. */\nfunction publishes(context: RuleContext): boolean {\n return [context.rootPackage, ...context.packages].some((info) => info.manifest[\"private\"] !== true);\n}\n\nexport const pagesAfterRelease: Rule = {\n id: \"pages-after-release\",\n title: \"A repository with a public package and a release workflow starts its Pages workflow after a release and on each day.\",\n reason:\n \"A release starts no Pages run, so a Releases page is behind npm until the next push. On 2026-11-04 four sites showed an older version than npm for this reason. A release can also fail after it publishes, and then only a daily build shows the version.\",\n fix: 'Add `workflow_run` with `workflows: [Release]`, `types: [completed]` and `branches: [<default branch>]` under `on`, and a daily `schedule` (CI.md, \"Pages\"). A workflow that deploys with its own steps also needs a condition that stops a run after a failed release.',\n sources: [\n { repo: \"template\", rule: \"pages-after-release\", doc: \".github/workflows/pages.yml (workflow_run of Release, and a schedule)\" },\n { repo: \"packing\", rule: \"pages-after-release\", doc: \".github/workflows/pages.yml (workflow_run of Release, and a schedule)\" },\n { repo: \"ireko\", rule: \"pages-after-release\", doc: \".github/workflows/pages.yml (workflow_run of CI and Release, and a schedule)\" },\n ],\n options: {\n workflows: { type: \"strings\", default: PAGES_WORKFLOWS, description: \"The workflows that deploy a site, without the ref after `@`.\" },\n },\n check(context, options) {\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n if (!files.includes(RELEASE_FILE) || !publishes(context)) return [];\n const read = (file: string): string => readFileSync(join(context.root, file), \"utf8\");\n const release = workflowName(read(RELEASE_FILE)) ?? \"Release\";\n const remote = context.git([\"remote\", \"get-url\", \"origin\"]);\n const repository = context.env[\"GITHUB_REPOSITORY\"] ?? (remote === undefined ? undefined : repositoryOfRemote(remote));\n const breaks: Break[] = [];\n for (const file of files.filter((path) => WORKFLOW.test(path)).sort(byCode)) {\n const text = read(file);\n const calls = pagesCalls(text, options[\"workflows\"] as readonly string[]).filter((call) => call.deploys);\n const own = calls.length === 0 && OWN_DEPLOY.test(workflowLines(text).join(\"\\n\")) && !/^\\s*workflow_call\\s*:/m.test(workflowLines(text).join(\"\\n\"));\n if (calls.length === 0 && !own) continue;\n const found = pagesTriggers(text, release);\n if (found.afterRelease && found.daily) continue;\n const parts = [...(found.afterRelease ? [] : [`it does not start after the workflow ${release}`]), ...(found.daily ? [] : [\"it has no schedule with a start on each day\"])];\n const message = `${file} deploys a site, and ${parts.join(\", and \")}.`;\n const after = own ? undefined : addPagesTriggers(text, { release, branch: defaultBranch(context), minute: repository === undefined ? undefined : scheduleMinute(repository, file) });\n const ok = after !== undefined && after !== text && pagesTriggers(after, release).afterRelease && pagesTriggers(after, release).daily;\n breaks.push({\n file,\n line: 1,\n message,\n ...(ok ? { edits: [{ file, before: text, after }] } : own ? { fix: \"A person must change it, because this workflow has its own steps. Add the triggers, and stop a run after a failed release with a condition on `github.event.workflow_run.conclusion`.\" } : {}),\n });\n }\n return breaks;\n },\n};\n","/**\n * The rule `pinned-git-deps`: a dependency from git names a full commit.\n */\nimport { DEPENDENCY_FIELDS, keyLine, specifiersOf, type Break, type Manifest, type Rule } from \"../rule.ts\";\n\n/** The fields of the root `package.json` that replace the specifiers of dependencies. */\nconst OVERRIDE_FIELDS = [\"overrides\", \"resolutions\"] as const;\n\n/** This function tells if a specifier gets the package from git, not from a registry or the workspace. */\nexport function isGitSpecifier(spec: string): boolean {\n const value = spec.trim();\n if (/^(github|gitlab|bitbucket|gist):/i.test(value)) return true;\n if (/^git(\\+[a-z]+)?:/i.test(value) || /^git@/i.test(value)) return true;\n if (/^https?:\\/\\/(www\\.)?(github\\.com|gitlab\\.com|bitbucket\\.org|codeload\\.github\\.com)\\//i.test(value)) return true;\n // npm and pnpm read `owner/repo` and `owner/repo#ref` as a GitHub repository\n return /^[\\w-][\\w.-]*\\/[\\w.-]+(#.*)?$/.test(value) && !value.startsWith(\"@\");\n}\n\n/**\n * This function tells if a git specifier names a commit. A specifier names a commit when its ref\n * (after `#`) is a commit SHA, or when a tarball URL has the SHA in its path.\n */\nexport function isPinned(spec: string, fullSha: boolean): boolean {\n const sha = fullSha ? /^[0-9a-f]{40}$/i : /^[0-9a-f]{7,40}$/i;\n const hash = spec.indexOf(\"#\");\n if (hash >= 0) {\n // pnpm also knows `#commit=<sha>`, and `&` joins the parts of a ref\n const parts = spec.slice(hash + 1).split(\"&\");\n return parts.some((part) => sha.test(part.replace(/^commit=/, \"\")));\n }\n const path = /^https?:\\/\\/[^/]+\\/(.*)$/i.exec(spec.trim())?.[1];\n return path !== undefined && path.split(/[/.]/).some((part) => sha.test(part));\n}\n\n/** This function gives the specifiers of the fields of overrides, also the field `overrides` of `pnpm`. */\nfunction overridesOf(manifest: Manifest): [string, string, string][] {\n const out: [string, string, string][] = [];\n for (const field of OVERRIDE_FIELDS) for (const [name, spec] of specifiersOf(manifest, field)) out.push([field, name, spec]);\n const pnpm = manifest[\"pnpm\"];\n if (typeof pnpm === \"object\" && pnpm !== null) for (const [name, spec] of specifiersOf(pnpm as Manifest, \"overrides\")) out.push([\"pnpm\", name, spec]);\n return out;\n}\n\nexport const pinnedGitDeps: Rule = {\n id: \"pinned-git-deps\",\n title: \"A dependency from git (github:, git+https: or owner/repo) names a full commit SHA.\",\n reason:\n \"A git ref without a commit moves with the branch. Then an install today and an install tomorrow get different code, and the lockfile hides the change.\",\n fix: 'Use the npm version, `workspace:*` for a package of this repository, or `github:owner/repo#<full commit SHA>`.',\n sources: [\n { repo: \"coeval\", rule: \"pinned-deps\", doc: \"CLAUDE.md:41\" },\n { repo: \"coeval\", rule: \"unpublished-dep-pinned\", doc: \"CLAUDE.md:41\" },\n { repo: \"headroom\", rule: \"non-npm-deps-pinned\", doc: \"CLAUDE.md:38\" },\n { repo: \"headroom\", rule: \"pinned-github-specifier\", doc: \"CLAUDE.md:38\" },\n { repo: \"private\", rule: \"github-dep-full-sha\", doc: \"docs/decisions.md:1384\" },\n { repo: \"private\", rule: \"github-dep-pinned\", doc: \"docs/decisions.md:1384\" },\n { repo: \"client\", rule: \"general-npm-version\", doc: \"CLAUDE.md:54\" },\n ],\n options: {\n fullSha: { type: \"boolean\", default: true, description: \"When false, a short SHA of 7 or more characters is also a commit.\" },\n },\n check(context, options) {\n const fullSha = options[\"fullSha\"] !== false;\n const breaks: Break[] = [];\n for (const info of [context.rootPackage, ...context.packages]) {\n const found: [string, string, string][] = [];\n for (const field of DEPENDENCY_FIELDS) for (const [name, spec] of specifiersOf(info.manifest, field)) found.push([field, name, spec]);\n found.push(...overridesOf(info.manifest));\n for (const [field, name, spec] of found) {\n if (!isGitSpecifier(spec) || isPinned(spec, fullSha)) continue;\n const line = keyLine(info.text, field, name);\n breaks.push({\n file: info.file,\n ...(line === undefined ? {} : { line }),\n message: `${field} \"${name}\" is \"${spec}\": a git dependency without a ${fullSha ? \"full \" : \"\"}commit SHA.`,\n });\n }\n }\n return breaks;\n },\n};\n","/**\n * The rule `pipe-fails`: a failure on the left of a pipe fails its step. With no `shell` key, GitHub starts a step with\n * `bash -e {0}`, which has no `pipefail`. So `tests | tee out.txt` gives the exit code of `tee`, and the step passes when the tests fail.\n * The key `shell: bash` starts it with `bash --noprofile --norc -eo pipefail {0}`.\n */\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { byCode } from \"../workspace.ts\";\nimport type { Break, Rule } from \"../rule.ts\";\nimport { WORKFLOW, childKeys, indentOf, keyValue, workflowLines } from \"../workflow.ts\";\n\n/** This function gives the words that end the here-documents of a line of a script. */\nfunction hereWords(line: string): string[] {\n return [...line.matchAll(/<<-?\\s*[\"']?([A-Za-z_][A-Za-z0-9_]*)[\"']?/g)].map((match) => match[1] ?? \"\");\n}\n\n/**\n * This function tells if a script has a pipe. It does not read the text of quotes, of comments and of here-documents, and an `||` is not a pipe.\n * A `|` of a `case` pattern counts as a pipe. The fix for such a script is harmless.\n */\nexport function hasPipe(script: string): boolean {\n let quote = \"\";\n let until: string[] = [];\n for (const line of script.split(/\\r?\\n/)) {\n if (until.length > 0) {\n if (line.trim() === until[0]) until = until.slice(1);\n continue;\n }\n for (let i = 0; i < line.length; i++) {\n const char = line.charAt(i);\n if (quote !== \"\") {\n if (char === \"\\\\\" && quote === '\"') i += 1;\n else if (char === quote) quote = \"\";\n } else if (char === \"\\\\\") i += 1;\n else if (char === '\"' || char === \"'\") quote = char;\n else if (char === \"#\" && (i === 0 || /\\s/.test(line.charAt(i - 1)))) break;\n else if (char === \"|\") {\n if (line.charAt(i + 1) !== \"|\") return true;\n i += 1;\n }\n }\n if (quote === \"\") until = hereWords(line);\n }\n return false;\n}\n\n/** This function gives the value of `defaults.run.shell` in the block under the line `index`. The value `-1` reads the top of the file. */\nfunction defaultShell(lines: readonly string[], index: number): string | undefined {\n const keys = index < 0 ? lines.flatMap((line, at) => (line.trim() !== \"\" && indentOf(line) === 0 ? [at] : [])) : childKeys(lines, index);\n const defaults = keys.find((at) => keyValue(lines[at] ?? \"\", \"defaults\") !== undefined);\n if (defaults === undefined) return undefined;\n const run = childKeys(lines, defaults).find((at) => keyValue(lines[at] ?? \"\", \"run\") !== undefined);\n if (run === undefined) return undefined;\n for (const at of childKeys(lines, run)) {\n const value = keyValue(lines[at] ?? \"\", \"shell\");\n if (value !== undefined) return value;\n }\n return undefined;\n}\n\n/** A step with a `run` key: the line of the key (from 0), its script, and its `shell`, from the step, the job or the workflow. */\ninterface RunStep {\n readonly line: number;\n readonly script: string;\n readonly shell: string | undefined;\n}\n\n/** This function gives the steps with a `run` key. It reads only the steps of the jobs. */\nexport function runSteps(lines: readonly string[]): RunStep[] {\n const jobs = lines.findIndex((line) => indentOf(line) === 0 && keyValue(line, \"jobs\") !== undefined);\n if (jobs < 0) return [];\n const found: RunStep[] = [];\n const workflowShell = defaultShell(lines, -1);\n for (const job of childKeys(lines, jobs)) {\n const jobShell = defaultShell(lines, job);\n const steps = childKeys(lines, job).find((at) => keyValue(lines[at] ?? \"\", \"steps\") !== undefined);\n if (steps === undefined) continue;\n const dashes = stepStarts(lines, steps);\n dashes.forEach((dash, order) => {\n const end = dashes[order + 1] ?? blockAfter(lines, steps);\n const indent = indentOf(lines[dash] ?? \"\") + 2;\n let run: number | undefined;\n let shell: string | undefined;\n for (let at = dash; at < end; at++) {\n const line = lines[at] ?? \"\";\n const atKey = at === dash || (line.trim() !== \"\" && indentOf(line) === indent);\n if (!atKey) continue;\n if (keyValue(line, \"run\") !== undefined) run = at;\n shell = keyValue(line, \"shell\") ?? shell;\n }\n if (run === undefined) return;\n const value = keyValue(lines[run] ?? \"\", \"run\") ?? \"\";\n const scalar = /^[|>]/.test(value);\n const body: string[] = scalar ? [] : [value];\n if (scalar) {\n for (let at = run + 1; at < end; at++) {\n const line = lines[at] ?? \"\";\n if (line.trim() !== \"\" && indentOf(line) <= indent) break;\n body.push(line);\n }\n }\n found.push({ line: run, script: body.join(\"\\n\"), shell: shell ?? jobShell ?? workflowShell });\n });\n }\n return found;\n}\n\n/** This function gives the end of the list of steps under the key at the line `steps`. A list can have the same indent as its key. */\nfunction blockAfter(lines: readonly string[], steps: number): number {\n const indent = indentOf(lines[steps] ?? \"\");\n for (let at = steps + 1; at < lines.length; at++) {\n const line = lines[at] ?? \"\";\n if (line.trim() === \"\") continue;\n if (indentOf(line) < indent || (indentOf(line) === indent && !line.trimStart().startsWith(\"- \"))) return at;\n }\n return lines.length;\n}\n\n/** This function gives the lines of the items of the list of steps. */\nfunction stepStarts(lines: readonly string[], steps: number): number[] {\n const end = blockAfter(lines, steps);\n let indent: number | undefined;\n const starts: number[] = [];\n for (let at = steps + 1; at < end; at++) {\n const line = lines[at] ?? \"\";\n if (line.trim() === \"\") continue;\n indent ??= indentOf(line);\n if (indentOf(line) === indent && line.trimStart().startsWith(\"- \")) starts.push(at);\n }\n return starts;\n}\n\n/** This function tells if a shell hides a failure on the left of a pipe. A shell that is not bash or sh has other rules, and the rule does not read it. */\nexport function hidesFailure(shell: string | undefined): boolean {\n if (shell === undefined) return true;\n if (shell === \"bash\" || shell.includes(\"pipefail\")) return false;\n return /^(bash|sh)(\\s|$)/.test(shell);\n}\n\n/** This function gives the text with `defaults.run.shell` before its key `jobs`, or undefined when the file has its own `defaults`. */\nexport function withBashDefault(text: string): string | undefined {\n const eol = text.includes(\"\\r\\n\") ? \"\\r\\n\" : \"\\n\";\n const lines = text.split(/\\r?\\n/);\n if (lines.some((line) => indentOf(line) === 0 && keyValue(line, \"defaults\") !== undefined)) return undefined;\n const jobs = lines.findIndex((line) => indentOf(line) === 0 && keyValue(line, \"jobs\") !== undefined);\n if (jobs < 0) return undefined;\n lines.splice(jobs, 0, \"defaults:\", \" run:\", \" shell: bash\", \"\");\n return lines.join(eol);\n}\n\nexport const pipeFails: Rule = {\n id: \"pipe-fails\",\n title: \"A failure on the left of a pipe fails its step: each step with a pipe has `pipefail`.\",\n reason:\n \"With no `shell` key, GitHub has no `pipefail`, so `tests | tee out.txt` passes when the tests fail. On 2026-11-05 a read of 99 jobs of a merge gate found 8 failed tests in jobs that concluded success.\",\n fix: \"Add `defaults: { run: { shell: bash } }` to the workflow, or `shell: bash` to the step, or `set -o pipefail` to the script. Then read the next run: a step that turns red had a failure that the pipe hid.\",\n sources: [\n { repo: \"coeval\", rule: \"measure\", doc: \"K228 (2026-11-05): a merge gate with no pipefail concluded success on 8 of 99 jobs with a failed test\" },\n { repo: \"packing\", rule: \"predicates\", doc: \"run 41547266012 (2026-11-03): the join failed behind a pipe, and its job concluded success\" },\n { repo: \"systems\", rule: \"kind\", doc: \"kind.yml (2026-11-05): a failed command behind a pipe left a diagnostic of the borders with no line\" },\n ],\n options: {},\n check(context) {\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n const breaks: Break[] = [];\n for (const file of files.filter((path) => WORKFLOW.test(path)).sort(byCode)) {\n let text: string;\n try {\n text = readFileSync(join(context.root, file), \"utf8\");\n } catch {\n continue;\n }\n const after = withBashDefault(text);\n for (const step of runSteps(workflowLines(text))) {\n if (!hidesFailure(step.shell) || !hasPipe(step.script) || step.script.includes(\"pipefail\")) continue;\n breaks.push({\n file,\n line: step.line + 1,\n message: `A step of ${file} has a pipe and no \\`pipefail\\`. The step passes when a command on the left of the pipe fails.`,\n ...(after === undefined ? {} : { edits: [{ file, before: text, after }] }),\n });\n }\n }\n return breaks;\n },\n};\n","/**\n * The rule `unreleased-change`: a change does not set a version that npm has. With the option `versionEachChange`, a\n * change of the files that a published package ships also raises its version. Else the release skips the change.\n */\nimport { spawnSync } from \"node:child_process\";\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { rangeOf } from \"../change.ts\";\nimport { cleanPath, hasFile, lineOf, matchesAny, versionedPackages, type Break, type Manifest, type PackageInfo, type Rule, type RuleContext } from \"../rule.ts\";\n\n/**\n * The answer of the registry for one package, or an error. The answer has each version that npm has or had (none for a\n * new package), the time of each publish (ISO 8601) and the version of the tag `latest`.\n */\nexport type RegistryAnswer = { readonly versions: readonly string[]; readonly times?: Readonly<Record<string, string>>; readonly latest?: string } | { readonly error: string };\n\n/** This function gives the answer of the registry at the URL `registry` for each package name of `names`. */\nexport type RegistryLookup = (names: readonly string[], registry: string) => ReadonlyMap<string, RegistryAnswer>;\n\n/** The registry of npm. */\nexport const NPM_REGISTRY = \"https://registry.npmjs.org\";\n\n/** The globs of the files of a package, relative to its folder, that do not ship: tests, fixtures, docs and configs. */\nexport const UNSHIPPED_FILES: readonly string[] = [\n \"**/*.md\",\n \"**/*.{test,spec}.*\",\n \"**/{test,tests,__tests__,fixtures,__fixtures__,__snapshots__,bench,benches,benchmarks,e2e}/**\",\n \"**/*.{bench,e2e}.*\",\n \"**/.*/**\",\n \"**/tsconfig*.json\",\n \"**/*.config.*\",\n \"docs/**\",\n \"examples/**\",\n \"scripts/**\",\n \"site/**\",\n \"LICENSE*\",\n \"pnpm-lock.yaml\",\n \"pnpm-workspace.yaml\",\n];\n\n/** The fields of `package.json` that change what the package gives to a user. A change of the dependencies is not here. */\nexport const SHIPPED_FIELDS: readonly string[] = [\"main\", \"module\", \"types\", \"typings\", \"exports\", \"imports\", \"bin\", \"files\", \"type\", \"publishConfig\", \"sideEffects\", \"browser\"];\n\n/** The script that `npmLookup` starts in a child process of Node, so that the rule stays synchronous. */\nconst LOOKUP_SCRIPT = `\nconst [registry, ...names] = process.argv.slice(1);\nlet base = registry;\nwhile (base.endsWith(\"/\")) base = base.slice(0, -1);\nPromise.all(names.map(async (name) => {\n try {\n const response = await fetch(base + \"/\" + name.replace(\"/\", \"%2f\"), { headers: { accept: \"application/json\" }, signal: AbortSignal.timeout(20000) });\n if (response.status === 404) return [name, { versions: [] }];\n if (!response.ok) return [name, { error: \"HTTP \" + response.status }];\n const data = await response.json();\n const times = Object.fromEntries(Object.entries(data.time ?? {}).filter(([key]) => key !== \"created\" && key !== \"modified\"));\n return [name, { versions: [...new Set([...Object.keys(data.versions ?? {}), ...Object.keys(times)])], times, latest: data[\"dist-tags\"]?.latest }];\n } catch (error) {\n return [name, { error: String(error && error.message ? error.message : error) }];\n }\n})).then((entries) => process.stdout.write(JSON.stringify(Object.fromEntries(entries))));\n`;\n\n/**\n * This function asks the registry for the versions of each package, in one child process of Node. A version that npm\n * removed stays in the answer, because npm does not accept it again.\n */\nexport const npmLookup: RegistryLookup = (names, registry) => {\n const fail = (error: string): ReadonlyMap<string, RegistryAnswer> => new Map(names.map((name) => [name, { error }]));\n if (names.length === 0) return new Map();\n const result = spawnSync(process.execPath, [\"-e\", LOOKUP_SCRIPT, registry, ...names], { encoding: \"utf8\", timeout: 60_000, windowsHide: true });\n if (result.error !== undefined || result.status !== 0) return fail(result.error?.message ?? `the lookup ended with exit code ${String(result.status)}`);\n try {\n const answers = JSON.parse(result.stdout) as Record<string, RegistryAnswer>;\n return new Map(names.map((name) => [name, answers[name] ?? { error: \"no answer\" }]));\n } catch {\n return fail(\"the lookup gave no JSON\");\n }\n};\n\n/** This function gives the strings of a field of `package.json` that is a list of strings. */\nconst stringsOf = (manifest: Manifest, field: string): readonly string[] => {\n const value = manifest[field];\n return Array.isArray(value) ? value.filter((item): item is string => typeof item === \"string\") : [];\n};\n\n/** This function tells if a path relative to the root is in the folder `folder`. The root is `\"\"`. */\nconst inside = (folder: string, path: string): boolean => folder === \"\" || path.startsWith(`${folder}/`);\n\n/** This function gives the globs of an entry of the field `files`: the entry, and each path under it. */\nconst entryGlobs = (entry: string): readonly string[] => {\n let glob = cleanPath(entry);\n while (glob.endsWith(\"/\")) glob = glob.slice(0, -1);\n return [glob, `${glob}/**`];\n};\n\n/** This function reads the manifest of the text of a `package.json` file, or gives undefined. */\nfunction parseManifest(text: string | undefined): Manifest | undefined {\n if (text === undefined) return undefined;\n try {\n const parsed: unknown = JSON.parse(text);\n return typeof parsed === \"object\" && parsed !== null && !Array.isArray(parsed) ? (parsed as Manifest) : undefined;\n } catch {\n return undefined;\n }\n}\n\n/** This function tells if a version is a placeholder before the first release: `0.0.0` or `0.0.0-<stage>`. */\nconst isPlaceholder = (version: string): boolean => /^0\\.0\\.0(?:[-+].*)?$/.test(version);\n\n/** A published package of the change: its versions, and the shipped files that the change changes. */\ninterface Candidate {\n readonly pkg: PackageInfo;\n readonly name: string;\n /** The version at HEAD. */\n readonly version: string;\n /** The version that the commits of the change set, from the merge base to the head of the change, or undefined. */\n readonly sets: string | undefined;\n /** The version at the start of the range: the base branch, or the commit before the push. */\n readonly start: string | undefined;\n /** The shipped files that the change changes, relative to the folder. Only the option `versionEachChange` reads them. */\n readonly files: readonly string[];\n}\n\n/** This function gives the time of the push in milliseconds, from the field `repository.pushed_at` of the event file. */\nfunction pushedAt(context: RuleContext): number | undefined {\n const file = context.env[\"GITHUB_EVENT_PATH\"];\n if (file === undefined || file === \"\" || !existsSync(file)) return undefined;\n try {\n const event = JSON.parse(readFileSync(file, \"utf8\")) as { repository?: { pushed_at?: unknown } };\n const value = event.repository?.pushed_at;\n if (typeof value === \"number\") return value * 1000;\n return typeof value === \"string\" && !Number.isNaN(Date.parse(value)) ? Date.parse(value) : undefined;\n } catch {\n return undefined;\n }\n}\n\n/** This function gives the shipped files of `pkg` in the list `changed`, relative to the folder of the package. */\nfunction shippedFiles(pkg: PackageInfo, changed: readonly string[], before: Manifest | undefined, context: RuleContext, unshipped: readonly string[], fields: readonly string[]): string[] {\n const folders = context.packages.map((other) => other.folder).filter((folder) => folder !== \"\");\n // The root package does not have the files of the packages of the workspace\n const own = (path: string): boolean => inside(pkg.folder, path) && (pkg.folder !== \"\" || !folders.some((folder) => inside(folder, path)));\n const relative = (path: string): string => (pkg.folder === \"\" ? path : path.slice(pkg.folder.length + 1));\n // An entry of `files` that git does not track is build output, which comes from each source file\n const entries = stringsOf(pkg.manifest, \"files\");\n const positive = entries.filter((entry) => !entry.startsWith(\"!\"));\n const negative = entries.filter((entry) => entry.startsWith(\"!\")).flatMap((entry) => entryGlobs(entry.slice(1)));\n const ownTracked = (context.gitFiles() ?? []).filter(own).map(relative);\n const whitelist = positive.length > 0 && positive.every((entry) => ownTracked.some((path) => matchesAny(path, entryGlobs(entry))));\n const ships = (path: string): boolean =>\n path !== \"package.json\" && !matchesAny(path, unshipped) && (!whitelist || (positive.some((entry) => matchesAny(path, entryGlobs(entry))) && !matchesAny(path, negative)));\n const files = changed.filter(own).map(relative).filter(ships);\n if (changed.includes(pkg.file) && before !== undefined && fields.some((field) => JSON.stringify(before[field]) !== JSON.stringify(pkg.manifest[field]))) files.push(\"package.json\");\n return files;\n}\n\n/** This function makes the rule with the registry lookup `lookup`. The tests give a fake lookup. */\nexport function unreleasedChangeRule(lookup: RegistryLookup = npmLookup): Rule {\n return {\n id: \"unreleased-change\",\n changeScoped: true,\n title: \"A change does not set a version that npm has. With `versionEachChange`, a change of the shipped files also raises the version.\",\n reason:\n \"The release workflow publishes each version that npm does not have, and it skips the others. When two pull requests set the same version, the second merge changes the code but no version, and nothing fails (rigor #18 and #20, 2026-11-02).\",\n fix: \"Raise the version of the package in a pull request to a version that npm does not have, with the SemVer rules (RELEASING.md). Then the release workflow publishes the change.\",\n sources: [\n { repo: \"rigor\", rule: \"unreleased-change\", doc: \"pull requests #18 and #20 (2026-11-02): two pull requests set the same version\" },\n ...[\"crawler\", \"coeval\", \"template\"].map((repo) => ({ repo, rule: \"unreleased-change\", doc: \".github/workflows/release.yml (it starts on a change of a version, and it skips each version that npm has)\" })),\n ],\n options: {\n versionEachChange: {\n type: \"boolean\",\n default: false,\n description:\n \"True when each pull request sets its version: a change of the shipped files with a version that npm has breaks, also on a push. False when a separate pull request raises the version.\",\n },\n unshipped: {\n type: \"strings\",\n default: UNSHIPPED_FILES,\n description: \"With `versionEachChange`: the globs of the files of a package, relative to its folder, that do not ship.\",\n },\n fields: {\n type: \"strings\",\n default: SHIPPED_FIELDS,\n description: \"With `versionEachChange`: the fields of `package.json` whose change ships. The dependencies are not in the default list.\",\n },\n registry: { type: \"string\", default: NPM_REGISTRY, description: \"The URL of the registry that has the versions.\" },\n },\n check(context, options) {\n if (hasFile(context.root, \".changeset/config.json\")) return { skipped: \"the repository uses Changesets: the changesets raise the versions, and the changeset check examines them\" };\n const published = versionedPackages(context).filter((pkg) => !isPlaceholder(String(pkg.manifest[\"version\"])));\n if (published.length === 0) return { skipped: \"the repository has no published package with a release version\" };\n const range = rangeOf(context, { push: true });\n if (\"skipped\" in range) return range;\n const strict = options[\"versionEachChange\"] === true;\n const push = context.base === undefined && context.env[\"GITHUB_EVENT_NAME\"] === \"push\";\n const out = strict ? context.git([\"diff\", \"--name-only\", \"--no-renames\", ...range.diff]) : \"\";\n if (out === undefined) return { skipped: \"git cannot give the changed files of the change\" };\n const changed = out.split(/\\r?\\n/).filter((file) => file !== \"\");\n const unshipped = Array.isArray(options[\"unshipped\"]) ? (options[\"unshipped\"] as readonly string[]) : UNSHIPPED_FILES;\n const fields = Array.isArray(options[\"fields\"]) ? (options[\"fields\"] as readonly string[]) : SHIPPED_FIELDS;\n const registry = typeof options[\"registry\"] === \"string\" ? options[\"registry\"] : NPM_REGISTRY;\n // The commits of the change itself go from the merge base to the head of the change. A push starts at the commit\n // before it. The version of the merge commit is not the version of the change: the base branch can change it too.\n const fork = push ? range.ends[0] : context.git([\"merge-base\", ...range.ends])?.trim();\n const notes: string[] = [];\n if (fork === undefined) notes.push(`the checkout does not have the merge base of ${range.ends.join(\" and \")}, so the rule cannot tell if the change sets a version`);\n const manifestAt = (ref: string, pkg: PackageInfo): Manifest | undefined => (ref === \"HEAD\" ? pkg.manifest : parseManifest(context.git([\"show\", `${ref}:${pkg.file}`])));\n const versionOf = (manifest: Manifest | undefined): string | undefined => (typeof manifest?.[\"version\"] === \"string\" ? manifest[\"version\"] : undefined);\n\n const candidates: Candidate[] = [];\n for (const pkg of published) {\n const atStart = manifestAt(range.ends[0], pkg);\n const set = versionOf(manifestAt(range.ends[1], pkg));\n const before = fork === undefined ? undefined : versionOf(fork === range.ends[0] ? atStart : manifestAt(fork, pkg));\n const sets = fork !== undefined && set !== undefined && !isPlaceholder(set) && set !== before ? set : undefined;\n const files = strict ? shippedFiles(pkg, changed, atStart, context, unshipped, fields) : [];\n if (sets === undefined && files.length === 0) continue;\n candidates.push({ pkg, name: String(pkg.manifest[\"name\"]), version: String(pkg.manifest[\"version\"]), sets, start: versionOf(atStart), files });\n }\n if (candidates.length === 0) return notes.length > 0 ? { skipped: notes.join(\"; \") } : [];\n\n const answers = lookup(\n candidates.map((candidate) => candidate.name),\n registry,\n );\n const pushTime = push ? pushedAt(context) : undefined;\n const breaks: Break[] = [];\n for (const candidate of candidates) {\n const answer = answers.get(candidate.name) ?? { error: \"no answer\" };\n if (\"error\" in answer) {\n notes.push(`the registry did not answer for ${candidate.name}: ${answer.error}`);\n continue;\n }\n const line = lineOf(candidate.pkg.text, '\"version\"');\n const at = { file: candidate.pkg.file, ...(line === undefined ? {} : { line }) };\n if (candidate.sets !== undefined) {\n const sets = candidate.sets;\n if (!answer.versions.includes(sets)) continue;\n // On a push, the release of the same push can publish the version that the push sets. Only a version that npm\n // had before the push is a break.\n if (push) {\n const time = Date.parse(answer.times?.[sets] ?? \"\");\n if (pushTime === undefined || Number.isNaN(time)) {\n notes.push(`the rule cannot tell if npm had ${candidate.name}@${sets} before the push`);\n continue;\n }\n if (time >= pushTime) continue;\n }\n breaks.push({ ...at, message: `${candidate.name}: the change sets the version ${sets}, but ${sets} is on npm already. Raise the version (SemVer) in a pull request.` });\n } else if (strict && candidate.files.length > 0 && candidate.start === candidate.version && answer.versions.includes(candidate.version)) {\n const shown = candidate.files.slice(0, 3).map((file) => (candidate.pkg.folder === \"\" ? file : `${candidate.pkg.folder}/${file}`));\n const more = candidate.files.length > shown.length ? ` and ${String(candidate.files.length - shown.length)} more` : \"\";\n breaks.push({\n ...at,\n message: `${candidate.name}: the change is not released, because ${candidate.version} is on npm already. Raise the version (SemVer) in a pull request. The change ships ${shown.join(\", \")}${more}.`,\n });\n }\n }\n if (breaks.length === 0 && notes.length > 0) return { skipped: notes.join(\"; \") };\n return breaks;\n },\n };\n}\n\nexport const unreleasedChange: Rule = unreleasedChangeRule();\n","/**\n * The rule `published-minor`: a consumer does not stay behind the newest published minor of a package that the option\n * `packages` names. A caret range of a `0.x` version cannot reach the next minor, so such a consumer stays behind with\n * no failure. The lockfile can also hold an old version that the range admits.\n */\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { DEPENDENCY_FIELDS, hasFile, keyLine, matchesAny, specifiersOf, type Break, type PackageInfo, type Rule } from \"../rule.ts\";\nimport { NPM_REGISTRY, npmLookup, type RegistryAnswer, type RegistryLookup } from \"./unreleased-change.ts\";\n\n/** A major and a minor. The minor `Infinity` means each minor of the major. */\nexport type Minor = readonly [major: number, minor: number];\n\n/** This function gives the major and the minor of a release version, or undefined for a pre-release and for other text. */\nexport function minorOf(version: string): Minor | undefined {\n // A cut at the first `(` and `+`, so that the pattern examines only the digits: this text comes from a file\n const release = version.trim().split(\"(\", 1)[0]?.split(\"+\", 1)[0] ?? \"\";\n const match = /^(\\d+)\\.(\\d+)\\.\\d+$/.exec(release);\n return match === null ? undefined : [Number(match[1]), Number(match[2])];\n}\n\n/**\n * This function gives the highest minor that a range can reach. It gives undefined for a form that the rule does not read.\n * These forms are a `workspace:` or `github:` specifier, a tag, a partial version and a compound range. Below `1.0.0`, a caret stays in\n * its minor. From `1.0.0`, a caret reaches each minor of its major.\n */\nexport function reachOf(specifier: string): Minor | undefined {\n const match = /^([\\^~]?)(\\d+)\\.(\\d+)\\.\\d+(?:[-+].*)?$/.exec(specifier.trim());\n if (match === null) return undefined;\n const major = Number(match[2]);\n return match[1] === \"^\" && major > 0 ? [major, Number.POSITIVE_INFINITY] : [major, Number(match[3])];\n}\n\n/** This function tells if the minor `have` is before the minor `other`. */\nconst behind = (have: Minor, other: Minor): boolean => have[0] < other[0] || (have[0] === other[0] && have[1] < other[1]);\n\n/** This function gives the indent, the key and the value of one line of YAML. It cuts the line by position, with no pattern. */\nfunction yamlEntry(line: string): { readonly indent: number; readonly key: string; readonly value: string } | undefined {\n const text = line.trimEnd();\n const body = text.trimStart();\n const colon = body.indexOf(\": \");\n const key = colon >= 0 ? body.slice(0, colon) : body.endsWith(\":\") ? body.slice(0, -1) : \"\";\n return key === \"\" ? undefined : { indent: text.length - body.length, key, value: colon >= 0 ? body.slice(colon + 2) : \"\" };\n}\n\n/**\n * This function gives the locked version of each dependency of each importer of the text of a `pnpm-lock.yaml` file. The\n * key of the outer map is the folder of the importer, with `\"\"` for the root.\n */\nexport function lockedVersions(text: string): ReadonlyMap<string, ReadonlyMap<string, string>> {\n const importers = new Map<string, Map<string, string>>();\n let inside = false;\n let importer: Map<string, string> | undefined;\n let name: string | undefined;\n for (const line of text.split(/\\r?\\n/)) {\n if (/^\\S/.test(line)) inside = line.trimEnd() === \"importers:\";\n if (!inside) continue;\n const entry = yamlEntry(line);\n if (entry === undefined) continue;\n const { indent, value } = entry;\n const key = entry.key.replace(/^['\"]|['\"]$/g, \"\");\n if (indent === 2) {\n importer = new Map();\n importers.set(key === \".\" ? \"\" : key, importer);\n } else if (indent === 6) {\n name = key;\n } else if (indent === 8 && key === \"version\" && name !== undefined) {\n importer?.set(name, value);\n }\n }\n return importers;\n}\n\n/** One dependency of one package, that the option `packages` names. */\ninterface Use {\n readonly pkg: PackageInfo;\n readonly field: string;\n readonly name: string;\n readonly reach: Minor;\n}\n\n/** This function gives the time in milliseconds of the first release that `have` is behind, or undefined when npm gives no time. */\nfunction firstAhead(answer: Exclude<RegistryAnswer, { error: string }>, have: Minor): number | undefined {\n const times = Object.entries(answer.times ?? {}).flatMap(([version, time]) => {\n const minor = minorOf(version);\n return minor !== undefined && behind(have, minor) && !Number.isNaN(Date.parse(time)) ? [Date.parse(time)] : [];\n });\n return times.length === 0 ? undefined : Math.min(...times);\n}\n\n/** This function makes the rule with the registry lookup `lookup` and the clock `now`. The tests give fakes. */\nexport function publishedMinorRule(lookup: RegistryLookup = npmLookup, now: () => number = Date.now): Rule {\n return {\n id: \"published-minor\",\n title: \"A consumer does not stay behind the newest published minor of a package that the option `packages` names.\",\n reason:\n \"A caret range of a 0.x version cannot reach the next minor, and a lockfile can hold an old version that a range admits. A test that holds the choices of today does not show it, so a consumer can stay behind for many releases with no failure.\",\n fix: \"Raise the range of the dependency to the newest published minor, and update the lockfile. Read the changes of the release first.\",\n sources: [{ repo: \"private\", rule: \"published-minor\", doc: \"docs/STRATEGY.md (2026-11-04, a consumer behind a published minor)\" }],\n options: {\n packages: { type: \"strings\", default: [], description: \"The patterns of the package names that the rule examines, for example `@scope/*`. With no pattern, the rule does not start.\" },\n graceDays: { type: \"number\", default: 0, description: \"The days that a consumer has, from the first publish of a minor that it does not have.\" },\n registry: { type: \"string\", default: NPM_REGISTRY, description: \"The URL of the registry that has the versions.\" },\n },\n check(context, options) {\n const patterns = Array.isArray(options[\"packages\"]) ? (options[\"packages\"] as readonly string[]) : [];\n if (patterns.length === 0) return { skipped: \"the option `packages` names no package\" };\n const all = [context.rootPackage, ...context.packages];\n const consumers = all.filter((pkg, index) => all.findIndex((other) => other.file === pkg.file) === index);\n const uses: Use[] = [];\n for (const pkg of consumers) {\n for (const field of DEPENDENCY_FIELDS) {\n for (const [name, specifier] of specifiersOf(pkg.manifest, field)) {\n const reach = reachOf(specifier);\n if (reach !== undefined && matchesAny(name, patterns)) uses.push({ pkg, field, name, reach });\n }\n }\n }\n if (uses.length === 0) return { skipped: \"no dependency has a range and a name that the option `packages` names\" };\n\n const answers = lookup([...new Set(uses.map((use) => use.name))], typeof options[\"registry\"] === \"string\" ? options[\"registry\"] : NPM_REGISTRY);\n const locked = hasFile(context.root, \"pnpm-lock.yaml\") ? lockedVersions(readFileSync(join(context.root, \"pnpm-lock.yaml\"), \"utf8\")) : new Map<string, ReadonlyMap<string, string>>();\n const grace = (typeof options[\"graceDays\"] === \"number\" ? options[\"graceDays\"] : 0) * 86_400_000;\n const breaks: Break[] = [];\n const notes = new Set<string>();\n for (const { pkg, field, name, reach } of uses) {\n const answer = answers.get(name) ?? { error: \"no answer\" };\n if (\"error\" in answer) {\n notes.add(`the registry did not answer for ${name}: ${answer.error}`);\n continue;\n }\n const latest = answer.latest === undefined ? undefined : minorOf(answer.latest);\n if (latest === undefined) continue;\n const version = locked.get(pkg.folder)?.get(name);\n const lockMinor = version === undefined ? undefined : minorOf(version);\n const have = behind(reach, latest) ? reach : lockMinor;\n if (have === undefined || !behind(have, latest)) continue;\n const since = firstAhead(answer, have);\n if (grace > 0 && since !== undefined && now() - since < grace) continue;\n const line = keyLine(pkg.text, field, name);\n const at = { file: pkg.file, ...(line === undefined ? {} : { line }) };\n const message =\n have === reach\n ? `${name}: the range in ${field} cannot reach ${String(answer.latest)}, the newest version on npm. Raise the range.`\n : `${name}: the lockfile holds ${String(version)}, and npm has ${String(answer.latest)}. Update the lockfile.`;\n breaks.push({ ...at, message });\n }\n if (breaks.length === 0 && notes.size > 0) return { skipped: [...notes].join(\"; \") };\n return breaks;\n },\n };\n}\n\nexport const publishedMinor: Rule = publishedMinorRule();\n","/**\n * The rule `release-files`: a pull request changes a file of the release flow only with a reason\n * that everyone can see.\n */\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { rangeOf } from \"../change.ts\";\nimport { matchesAny, type Break, type Rule, type RuleContext } from \"../rule.ts\";\n\n/** The facts of the pull request in the event file of GitHub Actions. */\ninterface PullRequest {\n /** The body, or an empty string. */\n readonly body: string;\n /** The number of commits, if the event file gives it. */\n readonly commits?: number;\n}\n\n/** This function gives the pull request of the event file of GitHub Actions. With no event file, the body is empty. */\nfunction pullRequestOf(context: RuleContext): PullRequest {\n const file = context.env[\"GITHUB_EVENT_PATH\"];\n if (file === undefined || file === \"\" || !existsSync(file)) return { body: \"\" };\n try {\n const event = JSON.parse(readFileSync(file, \"utf8\")) as { pull_request?: { body?: unknown; commits?: unknown } };\n const body = typeof event.pull_request?.body === \"string\" ? event.pull_request.body : \"\";\n const commits = event.pull_request?.commits;\n return typeof commits === \"number\" ? { body, commits } : { body };\n } catch {\n return { body: \"\" };\n }\n}\n\n/** This function escapes the special characters of a regular expression. */\nconst escape = (text: string): string => text.replace(/[\\\\^$.|?*+()[\\]{}]/g, \"\\\\$&\");\n\nexport const releaseFiles: Rule = {\n id: \"release-files\",\n title: \"A pull request changes `.github/workflows/release.yml` or `scripts/release/` only with a `Release-Edit: <reason>` line.\",\n reason:\n \"The release flow publishes to npm with trusted publishing. A change of its files by a session that does not own the release can stop or break each release.\",\n fix: \"Revert the change of the release files. When the owner asked for the change, add the line `Release-Edit: <reason>` to the last commit message or to the body of the pull request. A re-run of a job reads the body of the event that started the run, so after a change of the body, push a commit.\",\n sources: [\n { repo: \"coeval\", rule: \"no-release-edit\", doc: \"CLAUDE.md:40\" },\n { repo: \"coeval\", rule: \"no-release-edits\", doc: \"CLAUDE.md:40\" },\n { repo: \"crawler\", rule: \"no-release-edit\", doc: \"CLAUDE.md:80\" },\n { repo: \"crawler\", rule: \"no-release-edits\", doc: \"CLAUDE.md:80\" },\n { repo: \"headroom\", rule: \"no-release-edits\", doc: \"CLAUDE.md:37\" },\n { repo: \"headroom\", rule: \"release-files-frozen\", doc: \"CLAUDE.md:37\" },\n ],\n options: {\n paths: { type: \"strings\", default: [\".github/workflows/release.yml\", \"scripts/release/**\"], description: \"The globs of the files that the release flow owns.\" },\n trailer: { type: \"string\", default: \"Release-Edit\", description: \"The key of the line that gives the reason of a change.\" },\n authors: {\n type: \"strings\",\n default: [\"mark1russell7-release-train[bot]\"],\n description: \"The authors of the release flow. A change of the release files in commits of only these authors (the sync of the template) needs no reason.\",\n },\n },\n check(context, options) {\n const range = rangeOf(context);\n if (\"skipped\" in range) return range;\n const globs = Array.isArray(options[\"paths\"]) ? options[\"paths\"] : [];\n const changed = (context.git([\"diff\", \"--name-only\", ...range.diff]) ?? \"\")\n .split(/\\r?\\n/)\n .filter((file) => file !== \"\" && matchesAny(file, globs));\n if (changed.length === 0) return [];\n const trailer = typeof options[\"trailer\"] === \"string\" ? options[\"trailer\"] : \"Release-Edit\";\n const line = new RegExp(`^${escape(trailer)}:[ \\\\t]*\\\\S`, \"im\");\n const pullRequest = pullRequestOf(context);\n if (line.test(pullRequest.body)) return [];\n // A shallow checkout can end inside the change: a commit at its end looks like a first commit, so it seems to change\n // each file, and the commits under it are not there. Then the authors and the messages are not those of the change.\n // A pull request of one commit is complete at depth 2, because its commit is the whole change.\n const single = pullRequest.commits === 1 && context.git([\"rev-parse\", \"--verify\", \"--quiet\", `${range.ends[1]}^2`]) === undefined;\n if (!single && context.git([\"merge-base\", ...range.ends]) === undefined) {\n throw new Error(\n `The checkout does not have the merge base of ${range.ends.join(\" and \")}, so the rule cannot read each commit of the change. Use fetch-depth 0, or the CI of the template, which deepens the checkout of a pull request to its merge base.`,\n );\n }\n const messages = context.git([\"log\", \"--no-merges\", \"--format=%B\", ...range.log]) ?? \"\";\n if (line.test(messages)) return [];\n const authors = new Set(Array.isArray(options[\"authors\"]) ? options[\"authors\"] : []);\n const changers = (context.git([\"log\", \"--no-merges\", \"--format=%an\", ...range.log, \"--\", ...changed]) ?? \"\").split(/\\r?\\n/).filter((name) => name !== \"\");\n if (changers.length > 0 && changers.every((name) => authors.has(name))) return [];\n return changed.map((file): Break => ({ file, message: `The change edits ${file}, a file of the release flow, with no \"${trailer}: <reason>\" line.` }));\n },\n};\n","/**\n * The rule `required-scripts`: the root `package.json` keeps the scripts that the shared CI starts.\n */\nimport { DEPENDENCY_FIELDS, hasFile, lineOf, specifiersOf, type Break, type RuleContext, type Rule } from \"../rule.ts\";\n\n/** The package of the STE linter. */\nconst STE_LINT = \"@mark1russell7/ste-lint\";\n\n/** The configuration file of the STE linter. */\nconst STE_CONFIG = \"ste.config.json\";\n\n/** The examples of the scripts that the fix shows. */\nconst EXAMPLES: Readonly<Record<string, string>> = { \"lint:ste\": \"ste-lint\", typecheck: \"pnpm -r run typecheck\" };\n\n/**\n * This function tells if the repository uses the STE prose standard: the root `package.json` has a\n * dependency on `@mark1russell7/ste-lint`, or the root has a `ste.config.json`.\n */\nexport function usesSteLint(context: RuleContext): boolean {\n const manifest = context.rootPackage.manifest;\n if (DEPENDENCY_FIELDS.some((field) => specifiersOf(manifest, field).some(([name]) => name === STE_LINT))) return true;\n return hasFile(context.root, STE_CONFIG);\n}\n\nexport const requiredScripts: Rule = {\n id: \"required-scripts\",\n title: \"The root `package.json` has the script `typecheck`, and also `lint:ste` when the repository uses `ste-lint`.\",\n reason:\n \"The shared CI starts each script of its list that `package.json` has, and it skips the others. Thus a removed script turns its check off, and nothing shows it.\",\n fix: 'Add the script, for example `\"lint:ste\": \"ste-lint\"` or `\"typecheck\": \"pnpm -r run typecheck\"`.',\n sources: [\n { repo: \"client\", rule: \"ste-prose\", doc: \"CLAUDE.md:5\" },\n { repo: \"coeval\", rule: \"ste-prose\", doc: \"CLAUDE.md:5\" },\n { repo: \"crawler\", rule: \"ste-prose\", doc: \"CLAUDE.md:5\" },\n { repo: \"private\", rule: \"ste-prose\", doc: \"CLAUDE.md:5\" },\n { repo: \"headroom\", rule: \"ste-prose\", doc: \"CLAUDE.md:19\" },\n { repo: \"systems\", rule: \"lint-ste-in-ci\", doc: \"CLAUDE.md:24\" },\n { repo: \"Vex\", rule: \"ste-prose\", doc: \"CLAUDE.md:5\" },\n { repo: \"coeval\", rule: \"tsconfig-test\", doc: \"CLAUDE.md:18\" },\n { repo: \"crawler\", rule: \"tsconfig-test\", doc: \"CLAUDE.md:18\" },\n { repo: \"headroom\", rule: \"tsconfig-test\", doc: \"CLAUDE.md:32\" },\n { repo: \"Vex\", rule: \"tsconfig-test\", doc: \"CLAUDE.md:23\" },\n ],\n options: {\n scripts: { type: \"strings\", default: [\"typecheck\"], description: \"The scripts that the root `package.json` has.\" },\n steScripts: {\n type: \"strings\",\n default: [\"lint:ste\"],\n description: \"The scripts that the root `package.json` has when the repository uses `ste-lint` (a dependency on `@mark1russell7/ste-lint`, or a `ste.config.json` at the root).\",\n },\n },\n check(context, options) {\n const always = Array.isArray(options[\"scripts\"]) ? options[\"scripts\"] : [\"typecheck\"];\n const ste = Array.isArray(options[\"steScripts\"]) ? options[\"steScripts\"] : [\"lint:ste\"];\n const wanted = [...new Set([...always, ...(usesSteLint(context) ? ste : [])])];\n const value = context.rootPackage.manifest[\"scripts\"];\n const scripts = typeof value === \"object\" && value !== null ? (value as Record<string, unknown>) : {};\n const line = lineOf(context.rootPackage.text, '\"scripts\"');\n return wanted\n .filter((name) => typeof scripts[name] !== \"string\" || scripts[name] === \"\")\n .map((name): Break => {\n const example = EXAMPLES[name];\n const why = ste.includes(name) && !always.includes(name) ? \" The repository uses ste-lint.\" : \"\";\n return {\n file: context.rootPackage.file,\n ...(line === undefined ? {} : { line }),\n message: `The root package.json has no script \"${name}\".${why}`,\n fix: example === undefined ? `Add the script \"${name}\".` : `Add the script, for example \"${name}\": \"${example}\".`,\n };\n });\n },\n};\n","/**\n * The rule `roadmap-parses`: each roadmap that a workflow gives to the Status page parses, on the pull request.\n */\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { parseRoadmap, RoadmapParseError } from \"@mark1russell7/site-pages\";\nimport { byCode } from \"../workspace.ts\";\nimport { cleanPath, type Break, type Rule } from \"../rule.ts\";\n\n/** A workflow file. */\nconst WORKFLOW = /^\\.github\\/workflows\\/[^/]+\\.ya?ml$/;\n\n/** A roadmap that a workflow names: the value of a `roadmap:` key, with its file and line. */\ninterface NamedRoadmap {\n readonly roadmap: string;\n readonly file: string;\n readonly line: number;\n}\n\n/** This function tells if a line calls the Pages workflow of the template (`uses: ...reusable-pages.yml`). */\nfunction callsPages(line: string): boolean {\n let text = line.trimStart();\n if (text.startsWith(\"- \")) text = text.slice(2).trimStart();\n if (!text.startsWith(\"uses:\")) return false;\n const value = text.slice(\"uses:\".length).trim();\n return /(?:^|\\/)reusable-pages\\.ya?ml(?:@|$|\\s)/.test(value);\n}\n\nconst indentOf = (line: string): number => line.length - line.trimStart().length;\n\n/** This function tells if a line is `site-pages: false`: the site has no Status page. */\nfunction noStatusPage(line: string): boolean {\n const text = line.trimStart();\n if (!text.startsWith(\"site-pages:\")) return false;\n let value = text.slice(\"site-pages:\".length);\n const comment = value.indexOf(\" #\");\n if (comment >= 0) value = value.slice(0, comment);\n return [\"false\", '\"false\"', \"'false'\"].includes(value.trim());\n}\n\n/**\n * This function gives the line numbers of each call of the Pages workflow that gives no `roadmap` key. The key is in the\n * job of the call: the lines around it with the same indent or more. A job with `site-pages: false` has no Status page.\n */\nfunction callsWithoutRoadmap(lines: readonly string[]): number[] {\n const found: number[] = [];\n lines.forEach((line, index) => {\n if (!callsPages(line)) return;\n const indent = indentOf(line);\n const inJob = (text: string): boolean => text.trim() === \"\" || indentOf(text) >= indent;\n let first = index;\n while (first > 0 && inJob(lines[first - 1] ?? \"\")) first -= 1;\n let last = index;\n while (last < lines.length - 1 && inJob(lines[last + 1] ?? \"\")) last += 1;\n const job = lines.slice(first, last + 1);\n if (!job.some((text) => text.trimStart().startsWith(\"roadmap:\") || noStatusPage(text))) found.push(index + 1);\n });\n return found;\n}\n\n/** This function gives the value of a `roadmap: <file>` line, or undefined for another line, an empty value or an expression. */\nexport function roadmapOfLine(line: string): string | undefined {\n const text = line.trimStart();\n if (!text.startsWith(\"roadmap:\")) return undefined;\n let value = text.slice(\"roadmap:\".length);\n const comment = value.indexOf(\" #\");\n if (comment >= 0) value = value.slice(0, comment);\n value = value.trim();\n const quote = value.charAt(0);\n if (value.length >= 2 && (quote === '\"' || quote === \"'\") && value.endsWith(quote)) value = value.slice(1, -1).trim();\n if (value === \"\" || value.includes(\"${{\")) return undefined;\n return cleanPath(value);\n}\n\nexport const roadmapParses: Rule = {\n id: \"roadmap-parses\",\n title: \"Each call of the Pages workflow gives a roadmap, and each roadmap that a workflow gives to the Status page (the input `roadmap`) parses as site-pages reads it.\",\n reason:\n \"Only the Pages job on main reads the roadmap. A pull request with a bad table row passes each check, and then the build of the site stops and the site stays stale. On 2026-10-30, one repository had 3 red Pages runs in a row because of one row with 2 cells under a header with 4. A site with no roadmap is the same fault with no error: its Status page shows no item of the plan, and each check is green. On 2026-10-30, 2 repositories had a site with no roadmap.\",\n fix: 'Give the roadmap file to the Pages workflow (`roadmap: docs/ROADMAP.md`). Correct the row or the heading that the message names. Each table row has one cell for each column of its header, and the file has a table with an ID column and a Status column, or a heading \"### `id`: Title\".',\n sources: [{ repo: \"private\", rule: \"fail-closed\", doc: \"docs/STRATEGY.md (2026-10-30, gates and probes fail closed)\" }],\n options: {\n roadmaps: { type: \"strings\", default: [], description: \"More roadmap files to check: a roadmap that no workflow names with a `roadmap:` key.\" },\n },\n check(context, options) {\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n const named: NamedRoadmap[] = [];\n const breaks: Break[] = [];\n for (const file of files.filter((path) => WORKFLOW.test(path)).sort(byCode)) {\n const lines = readFileSync(join(context.root, file), \"utf8\").split(/\\r?\\n/);\n lines.forEach((line, index) => {\n const roadmap = roadmapOfLine(line);\n if (roadmap !== undefined) named.push({ roadmap, file, line: index + 1 });\n });\n // A site with no roadmap has a Status page with only the open pull requests and issues: the plan is not on it.\n for (const line of callsWithoutRoadmap(lines)) {\n breaks.push({ file, line, message: `${file} builds the site with the Pages workflow and gives no roadmap, so the Status page shows no roadmap item.` });\n }\n }\n for (const roadmap of options[\"roadmaps\"] as readonly string[]) named.push({ roadmap: cleanPath(roadmap), file: \"the option roadmaps\", line: 0 });\n if (named.length === 0 && breaks.length === 0) return { skipped: \"no workflow builds a site with the Pages workflow, and no workflow names a roadmap\" };\n const seen = new Set<string>();\n for (const { roadmap, file, line } of named) {\n if (seen.has(roadmap)) continue;\n seen.add(roadmap);\n if (!existsSync(join(context.root, roadmap))) {\n breaks.push({ file: line > 0 ? file : roadmap, ...(line > 0 ? { line } : {}), message: `${file} names the roadmap ${roadmap}, and the file does not exist.` });\n continue;\n }\n try {\n parseRoadmap(readFileSync(join(context.root, roadmap), \"utf8\"), { file: roadmap });\n } catch (error) {\n if (!(error instanceof RoadmapParseError)) throw error;\n // The message starts with \"<file>:<line>: \" or \"<file>: \". The break has the file and the line in their own fields.\n const at = /^[^:]+:(\\d+): /.exec(error.message);\n const rest = at ? error.message.slice(at[0].length) : error.message.slice(error.message.indexOf(\": \") + 2);\n breaks.push({ file: roadmap, ...(at ? { line: Number(at[1]) } : {}), message: `${roadmap}: ${rest}` });\n }\n }\n return breaks;\n },\n};\n","/**\n * The rule `shared-docs`: each shared block of a document agrees with its lock, and each linked block points to its\n * home at a pinned commit.\n */\nimport { spawnSync } from \"node:child_process\";\nimport { createHash } from \"node:crypto\";\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { byCode } from \"../workspace.ts\";\nimport { cleanPath, type Break, type Rule } from \"../rule.ts\";\n\n/** The answer for one URL: the text of the file, or the reason why there is no text. */\nexport type HomeAnswer = { readonly text: string } | { readonly error: string };\n\n/** A function that downloads each URL, and gives the answer for each URL. */\nexport type HomeFetch = (urls: readonly string[]) => ReadonlyMap<string, HomeAnswer>;\n\n/** The time in milliseconds that the rule waits for one home. A home that does not answer in this time is a break. */\nexport const HOME_TIMEOUT_MS = 30_000;\n\n/** The script that `githubFetch` starts in a child process of Node, so that the rule stays synchronous. */\nconst FETCH_SCRIPT = `\nconst [timeout, ...urls] = process.argv.slice(1);\nPromise.all(urls.map(async (url) => {\n try {\n const response = await fetch(url, { signal: AbortSignal.timeout(Number(timeout)) });\n if (!response.ok) return [url, { error: \"HTTP \" + response.status }];\n return [url, { text: await response.text() }];\n } catch (error) {\n return [url, { error: String(error && error.message ? error.message : error) }];\n }\n})).then((entries) => process.stdout.write(JSON.stringify(Object.fromEntries(entries))));\n`;\n\n/** This function downloads each URL in one child process of Node. Each download stops after `HOME_TIMEOUT_MS`. */\nexport const githubFetch: HomeFetch = (urls) => {\n const fail = (error: string): ReadonlyMap<string, HomeAnswer> => new Map(urls.map((url) => [url, { error }]));\n if (urls.length === 0) return new Map();\n const result = spawnSync(process.execPath, [\"-e\", FETCH_SCRIPT, String(HOME_TIMEOUT_MS), ...urls], { encoding: \"utf8\", timeout: HOME_TIMEOUT_MS + 10_000, maxBuffer: 64 * 1024 * 1024, windowsHide: true });\n if (result.error !== undefined || result.status !== 0) return fail(result.error?.message ?? `the download ended with exit code ${String(result.status)}`);\n try {\n const answers = JSON.parse(result.stdout) as Record<string, HomeAnswer>;\n return new Map(urls.map((url) => [url, answers[url] ?? { error: \"no answer\" }]));\n } catch {\n return fail(\"the download gave no JSON\");\n }\n};\n\n/** This function gives the SHA-256 of the lines of a block: the lines with LF line ends, and a last LF. */\nexport const blockHash = (body: readonly string[]): string => createHash(\"sha256\").update(`${body.join(\"\\n\")}\\n`).digest(\"hex\");\n\n/** A block of a document: its lines without the two marker lines, and the line of its start marker (from 1). */\ninterface Block {\n readonly body: readonly string[];\n readonly line: number;\n}\n\n/** A problem in the markers of a document, with its line when the rule knows it. */\ninterface MarkerProblem {\n readonly line?: number;\n readonly message: string;\n}\n\n/**\n * This function reads the blocks of one kind (`shared` or `linked`) of a text. A block is the text between\n * `<!-- <kind>:<id> -->` and `<!-- /<kind>:<id> -->`, each alone on its line.\n */\nexport function blocksOf(text: string, kind: \"shared\" | \"linked\", problems: MarkerProblem[]): Map<string, Block> {\n const lines = text.replace(/\\r\\n/g, \"\\n\").split(\"\\n\");\n const blocks = new Map<string, Block>();\n const start = new RegExp(`^<!-- ${kind}:([a-z0-9-]+) -->$`);\n const end = new RegExp(`^<!-- /${kind}:([a-z0-9-]+) -->$`);\n const loose = new RegExp(`^\\\\s*<!-- /?${kind}:`);\n let open: { id: string; line: number } | undefined;\n let body: string[] = [];\n lines.forEach((line, index) => {\n const s = start.exec(line);\n const e = end.exec(line);\n if (s) {\n if (open !== undefined) problems.push({ line: index + 1, message: `the ${kind} block \"${s[1] ?? \"\"}\" starts inside the block \"${open.id}\".` });\n open = { id: s[1] ?? \"\", line: index + 1 };\n body = [];\n } else if (e) {\n if (open === undefined || open.id !== e[1]) problems.push({ line: index + 1, message: `the end of \"${e[1] ?? \"\"}\" does not close the open block \"${open?.id ?? \"(none)\"}\".` });\n else if (blocks.has(open.id)) problems.push({ line: index + 1, message: `the ${kind} block \"${open.id}\" occurs two times.` });\n else blocks.set(open.id, { body, line: open.line });\n open = undefined;\n } else if (open !== undefined) {\n body.push(line);\n } else if (loose.test(line)) {\n problems.push({ line: index + 1, message: `a ${kind} marker must be alone on its line.` });\n }\n });\n if (open !== undefined) problems.push({ line: open.line, message: `the ${kind} block \"${open.id}\" has no end marker.` });\n return blocks;\n}\n\n/** A linked block in a lock: the home repository, the path of the file in it, the pinned commit and the SHA-256 of the block. */\ninterface LinkedEntry {\n readonly repo: string;\n readonly path: string;\n readonly commit: string;\n readonly sha256: string;\n}\n\nconst isRecord = (value: unknown): value is Record<string, unknown> => typeof value === \"object\" && value !== null && !Array.isArray(value);\nconst linkOf = (l: LinkedEntry): string => `https://github.com/${l.repo}/blob/${l.commit}/${l.path}`;\nconst rawOf = (l: LinkedEntry): string => `https://raw.githubusercontent.com/${l.repo}/${l.commit}/${l.path}`;\n\n/** This function tells if the rule downloads the homes, from the option `remote` and the environment. */\nfunction downloads(remote: string, env: Readonly<Record<string, string | undefined>>): boolean {\n if (remote === \"always\") return true;\n if (remote === \"never\") return false;\n return env[\"CI\"] === \"true\";\n}\n\n/** This function makes the rule with the download function `fetchHomes`. The tests give a fake function. */\nexport function sharedDocsRule(fetchHomes: HomeFetch = githubFetch): Rule {\n return {\n id: \"shared-docs\",\n title: \"Each shared block of a document agrees with its lock file, and each linked block has the link to its home at the pinned commit, with the hash of the home block.\",\n reason:\n \"Three repositories kept copies of the same blocks of docs/PROMOTION.md, each with its own copy of a check script. A change in one copy did not get to the others: on 2026-11-03 the block win-test of three repositories had a hash that the home in rigor did not have. A linked block keeps one copy, in its home, and pins the commit, so a change of the home is a deliberate update of the lock.\",\n fix: 'Make the block agree with the lock, or update the lock in each repository that keeps a copy. For a block with a home in another repository, remove the copy, write `<!-- linked:<id> -->` with the link https://github.com/<repo>/blob/<commit>/<path>, and give `{repo, path, commit, sha256}` in the field \"linked\" of the lock.',\n sources: [\n { repo: \"layout-contract\", rule: \"check-shared\", doc: \"scripts/check-shared.mjs (#155, the linked form of a shared block)\" },\n { repo: \"packing\", rule: \"check-shared\", doc: \"scripts/check-shared.mjs (the same script)\" },\n { repo: \"highways\", rule: \"check-shared\", doc: \"scripts/check-shared.mjs (the same script)\" },\n ],\n options: {\n locks: { type: \"strings\", default: [], description: \"The lock files to check. With no value, the rule checks each tracked file with the name `shared.lock.json`.\" },\n remote: { type: \"string\", default: \"ci\", description: 'When the rule downloads the home of each linked block and compares its hash: \"ci\" (only when the variable CI is \"true\"), \"always\" or \"never\".' },\n },\n check(context, options) {\n const named = options[\"locks\"] as readonly string[];\n let locks: readonly string[];\n if (named.length > 0) {\n locks = named.map(cleanPath);\n } else {\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n locks = files.filter((file) => file === \"shared.lock.json\" || file.endsWith(\"/shared.lock.json\")).sort(byCode);\n }\n if (locks.length === 0) return { skipped: \"the repository has no file shared.lock.json\" };\n const breaks: Break[] = [];\n const remote: { lock: string; id: string; entry: LinkedEntry }[] = [];\n for (const lockPath of locks) {\n if (!existsSync(join(context.root, lockPath))) {\n breaks.push({ file: lockPath, message: `the option locks names ${lockPath}, and the file does not exist.` });\n continue;\n }\n let lockFile: unknown;\n try {\n lockFile = JSON.parse(readFileSync(join(context.root, lockPath), \"utf8\"));\n } catch (error) {\n breaks.push({ file: lockPath, message: `${lockPath} is not JSON: ${error instanceof Error ? error.message : String(error)}` });\n continue;\n }\n if (!isRecord(lockFile)) {\n breaks.push({ file: lockPath, message: `${lockPath} is not a JSON object.` });\n continue;\n }\n if (typeof lockFile[\"file\"] !== \"string\") {\n breaks.push({ file: lockPath, message: `${lockPath} has no field \"file\": the document of its blocks.` });\n continue;\n }\n if (!isRecord(lockFile[\"blocks\"]) && !isRecord(lockFile[\"linked\"])) {\n breaks.push({ file: lockPath, message: `${lockPath} has no field \"blocks\" and no field \"linked\", so it locks nothing.` });\n continue;\n }\n const lock = isRecord(lockFile[\"blocks\"]) ? lockFile[\"blocks\"] : {};\n const links = isRecord(lockFile[\"linked\"]) ? lockFile[\"linked\"] : {};\n const doc = cleanPath(lockFile[\"file\"]);\n if (!existsSync(join(context.root, doc))) {\n breaks.push({ file: lockPath, message: `${lockPath} locks the blocks of ${doc}, and the file does not exist.` });\n continue;\n }\n const problems: MarkerProblem[] = [];\n const text = readFileSync(join(context.root, doc), \"utf8\");\n const shared = blocksOf(text, \"shared\", problems);\n const linked = blocksOf(text, \"linked\", problems);\n for (const p of problems) breaks.push({ file: doc, ...(p.line !== undefined ? { line: p.line } : {}), message: p.message });\n\n for (const [id, hash] of Object.entries(lock).sort(([a], [b]) => byCode(a, b))) {\n const block = shared.get(id);\n if (block === undefined) breaks.push({ file: doc, message: `the shared block \"${id}\" of ${lockPath} is missing in ${doc}.` });\n else if (blockHash(block.body) !== hash) breaks.push({ file: doc, line: block.line, message: `the shared block \"${id}\" differs from ${lockPath}: its hash is ${blockHash(block.body)}.` });\n }\n for (const [id, block] of shared) if (!(id in lock)) breaks.push({ file: doc, line: block.line, message: `the shared block \"${id}\" is not in ${lockPath}.` });\n\n for (const [id, value] of Object.entries(links).sort(([a], [b]) => byCode(a, b))) {\n if (!isRecord(value)) {\n breaks.push({ file: lockPath, message: `the linked block \"${id}\" of ${lockPath} is not an object {repo, path, commit, sha256}.` });\n continue;\n }\n const entry: LinkedEntry = { repo: String(value[\"repo\"] ?? \"\"), path: String(value[\"path\"] ?? \"\"), commit: String(value[\"commit\"] ?? \"\"), sha256: String(value[\"sha256\"] ?? \"\") };\n const before = breaks.length;\n if (!/^[\\w.-]+\\/[\\w.-]+$/.test(entry.repo)) breaks.push({ file: lockPath, message: `the linked block \"${id}\" needs a repository \"<owner>/<name>\", not \"${entry.repo}\".` });\n if (entry.path === \"\") breaks.push({ file: lockPath, message: `the linked block \"${id}\" needs the path of its file in the home.` });\n if (!/^[0-9a-f]{40}$/.test(entry.commit)) breaks.push({ file: lockPath, message: `the linked block \"${id}\" needs a full commit of 40 hex digits, not \"${entry.commit}\".` });\n if (!/^[0-9a-f]{64}$/.test(entry.sha256)) breaks.push({ file: lockPath, message: `the linked block \"${id}\" needs a SHA-256 of 64 hex digits.` });\n const copy = shared.get(id);\n if (copy !== undefined) breaks.push({ file: doc, line: copy.line, message: `the linked block \"${id}\" also has a copy in ${doc}. Remove the copy.` });\n const block = linked.get(id);\n if (block === undefined) breaks.push({ file: doc, message: `the linked block \"${id}\" of ${lockPath} has no \"<!-- linked:${id} -->\" block in ${doc}.` });\n else if (!block.body.join(\"\\n\").includes(linkOf(entry))) breaks.push({ file: doc, line: block.line, message: `the linked block \"${id}\" does not contain the link ${linkOf(entry)}.` });\n if (breaks.length === before) remote.push({ lock: lockPath, id, entry });\n }\n for (const [id, block] of linked) if (!(id in links)) breaks.push({ file: doc, line: block.line, message: `the linked block \"${id}\" is not in the field \"linked\" of ${lockPath}.` });\n }\n\n if (remote.length > 0 && downloads(String(options[\"remote\"]), context.env)) {\n const answers = fetchHomes([...new Set(remote.map(({ entry }) => rawOf(entry)))]);\n for (const { lock, id, entry } of remote) {\n const url = rawOf(entry);\n const answer = answers.get(url) ?? { error: \"no answer\" };\n // A gate fails closed: a home that does not answer is a break, not a skip.\n if (\"error\" in answer) {\n breaks.push({ file: lock, message: `the home of the linked block \"${id}\" did not answer at ${url}: ${answer.error}.` });\n continue;\n }\n const problems: MarkerProblem[] = [];\n const home = blocksOf(answer.text, \"shared\", problems).get(id);\n if (home === undefined) breaks.push({ file: lock, message: `the home ${url} has no shared block \"${id}\".` });\n else if (blockHash(home.body) !== entry.sha256) breaks.push({ file: lock, message: `the linked block \"${id}\" at ${url} has the hash ${blockHash(home.body)}, not the hash of ${lock}.` });\n }\n }\n return breaks;\n },\n };\n}\n\nexport const sharedDocs: Rule = sharedDocsRule();\n","/**\n * The rule `source-main`: a workspace package is a source package, and a public package moves its\n * entries to the build when it is published.\n */\nimport { cleanPath, codePackages, lineOf, type Break, type Manifest, type Rule } from \"../rule.ts\";\n\n/** The fields of `package.json` that name the entries of a package. */\nconst ENTRY_FIELDS = [\"main\", \"module\", \"types\", \"typings\", \"exports\", \"bin\"] as const;\n\n/** This function gives each path in the value of an entry field (a string, or the strings in an object). */\nexport function pathsOf(value: unknown): string[] {\n if (typeof value === \"string\") return [value];\n if (Array.isArray(value)) return value.flatMap(pathsOf);\n if (typeof value === \"object\" && value !== null) return Object.values(value).flatMap(pathsOf);\n return [];\n}\n\n/** This function tells if a path is a source file: a file in `src/`, or a TypeScript file that is not a declaration file. */\nexport function isSourcePath(path: string): boolean {\n const clean = cleanPath(path);\n return clean.startsWith(\"src/\") || (/\\.(c|m)?tsx?$/.test(clean) && !/\\.d\\.(c|m)?ts$/.test(clean));\n}\n\nexport const sourceMain: Rule = {\n id: \"source-main\",\n title: \"Each workspace package is a source package (`main` is `src/index.ts`), and a public package moves its entries to the build in `publishConfig`.\",\n reason:\n \"Other packages of the workspace import the source, so a change is visible at once with no build. A public package that publishes its source entries gives TypeScript files to npm users.\",\n fix: 'Set `\"main\": \"./src/index.ts\"`. In a public package, add `publishConfig` with main, types, exports and bin that point at the build, as `pnpm package add` does.',\n sources: [\n { repo: \"coeval\", rule: \"package-main-source\", doc: \"CLAUDE.md:17\" },\n { repo: \"coeval\", rule: \"source-package-main\", doc: \"CLAUDE.md:17\" },\n { repo: \"crawler\", rule: \"pkg-source-main\", doc: \"CLAUDE.md:17\" },\n { repo: \"crawler\", rule: \"source-package-main\", doc: \"CLAUDE.md:17\" },\n { repo: \"crawler\", rule: \"publish-config-build\", doc: \"CLAUDE.md:41\" },\n { repo: \"private\", rule: \"new-package-main-index\", doc: \"CLAUDE.md:15\" },\n { repo: \"private\", rule: \"source-package-main\", doc: \"CLAUDE.md:15\" },\n { repo: \"headroom\", rule: \"source-package-main\", doc: \"CLAUDE.md:31\" },\n ],\n options: {\n main: { type: \"string\", default: \"src/index.ts\", description: \"The path of `main` in each package.\" },\n publishConfig: { type: \"boolean\", default: true, description: \"When false, the rule does not examine `publishConfig`.\" },\n },\n check(context, options) {\n const main = cleanPath(typeof options[\"main\"] === \"string\" ? options[\"main\"] : \"src/index.ts\");\n const breaks: Break[] = [];\n for (const info of codePackages(context)) {\n // The root of a repository of one package has no workspace that imports its source, so only its publishConfig counts\n const single = info.folder === \"\";\n const manifest = info.manifest;\n const at = (field: string): { line?: number } => {\n const line = lineOf(info.text, `\"${field}\"`);\n return line === undefined ? {} : { line };\n };\n const value = manifest[\"main\"];\n if (single) {\n // The root of a repository of one package can point main at its build\n } else if (typeof value === \"string\") {\n if (cleanPath(value) !== main) breaks.push({ file: info.file, ...at(\"main\"), message: `\"main\" is \"${value}\", not \"./${main}\".` });\n } else if (ENTRY_FIELDS.some((field) => manifest[field] !== undefined) || manifest[\"private\"] !== true) {\n // A package with only a bin (a CLI) has no entry to import, and a private package with no entry is an app (a site)\n if (manifest[\"bin\"] === undefined) breaks.push({ file: info.file, ...at(\"name\"), message: `The package has no \"main\". A source package has \"main\": \"./${main}\".` });\n }\n if (options[\"publishConfig\"] === false || manifest[\"private\"] === true) continue;\n const published = (typeof manifest[\"publishConfig\"] === \"object\" && manifest[\"publishConfig\"] !== null ? manifest[\"publishConfig\"] : {}) as Manifest;\n for (const field of ENTRY_FIELDS) {\n const source = pathsOf(manifest[field]).filter(isSourcePath);\n if (source.length === 0) continue;\n if (published[field] === undefined) {\n breaks.push({\n file: info.file,\n ...at(field),\n message: `\"${field}\" points at the source (${source[0] ?? \"\"}), and publishConfig has no \"${field}\": npm users get the source.`,\n fix: `Add publishConfig.${field} that points at the build.`,\n });\n continue;\n }\n const still = pathsOf(published[field]).filter(isSourcePath);\n if (still.length > 0) {\n breaks.push({ file: info.file, ...at(\"publishConfig\"), message: `publishConfig.${field} points at the source (${still[0] ?? \"\"}).`, fix: `Point publishConfig.${field} at the build.` });\n }\n }\n }\n return breaks;\n },\n};\n","/**\n * The rule `tests-required`: no test runner passes when it finds no test (`passWithNoTests`).\n */\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { byCode } from \"../workspace.ts\";\nimport { replaceLine, type Break, type Edit, type Rule, type RuleContext } from \"../rule.ts\";\nimport { hasTests } from \"./tsconfig-test.ts\";\n\n/** The files that set the options of a test runner: its configs, and package.json for the scripts. */\nconst RUNNER_FILE = /(?:^|\\/)(?:(?:vitest|vite|jest|playwright)(?:\\.[\\w-]+)*\\.config\\.[cm]?[jt]s|vitest\\.workspace\\.[cm]?[jt]s|package\\.json)$/;\n/** The option in a config (`passWithNoTests: true`) or on a command line (`--passWithNoTests`, `--pass-with-no-tests`). */\nconst PASS_WITH_NO_TESTS = /passWithNoTests\\s*:\\s*true|--passWithNoTests(?!=false)|--pass-with-no-tests(?!=false)/;\n\n/** A line that holds only the option in a config. `conventions fix` removes such a line. */\nconst OPTION_LINE = /^\\s*passWithNoTests\\s*:\\s*true\\s*,?\\s*$/;\n/** The option in a line of a config with more keys. The first form has the comma after it, and the second form has the comma before it. */\nconst OPTION_IN_LINE = [/\\bpassWithNoTests\\s*:\\s*true\\s*,\\s*/, /,?\\s*\\bpassWithNoTests\\s*:\\s*true\\b/] as const;\n/** The option on a command line, with the space before it. */\nconst FLAG = / --(?:passWithNoTests|pass-with-no-tests)(?:=true)?(?=\\s|\"|$)/g;\n\n/** This function gives the folder of the package that holds `file`: the longest folder of a package that starts its path. */\nfunction packageOf(context: RuleContext, file: string): string {\n let best = \"\";\n for (const info of context.packages) if (info.folder !== \"\" && file.startsWith(`${info.folder}/`) && info.folder.length > best.length) best = info.folder;\n return best;\n}\n\n/**\n * This function gives the edit that removes the option from one line, or no edit. The edit exists only when the package has\n * test files: then the test step still finds tests. A package with no tests needs a person, who removes its test script.\n */\nfunction removeOption(context: RuleContext, files: readonly string[], file: string, text: string, index: number): Edit[] {\n if (!hasTests(files, packageOf(context, file))) return [];\n const line = text.split(/\\r?\\n/)[index] ?? \"\";\n if (OPTION_LINE.test(line)) return [{ file, before: text, after: replaceLine(text, index + 1, []) }];\n const form = OPTION_IN_LINE.find((pattern) => pattern.test(line));\n const without = file.endsWith(\"package.json\") ? line.replace(FLAG, \"\") : form === undefined ? line : line.replace(form, \"\");\n return without === line ? [] : [{ file, before: text, after: replaceLine(text, index + 1, [without]) }];\n}\n\nexport const testsRequired: Rule = {\n id: \"tests-required\",\n title: \"No test runner passes when it finds no test: no `passWithNoTests: true` in a config, and no `--passWithNoTests` in a script.\",\n reason:\n \"With the option, a test step that finds 0 tests passes. A broken include pattern, a moved folder or a renamed file then turns the gate green with no test run. In an audit of 2026-10-30, vex had the option in all 9 vitest configs and client in 2 packages that have tests.\",\n fix: \"Remove the option. A package with no tests has no test script, so the shared CI skips it. A package whose tests a later change adds keeps no test script until then.\",\n sources: [{ repo: \"private\", rule: \"fail-closed\", doc: \"docs/STRATEGY.md (2026-10-30, gates and probes fail closed)\" }],\n options: {},\n check(context) {\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n const breaks: Break[] = [];\n for (const file of files.filter((path) => RUNNER_FILE.test(path)).sort(byCode)) {\n let text: string;\n try {\n text = readFileSync(join(context.root, file), \"utf8\");\n } catch {\n continue;\n }\n const lines = text.split(/\\r?\\n/);\n const index = lines.findIndex((line) => PASS_WITH_NO_TESTS.test(line));\n if (index >= 0) breaks.push({ file, line: index + 1, message: `${file} lets the tests pass when they find no test (passWithNoTests).`, edits: removeOption(context, files, file, text, index) });\n }\n return breaks;\n },\n};\n","/**\n * The rule `typed-files`: each TypeScript file that git keeps is in a tsconfig that a `typecheck`\n * script examines.\n */\nimport { spawnSync } from \"node:child_process\";\nimport { existsSync, readFileSync, statSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport { basename, dirname, join, relative, resolve } from \"node:path\";\nimport { byCode } from \"../workspace.ts\";\nimport { inheritedOption, optionPath } from \"../tsconfig.ts\";\nimport {\n codePackages,\n inFolder,\n lineOf,\n readJsonc,\n type Break,\n type Edit,\n type PackageInfo,\n type Rule,\n} from \"../rule.ts\";\n\n/** A TypeScript source: `.ts`, `.tsx`, `.mts` or `.cts`, and not a declaration file. */\nconst TYPESCRIPT = /\\.(?:[cm]?ts|tsx)$/;\nconst DECLARATION = /\\.d\\.(?:[cm]?ts|tsx)$/;\n\n/** The compilers that read `-p <config>` (or `tsconfig.json` without it). */\nconst COMPILERS = new Set([\"tsc\", \"tsgo\", \"vue-tsc\"]);\n\n/** This function gives the commands of a script: its parts between `&&`, `||`, `;`, `|` and parentheses, each as words. */\nfunction commandsOf(script: string): string[][] {\n return script\n .split(/&&|\\|\\||[;|()]/)\n .map((part) =>\n part\n .trim()\n .split(/\\s+/)\n .filter((word) => word !== \"\"),\n )\n .filter((words) => words.length > 0);\n}\n\n/** The last part of a path of a command (`node_modules/.bin/tsc` gives `tsc`). */\nconst commandName = (word: string): string =>\n word.slice(word.lastIndexOf(\"/\") + 1);\n\n/** This function gives the configs that one `tsc` command examines, from the words after the command. */\nfunction compilerConfigs(words: readonly string[]): string[] {\n const configs: string[] = [];\n let named = false;\n for (let index = 0; index < words.length; index++) {\n const word = words[index] as string;\n if (word === \"-p\" || word === \"--project\") {\n const next = words[index + 1];\n if (next !== undefined) configs.push(next);\n named = true;\n index++;\n } else if (word.startsWith(\"-p=\") || word.startsWith(\"--project=\")) {\n configs.push(word.slice(word.indexOf(\"=\") + 1));\n named = true;\n } else if (word === \"-b\" || word === \"--build\") {\n named = true;\n let more = 0;\n while (\n words[index + 1] !== undefined &&\n !(words[index + 1] as string).startsWith(\"-\")\n ) {\n configs.push(words[index + 1] as string);\n index++;\n more++;\n }\n if (more === 0) configs.push(\"tsconfig.json\");\n }\n }\n if (!named) configs.push(\"tsconfig.json\");\n return configs;\n}\n\n/** This function gives the configs that one `typecheck` script examines, relative to the folder of the package. */\nexport function configsOfScript(script: string): string[] {\n const configs: string[] = [];\n for (const words of commandsOf(script)) {\n const at = words.findIndex(\n (word) =>\n COMPILERS.has(commandName(word)) ||\n commandName(word) === \"svelte-check\",\n );\n if (at < 0) continue;\n const rest = words.slice(at + 1);\n if (commandName(words[at] as string) !== \"svelte-check\") {\n configs.push(...compilerConfigs(rest));\n continue;\n }\n for (let index = 0; index < rest.length; index++) {\n const word = rest[index] as string;\n if (word === \"--tsconfig\" && rest[index + 1] !== undefined)\n configs.push(rest[index + 1] as string);\n else if (word.startsWith(\"--tsconfig=\"))\n configs.push(word.slice(\"--tsconfig=\".length));\n }\n }\n return configs.map((config) => config.replace(/^[\"']|[\"']$/g, \"\"));\n}\n\n/** The package managers whose `run <script>` (or `<script>`) starts another script of the same package. */\nconst MANAGERS = new Set([\"pnpm\", \"npm\", \"yarn\", \"bun\"]);\n/** The options that start the script in other packages: the rule reads those packages on their own. */\nconst OTHER_PACKAGES =\n /^(?:-r|--recursive|-F|--filter(?:=.*)?|--workspaces?|-w|-ws)$/;\n\n/**\n * This function gives the text of the script `name` and of each script of the same package that it\n * starts (`pnpm run typecheck:scripts`), once each.\n */\nexport function scriptsOf(\n scripts: Readonly<Record<string, unknown>>,\n name: string,\n seen: Set<string> = new Set(),\n): string[] {\n const text = scripts[name];\n if (typeof text !== \"string\" || seen.has(name)) return [];\n seen.add(name);\n const texts = [text];\n for (const part of text.split(/&&|\\|\\||[;|]/)) {\n const words = part.trim().split(/\\s+/);\n if (\n !MANAGERS.has(words[0] ?? \"\") ||\n words.some((word) => OTHER_PACKAGES.test(word))\n )\n continue;\n const rest = words.slice(1).filter((word) => !word.startsWith(\"-\"));\n const next =\n rest[0] === \"run\" || rest[0] === \"run-script\" ? rest[1] : rest[0];\n if (next !== undefined) texts.push(...scriptsOf(scripts, next, seen));\n }\n return texts;\n}\n\n/** This function gives the path of `bin/tsc` of `typescript` of the repository, or of this package, or `undefined`. */\nfunction findTsc(root: string): string | undefined {\n for (const from of [join(root, \"package.json\"), import.meta.url]) {\n try {\n const tsc = join(\n dirname(createRequire(from).resolve(\"typescript/package.json\")),\n \"bin\",\n \"tsc\",\n );\n if (existsSync(tsc)) return tsc;\n } catch {\n // Try the next place\n }\n }\n return undefined;\n}\n\n/** This function gives the files of the program of one config (`tsc --listFilesOnly`), or the error of tsc. */\nfunction listFiles(\n tsc: string,\n config: string,\n): { readonly files: readonly string[] } | { readonly error: string } {\n const result = spawnSync(\n process.execPath,\n [tsc, \"-p\", config, \"--listFilesOnly\"],\n { encoding: \"utf8\", maxBuffer: 64 * 1024 * 1024 },\n );\n const lines = (result.stdout ?? \"\")\n .split(/\\r?\\n/)\n .filter((line) => line.trim() !== \"\");\n if (result.status !== 0)\n return {\n error:\n (result.stderr || result.stdout || `exit ${String(result.status)}`)\n .trim()\n .split(/\\r?\\n/)[0] ?? \"\",\n };\n return { files: lines.map((line) => line.trim()) };\n}\n\n/** This function gives the paths of the `references` of a config, as absolute paths. */\nfunction referencesOf(config: string): string[] {\n const json = readJsonc(config);\n const references =\n typeof json === \"object\" && json !== null\n ? (json as { references?: unknown }).references\n : undefined;\n if (!Array.isArray(references)) return [];\n return references.flatMap((item: unknown) =>\n typeof item === \"object\" &&\n item !== null &&\n typeof (item as { path?: unknown }).path === \"string\"\n ? [resolve(dirname(config), (item as { path: string }).path)]\n : [],\n );\n}\n\n/** A config file of a tool (`vitest.config.ts`), with its extension. */\nconst CONFIG_FILE = /\\.config(\\.[cm]?ts)$/;\n\n/** A `rootDir` that is the folder of the tsconfig, so that the config files at the root are in it. */\nconst ROOT_DIRS = new Set([\".\", \"./\", \"${configDir}\", \"${configDir}/\"]);\n\n/**\n * This function tells if a tsconfig gets a `rootDir` other than its folder from a config that it extends. It also says\n * yes when it cannot read that config. A `${configDir}` is the folder of the tsconfig, the other paths are relative to\n * the config that sets them.\n */\nfunction inheritsSubfolder(tsconfig: string): boolean {\n const inherited = inheritedOption(tsconfig, \"rootDir\");\n if (inherited === null) return false;\n if (inherited === undefined || typeof inherited.value !== \"string\")\n return true;\n const rootDir = optionPath(tsconfig, { file: inherited.file, value: inherited.value });\n return rootDir !== resolve(dirname(tsconfig));\n}\n\n/**\n * This function gives the edit that adds the config files at the root of a package to its `tsconfig.test.json`. It adds\n * the include `*.config.ts`. When the `rootDir` is a subfolder, it sets `rootDir: \".\"`. It also does this when the file\n * gets the `rootDir` from a config that it extends, or when it cannot read that config. A `rootDir` of the folder does\n * no harm to a test config that does not emit. The edit changes only these values and keeps the format of the file. It\n * gives no edit for a tsconfig with comments, so that no comment goes. It also gives no edit when the changed text does\n * not parse as the intended config.\n */\nfunction configEdit(root: string, tsconfig: string, extension: string): Edit[] {\n const text = readFileSync(tsconfig, \"utf8\");\n let json: { include?: unknown; compilerOptions?: Record<string, unknown> };\n try {\n json = JSON.parse(text) as typeof json;\n } catch {\n return [];\n }\n const globs = json.include;\n if (!Array.isArray(globs)) return [];\n const prefix =\n globs.length > 0 &&\n globs.every(\n (glob) => typeof glob === \"string\" && glob.startsWith(\"${configDir}/\"),\n )\n ? \"${configDir}/\"\n : \"\";\n const glob = `${prefix}*.config${extension}`;\n const eol = text.includes(\"\\r\\n\") ? \"\\r\\n\" : \"\\n\";\n let after = text;\n if (!globs.includes(glob)) {\n after = after.replace(\n /(\"include\"\\s*:\\s*\\[)([^\\]]*)\\]/,\n (_all, start: string, items: string) => {\n const kept = items.replace(/\\s+$/, \"\");\n const end = items.slice(kept.length);\n if (kept.trim() === \"\") return `${start}${JSON.stringify(glob)}]`;\n const indent = kept.includes(\"\\n\")\n ? (/\\n([ \\t]*)[^\\n]*$/.exec(kept)?.[1] ?? \"\")\n : undefined;\n return `${start}${kept},${indent === undefined ? \" \" : `${eol}${indent}`}${JSON.stringify(glob)}${end}]`;\n },\n );\n }\n const options = json.compilerOptions;\n const rootDir = options?.[\"rootDir\"];\n const moveRoot = typeof rootDir === \"string\" && !ROOT_DIRS.has(rootDir);\n if (moveRoot)\n after = after.replace(/(\"rootDir\"\\s*:\\s*)\"(?:[^\"\\\\]|\\\\.)*\"/, '$1\".\"');\n // The options that the file gets from a config that it extends can break the check of the config files: a rootDir\n // of a subfolder (`src`) leaves them out, and isolatedDeclarations refuses their `export default`. A test config does\n // not emit, so the fix sets both, also when it cannot read the config that the file extends.\n const added: Record<string, unknown> = {};\n if (after !== text) {\n if (rootDir === undefined && inheritsSubfolder(tsconfig))\n added[\"rootDir\"] = \".\";\n const isolated =\n options?.[\"isolatedDeclarations\"] === undefined\n ? inheritedOption(tsconfig, \"isolatedDeclarations\")\n : null;\n if (\n isolated === undefined ||\n (isolated !== null && isolated.value !== false)\n )\n added[\"isolatedDeclarations\"] = false;\n }\n const entries = Object.entries(added).map(\n ([key, value]) => `${JSON.stringify(key)}: ${JSON.stringify(value)}`,\n );\n if (entries.length > 0 && options !== undefined) {\n after =\n Object.keys(options).length === 0\n ? after.replace(\n /(\"compilerOptions\"\\s*:\\s*\\{)\\s*\\}/,\n `$1 ${entries.join(\", \")} }`,\n )\n : after.replace(\n /(\"compilerOptions\"\\s*:\\s*\\{)(\\s*)/,\n (_all, start: string, space: string) =>\n `${start}${space}${entries.join(`,${space}`)},${space}`,\n );\n } else if (entries.length > 0) {\n after = after.replace(\n /^(\\s*\\{)(\\s*)/,\n (_all, start: string, space: string) =>\n `${start}${space}\"compilerOptions\": { ${entries.join(\", \")} },${space}`,\n );\n }\n const include = globs.includes(glob) ? globs : [...globs, glob];\n const intended =\n entries.length > 0\n ? options === undefined\n ? { compilerOptions: added, ...json, include }\n : {\n ...json,\n compilerOptions: {\n ...added,\n ...(moveRoot ? { ...options, rootDir: \".\" } : options),\n },\n include,\n }\n : {\n ...json,\n ...(moveRoot\n ? { compilerOptions: { ...options, rootDir: \".\" } }\n : {}),\n include,\n };\n let parsed: unknown;\n try {\n parsed = JSON.parse(after);\n } catch {\n return [];\n }\n if (JSON.stringify(parsed) !== JSON.stringify(intended)) return [];\n return after === text\n ? []\n : [{ file: fromRoot(root, tsconfig), before: text, after }];\n}\n\n/** The path of `file` relative to `root`, with `/`. */\nconst fromRoot = (root: string, file: string): string =>\n relative(root, file).split(\"\\\\\").join(\"/\");\n\nexport const typedFiles: Rule = {\n id: \"typed-files\",\n title:\n \"Each TypeScript file that git keeps is in a tsconfig that a `typecheck` script examines: the tests, the e2e specs, the scripts, the benches and the configs too.\",\n reason:\n \"A file that no tsconfig of a typecheck holds has no type check. Its type errors hide until it runs, and a broken test or script can pass a gate. A test runner such as vitest strips the types, so it does not examine them. In an audit of 2026-10-30, every repository had such files (in one, 90 of 612 files, its e2e specs among them), and the new checks found real defects.\",\n fix: 'Add the file to the `include` of a tsconfig that the `typecheck` script names (for example `tsconfig.test.json`, with `*.config.ts`, `scripts/**`, `bench/**` and `e2e/**`). A config file at the root of a package needs `rootDir: \".\"` there. For the files at the root of the repository, add a `tsconfig.repo.json` and name it in the root `typecheck`. A file that cannot be in a typecheck (it imports a module that only a tool makes) goes in `ignore` with its reason.',\n sources: [\n {\n repo: \"private\",\n rule: \"fail-closed\",\n doc: \"docs/STRATEGY.md (2026-10-30, gates and probes fail closed)\",\n },\n ],\n options: {\n configs: {\n type: \"strings\",\n default: [],\n description:\n \"More tsconfig files, relative to the root, that CI examines with another command (for example a script that the typecheck starts).\",\n },\n },\n check(context, options) {\n const tracked = context.gitFiles();\n if (tracked === undefined)\n return { skipped: \"the root is not in a git repository\" };\n const files = tracked\n .filter((file) => TYPESCRIPT.test(file) && !DECLARATION.test(file))\n .sort(byCode);\n if (files.length === 0) return [];\n const tsc = findTsc(context.root);\n if (tsc === undefined)\n return [\n {\n file: \"package.json\",\n message:\n \"The rule cannot find typescript, so it cannot read the tsconfig files.\",\n fix: \"Add typescript to the devDependencies of the root package.\",\n },\n ];\n const breaks: Break[] = [];\n // The configs that a typecheck examines, as absolute paths\n const queue: string[] = [];\n // The tsconfig.test.json of each package folder that its typecheck names, for the edits\n const testConfigs = new Map<string, string>();\n const packages: PackageInfo[] = [\n context.rootPackage,\n ...codePackages(context).filter((info) => info !== context.rootPackage),\n ];\n for (const info of packages) {\n const scripts = info.manifest[\"scripts\"];\n const table =\n typeof scripts === \"object\" && scripts !== null\n ? (scripts as Record<string, unknown>)\n : {};\n const typecheck = table[\"typecheck\"];\n if (typeof typecheck !== \"string\") continue;\n for (const config of scriptsOf(table, \"typecheck\").flatMap(\n configsOfScript,\n )) {\n const path = resolve(info.dir, config);\n if (!existsSync(path)) {\n const line = lineOf(info.text, '\"typecheck\"');\n breaks.push({\n file: info.file,\n ...(line === undefined ? {} : { line }),\n message: `The script typecheck names ${inFolder(info.folder, config)}, and that file does not exist.`,\n });\n continue;\n }\n queue.push(path);\n if (\n basename(path) === \"tsconfig.test.json\" &&\n resolve(dirname(path)) === resolve(info.dir)\n )\n testConfigs.set(info.folder, path);\n }\n }\n const extra = Array.isArray(options[\"configs\"]) ? options[\"configs\"] : [];\n for (const config of extra) {\n const path = resolve(context.root, config);\n if (!existsSync(path))\n breaks.push({\n file: \"package.json\",\n message: `The option configs names ${config}, and that file does not exist.`,\n });\n else queue.push(path);\n }\n // Read each config and its references, once\n const covered = new Set<string>();\n const seen = new Set<string>();\n while (queue.length > 0) {\n let path = queue.shift() as string;\n if (existsSync(path) && statSync(path).isDirectory())\n path = join(path, \"tsconfig.json\");\n if (seen.has(path)) continue;\n seen.add(path);\n queue.push(...referencesOf(path));\n const listed = listFiles(tsc, path);\n if (\"error\" in listed) {\n breaks.push({\n file: fromRoot(context.root, path),\n message: `tsc cannot list the files of ${fromRoot(context.root, path)}: ${listed.error}`,\n });\n continue;\n }\n for (const name of listed.files)\n covered.add(fromRoot(context.root, resolve(name)));\n }\n if (seen.size === 0) {\n breaks.push({\n file: \"package.json\",\n message:\n \"No typecheck script names a tsconfig, so no TypeScript file has a type check.\",\n fix: \"Add a script typecheck (`tsc -p tsconfig.json`) to each package.\",\n });\n }\n for (const file of files) {\n if (covered.has(file)) continue;\n const folder = file.includes(\"/\")\n ? file.slice(0, file.lastIndexOf(\"/\"))\n : \"\";\n const extension = CONFIG_FILE.exec(file)?.[1];\n const tsconfig = testConfigs.get(folder);\n const edits =\n extension === undefined || tsconfig === undefined\n ? []\n : configEdit(context.root, tsconfig, extension);\n breaks.push({\n file,\n message: `${file} is in no tsconfig that a typecheck script examines.`,\n edits,\n });\n }\n return breaks;\n },\n};\n","/**\n * The rule `typed-scripts`: git keeps no JavaScript source and no shell script with logic. Each\n * script is TypeScript, which Node starts directly (type stripping), with types and tests like the code.\n */\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { byCode } from \"../workspace.ts\";\nimport type { Break, Rule } from \"../rule.ts\";\n\n/** The interpreters of a `#!` line that make a file without an extension a script of a kind. */\nconst SHEBANG = /^#!\\s*(?:\\S*\\/)?(?:env\\s+(?:-\\S+\\s+)*)?(node|bash|sh|zsh|dash|ksh|pwsh)\\b/;\n\n/** This function gives the extension of a file with its dot, in lower case, or `\"\"`. */\nfunction extensionOf(file: string): string {\n const name = file.slice(file.lastIndexOf(\"/\") + 1);\n const dot = name.lastIndexOf(\".\");\n return dot <= 0 ? \"\" : name.slice(dot).toLowerCase();\n}\n\n/** This function gives the lines of a shell script that do work: not empty, not a comment, not the `#!` line. */\nexport function codeLines(text: string): number {\n return text.split(/\\r?\\n/).filter((line) => {\n const trimmed = line.trim();\n return trimmed !== \"\" && !trimmed.startsWith(\"#\");\n }).length;\n}\n\n/** This function reads the first line of a file, or `\"\"` when the file cannot be read. */\nfunction firstLine(path: string): string {\n try {\n const text = readFileSync(path, \"utf8\");\n const end = text.indexOf(\"\\n\");\n return end < 0 ? text : text.slice(0, end);\n } catch {\n return \"\";\n }\n}\n\nexport const typedScripts: Rule = {\n id: \"typed-scripts\",\n title: \"Git keeps no JavaScript source (`.js`, `.mjs`, `.cjs`, `.jsx`) and no shell script of more than one line of code: each script is TypeScript.\",\n reason:\n \"A script has bugs like the code, and types and tests find them. Node 22.18 and later runs a `.ts` file directly, so a script in JavaScript or in a shell language has no cost to save and no check. A shell file stays only as a launcher of one line.\",\n fix: \"Rename the file to `.ts`, add the types, and check it with `tsc --noEmit` and a test. Move the logic of a shell script into a `.ts` file, and keep the shell file as one line that starts it, or remove it. A file that must stay (generated output, vendored code, a configuration that a tool reads only as JavaScript) goes in `ignore` with its reason.\",\n sources: [{ repo: \"private\", rule: \"typed-everything\", doc: \"docs/STRATEGY.md:78\" }],\n options: {\n javascript: { type: \"strings\", default: [\".js\", \".mjs\", \".cjs\", \".jsx\"], description: \"The extensions of JavaScript source.\" },\n shell: { type: \"strings\", default: [\".sh\", \".bash\", \".zsh\", \".ps1\"], description: \"The extensions of shell scripts.\" },\n shellLines: { type: \"number\", default: 1, description: \"The most lines of code that a shell script can have: a launcher.\" },\n },\n check(context, options) {\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n const javascript = new Set(Array.isArray(options[\"javascript\"]) ? options[\"javascript\"] : []);\n const shell = new Set(Array.isArray(options[\"shell\"]) ? options[\"shell\"] : []);\n const limit = typeof options[\"shellLines\"] === \"number\" ? options[\"shellLines\"] : 1;\n const breaks: Break[] = [];\n for (const file of [...files].sort(byCode)) {\n let extension = extensionOf(file);\n if (extension === \"\") {\n const interpreter = SHEBANG.exec(firstLine(join(context.root, file)))?.[1];\n if (interpreter === undefined) continue;\n extension = interpreter === \"node\" ? \".js\" : \".sh\";\n if (!javascript.has(extension) && !shell.has(extension)) continue;\n }\n if (javascript.has(extension)) {\n breaks.push({ file, message: `${file} is JavaScript.`, fix: `Rename ${file} to .ts, add the types, and check it with tsc and a test.` });\n } else if (shell.has(extension)) {\n let lines = 0;\n try {\n lines = codeLines(readFileSync(join(context.root, file), \"utf8\"));\n } catch {\n continue;\n }\n if (lines > limit) {\n breaks.push({\n file,\n message: `${file} is a shell script with ${lines} lines of code (the most is ${limit}).`,\n fix: `Move the logic of ${file} into a .ts file, and keep ${file} as a launcher of ${limit} line(s), or remove it.`,\n });\n }\n }\n }\n return breaks;\n },\n};\n","/**\n * The rule `trust-policy`: a pnpm repository sets `trustPolicy: no-downgrade` in `pnpm-workspace.yaml`. It checks each\n * version for 7 days after its publish (`trustPolicyIgnoreAfter`). It excludes the scopes of the release train.\n */\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { hasFile, type Break, type Edit, type Rule } from \"../rule.ts\";\n\nconst WORKSPACE = \"pnpm-workspace.yaml\";\n\n/** The scopes that the release train updates. The train checks the provenance of their versions itself. */\nexport const TRAIN_SCOPES = [\"@mark1russell7/*\", \"@procedures/*\"] as const;\n\n/** 7 days, in minutes. */\nexport const IGNORE_AFTER = 10_080;\n\nconst POLICY_COMMENT = [\n \"# An install fails when a new version has less trust evidence than an earlier version of the same package: for\",\n \"# example, a version with no provenance after versions from a trusted publisher. Such a version can be a stolen token.\",\n];\nconst IGNORE_COMMENT = [\n \"# The check examines the versions of the last 7 days. A stolen-token version is new, and the registry removes it in\",\n \"# hours. Older versions can have less evidence for other reasons: for example undici-types 6.21.0 under @types/node.\",\n];\nconst EXCLUDE_COMMENT = [\n \"# The release train updates our own scopes, and it checks the provenance of each version. pnpm cannot use them: it\",\n \"# ranks the first versions, which were staged by hand, above the versions from release.yml (pnpm/pnpm#16689).\",\n];\n\n/** A top-level key of the file: its line index, and its value without a comment or quotes. */\nfunction valueOf(lines: readonly string[], key: string): { index: number; value: string } | undefined {\n const index = lines.findIndex((line) => line.startsWith(`${key}:`));\n if (index < 0) return undefined;\n const value = (lines[index] ?? \"\").slice(key.length + 1).replace(/\\s+#.*$/, \"\").trim();\n return { index, value: value.replace(/^[\"']|[\"']$/g, \"\") };\n}\n\n/** This function gives the items of the block list under the line `start`, the index of its last item, and its indent. */\nfunction blockList(lines: readonly string[], start: number): { items: string[]; last: number; indent: string } {\n const items: string[] = [];\n let last = start;\n let indent = \" \";\n for (let index = start + 1; index < lines.length; index++) {\n const line = lines[index] ?? \"\";\n const text = line.trim();\n if (text === \"\" || text.startsWith(\"#\")) continue;\n if (!text.startsWith(\"- \") || line === line.trimStart()) break;\n indent = line.slice(0, line.length - line.trimStart().length);\n items.push(text.slice(2).replace(/\\s+#.*$/, \"\").trim().replace(/^[\"']|[\"']$/g, \"\"));\n last = index;\n }\n return { items, last, indent };\n}\n\n/** This function gives the text with the lines `added` after the line `after` (-1: at the end), with the line ends of the text. */\nfunction insert(text: string, after: number, added: readonly string[]): string {\n const eol = text.includes(\"\\r\\n\") ? \"\\r\\n\" : \"\\n\";\n const lines = text.split(/\\r?\\n/);\n if (after >= 0) {\n lines.splice(after + 1, 0, ...added);\n return lines.join(eol);\n }\n // At the end: one empty line before the block, and one line end after it\n while (lines.length > 0 && lines[lines.length - 1] === \"\") lines.pop();\n return [...lines, ...(lines.length > 0 ? [\"\"] : []), ...added, \"\"].join(eol);\n}\n\n/** This function gives the text with the value of the top-level key on the line `index` replaced. */\nfunction setValue(text: string, index: number, key: string, value: string): string {\n const eol = text.includes(\"\\r\\n\") ? \"\\r\\n\" : \"\\n\";\n const lines = text.split(/\\r?\\n/);\n lines[index] = `${key}: ${value}`;\n return lines.join(eol);\n}\n\nexport const trustPolicy: Rule = {\n id: \"trust-policy\",\n title: \"A pnpm repository sets `trustPolicy: no-downgrade` for the versions of the last 7 days, and excludes the scopes of the release train.\",\n reason:\n \"A stolen npm token can publish a version with no provenance, and the next install takes it. With `no-downgrade`, pnpm refuses a version with less trust evidence than an earlier version. The release age of pnpm keeps out the versions of the last day; this check covers the next days. The release train updates our own scopes at once and checks their provenance itself.\",\n fix: \"Add `trustPolicy: no-downgrade`, `trustPolicyIgnoreAfter: 10080` and a `trustPolicyExclude` with the scopes of the option `exclude` to `pnpm-workspace.yaml`. `conventions fix` writes them.\",\n sources: [{ repo: \"private\", rule: \"trust-policy\", doc: \"docs/STRATEGY.md (2026-11-01, release age and trust policy)\" }],\n options: {\n exclude: {\n type: \"strings\",\n default: [...TRAIN_SCOPES],\n description: \"The patterns that `trustPolicyExclude` must have: the scopes whose versions the release train checks.\",\n },\n ignoreAfter: {\n type: \"number\",\n default: IGNORE_AFTER,\n description: \"The smallest `trustPolicyIgnoreAfter`, in minutes. A larger value checks more versions.\",\n },\n },\n check(context, options) {\n if (!hasFile(context.root, \"pnpm-lock.yaml\")) return { skipped: \"the repository has no pnpm-lock.yaml\" };\n const exclude = Array.isArray(options[\"exclude\"]) ? (options[\"exclude\"] as readonly string[]) : TRAIN_SCOPES;\n const ignoreAfter = typeof options[\"ignoreAfter\"] === \"number\" ? options[\"ignoreAfter\"] : IGNORE_AFTER;\n const exists = hasFile(context.root, WORKSPACE);\n const text = exists ? readFileSync(join(context.root, WORKSPACE), \"utf8\") : \"\";\n const lines = text.split(/\\r?\\n/);\n const edit = (after: string): Edit[] => (after === text ? [] : [{ file: WORKSPACE, before: text, after }]);\n const at = (index: number | undefined) => (index === undefined ? {} : { line: index + 1 });\n const breaks: Break[] = [];\n\n const policy = valueOf(lines, \"trustPolicy\");\n if (policy?.value !== \"no-downgrade\") {\n breaks.push({\n file: WORKSPACE,\n ...at(policy?.index),\n message: policy === undefined ? `${exists ? WORKSPACE : \"The repository\"} does not set trustPolicy.` : `trustPolicy is \"${policy.value}\", not \"no-downgrade\".`,\n edits: edit(policy === undefined ? insert(text, -1, [...POLICY_COMMENT, \"trustPolicy: no-downgrade\"]) : setValue(text, policy.index, \"trustPolicy\", \"no-downgrade\")),\n });\n }\n\n const ignore = valueOf(lines, \"trustPolicyIgnoreAfter\");\n const minutes = ignore === undefined ? undefined : Number(ignore.value);\n if (minutes === undefined || !Number.isInteger(minutes) || minutes < ignoreAfter) {\n const after = ignore !== undefined ? setValue(text, ignore.index, \"trustPolicyIgnoreAfter\", String(ignoreAfter)) : policy !== undefined ? insert(text, policy.index, [...IGNORE_COMMENT, `trustPolicyIgnoreAfter: ${String(ignoreAfter)}`]) : text;\n breaks.push({\n file: WORKSPACE,\n ...at(ignore?.index),\n message:\n ignore === undefined\n ? `${WORKSPACE} does not set trustPolicyIgnoreAfter, so pnpm also refuses old versions that have less evidence for other reasons.`\n : `trustPolicyIgnoreAfter is ${ignore.value}, not a whole number of at least ${String(ignoreAfter)} minutes.`,\n // With no trustPolicy line, the edit waits for the next check, which places it under that line\n edits: edit(after),\n });\n }\n\n const start = lines.findIndex((line) => line.startsWith(\"trustPolicyExclude:\"));\n const inline = start >= 0 && (valueOf(lines, \"trustPolicyExclude\")?.value ?? \"\") !== \"\";\n const list = start >= 0 && !inline ? blockList(lines, start) : { items: [], last: start, indent: \" \" };\n const missing = exclude.filter((pattern) => !list.items.includes(pattern));\n if (missing.length > 0) {\n const items = missing.map((pattern) => `${list.indent}- ${JSON.stringify(pattern)}`);\n // The fix does not rewrite a list in the flow style ([a, b]): a person adds the patterns\n const after = inline ? text : start >= 0 ? insert(text, list.last, items) : policy === undefined ? text : insert(text, -1, [...EXCLUDE_COMMENT, \"trustPolicyExclude:\", ...items]);\n breaks.push({\n file: WORKSPACE,\n ...at(start >= 0 ? start : undefined),\n message: `trustPolicyExclude does not have ${missing.join(\", \")}.`,\n edits: edit(after),\n });\n }\n return breaks;\n },\n};\n","/**\n * The rule `version-title`: a merge whose title names a version sets that version in a `package.json`.\n */\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { rangeOf } from \"../change.ts\";\nimport type { Break, Rule, RuleContext } from \"../rule.ts\";\n\n/** A version of SemVer, with an optional pre-release. */\nconst SEMVER = String.raw`\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?`;\n/**\n * The places of a version in a title. The first place is in parentheses at the end, before the number of a squash, for\n * example `feat: a rule (0.3.3) (#212)`. The second place is after \"Release\" at the start, for example `Release 0.23.0`.\n */\nconst NAMED: readonly RegExp[] = [\n new RegExp(String.raw`\\((${SEMVER})\\)(?:\\s*\\(#\\d+\\))?\\s*$`),\n new RegExp(String.raw`^(?:[a-z]+(?:\\([^)]*\\))?!?:\\s*)?release v?(${SEMVER})\\b`, \"i\"),\n];\n\n/** This function gives the versions that a title names, in their order, each one time. */\nexport function namedVersions(title: string): string[] {\n const found: string[] = [];\n for (const pattern of NAMED) {\n const version = pattern.exec(title)?.[1];\n if (version !== undefined && !found.includes(version)) found.push(version);\n }\n return found;\n}\n\n/** This function gives the version of a `package.json` at a commit, or undefined. */\nfunction versionAt(context: RuleContext, commit: string, file: string): string | undefined {\n const text = context.git([\"show\", `${commit}:${file}`]);\n if (text === undefined) return undefined;\n try {\n const value = (JSON.parse(text) as { version?: unknown }).version;\n return typeof value === \"string\" ? value : undefined;\n } catch {\n return undefined;\n }\n}\n\n/** This function gives the versions that the change from `from` to `to` sets: each `package.json` whose version changes. */\nexport function setVersions(context: RuleContext, from: string, to: string): string[] | undefined {\n const out = context.git([\"diff\", \"--name-only\", \"--no-renames\", from, to, \"--\", \"package.json\", \"**/package.json\"]);\n if (out === undefined) return undefined;\n const versions: string[] = [];\n for (const file of out.split(/\\r?\\n/).filter((line) => line !== \"\")) {\n const after = versionAt(context, to, file);\n if (after !== undefined && after !== versionAt(context, from, file) && !versions.includes(after)) versions.push(after);\n }\n return versions;\n}\n\n/** This function gives the title of the pull request of the event file, or undefined. */\nfunction pullRequestTitle(context: RuleContext): string | undefined {\n const file = context.env[\"GITHUB_EVENT_PATH\"];\n if (file === undefined || file === \"\" || !existsSync(file)) return undefined;\n try {\n const title = (JSON.parse(readFileSync(file, \"utf8\")) as { pull_request?: { title?: unknown } }).pull_request?.title;\n return typeof title === \"string\" ? title : undefined;\n } catch {\n return undefined;\n }\n}\n\n/**\n * This function gives the break of a title that names a version when the change sets no version, or undefined. A change\n * that sets an other version than its title gets a release, so it does not break.\n */\nfunction breakOf(title: string, set: readonly string[], file: string, where: string): Break | undefined {\n const named = namedVersions(title);\n if (named.length === 0 || set.length > 0) return undefined;\n return {\n file,\n message: `${where} has the title \"${title}\", which names ${named.join(\", \")}, but it sets no version. The release workflow starts only on a change of a version, so the change gets no release.`,\n };\n}\n\nexport const versionTitle: Rule = {\n id: \"version-title\",\n title: \"A merge whose title names a version, for example `(0.3.3)` or `Release 0.23.0`, sets a version in a `package.json`.\",\n reason:\n \"When two pull requests set the same version line, the second one merges with no conflict and changes no version. The release workflow starts only on a change of a version, so the change gets no release. Template #164 merged so on 2026-11-04, and #215 on 2026-11-06.\",\n fix: \"Set the next free version (SemVer) in a pull request, and correct the title. On a pull request, merge the base branch in first: the version that the title names is then the version that the merge sets.\",\n sources: [\n { repo: \"template\", rule: \"version-title\", doc: \"#212 (5933b34) and #215 (e077054), 2026-11-06: both set site-pages 0.3.3, and e077054 changed no package.json\" },\n { repo: \"template\", rule: \"version-title\", doc: \"#162 (9392d6e) and #164 (5b6d568), 2026-11-04: both set site-pages 0.2.5, and #166 released the change of #164 as 0.2.6\" },\n { repo: \"rigor\", rule: \"unreleased-change\", doc: \"pull requests #18 and #20 (2026-11-02): two pull requests set the same version\" },\n ...[\"crawler\", \"coeval\"].map((repo) => ({ repo, rule: \"version-title\", doc: \".github/workflows/release.yml (it starts on a push to main that changes a package.json)\" })),\n ],\n options: {},\n check(context) {\n const event = context.env[\"GITHUB_EVENT_NAME\"];\n if (context.base === undefined && (event === \"pull_request\" || event === \"pull_request_target\")) {\n // The checkout of a pull request is its merge with the base: HEAD^1 is the base, and the title is in the event file\n const title = pullRequestTitle(context);\n if (title === undefined) return { skipped: \"the event file has no title of the pull request\" };\n const range = rangeOf(context);\n if (\"skipped\" in range) return range;\n const set = setVersions(context, range.ends[0], \"HEAD\");\n if (set === undefined) return { skipped: \"git cannot give the changed files of the pull request\" };\n const found = breakOf(title, set, \"package.json\", \"The pull request\");\n return found === undefined ? [] : [found];\n }\n // A push, or a range of `--base`: each commit on the first-parent line, against its first parent\n const range = rangeOf(context, { push: true });\n if (\"skipped\" in range) return range;\n const out = context.git([\"rev-list\", \"--first-parent\", ...range.log]);\n if (out === undefined) return { skipped: \"git cannot give the commits of the change\" };\n const breaks: Break[] = [];\n for (const commit of out.split(/\\r?\\n/).filter((line) => line !== \"\")) {\n const title = context.git([\"log\", \"-1\", \"--format=%s\", commit])?.trim();\n if (title === undefined || namedVersions(title).length === 0) continue;\n if (context.git([\"rev-parse\", \"--verify\", \"--quiet\", `${commit}^1^{commit}`]) === undefined) continue;\n const set = setVersions(context, `${commit}^1`, commit);\n if (set === undefined) continue;\n const found = breakOf(title, set, \"package.json\", `The commit ${commit.slice(0, 7)}`);\n if (found !== undefined) breaks.push(found);\n }\n return breaks;\n },\n};\n","/**\n * The rule `workflow-parses`: each workflow file and each action file of `.github` parses as YAML.\n */\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { parseAllDocuments } from \"yaml\";\nimport { byCode } from \"../workspace.ts\";\nimport type { Break, Rule } from \"../rule.ts\";\n\n/** A file that GitHub reads as YAML: a workflow, or the file `action.yml` of an action of the repository. */\nexport const GITHUB_YAML: RegExp = /^\\.github\\/(?:workflows\\/[^/]+|actions\\/(?:[^/]+\\/)*action)\\.ya?ml$/;\n\n/** A fault of the YAML of a file: its line and column (from 1), and the first line of the message of the parser. */\nexport interface YamlFault {\n readonly line: number;\n readonly column: number;\n readonly message: string;\n}\n\n/** This function gives the faults of a YAML text. A text with no fault gives an empty list. */\nexport function yamlFaults(text: string): YamlFault[] {\n const faults: YamlFault[] = [];\n for (const document of parseAllDocuments(text, { prettyErrors: true })) {\n for (const error of document.errors) {\n const at = error.linePos?.[0];\n // The pretty message repeats the lines of the file after its first line\n faults.push({ line: at?.line ?? 1, column: at?.col ?? 1, message: (error.message.split(\"\\n\")[0] ?? error.code).replace(/:$/, \"\") });\n }\n }\n return faults;\n}\n\nexport const workflowParses: Rule = {\n id: \"workflow-parses\",\n title: \"Each workflow file and each file `action.yml` of `.github` parses as YAML.\",\n reason:\n \"GitHub refuses a workflow that does not parse, and starts no job. A workflow that starts only on a schedule, a dispatch or `workflow_run` does not start on its pull request, so no check finds the fault before the merge. On 2026-11-06 a line at column 1 ended a block `run: |`, and main went red.\",\n fix: \"Correct the YAML at the line of the break. A line of a block scalar (`run: |`) has the indent of the block, also a line of a string with quotes: write `\\\\n` in place of a real line break.\",\n sources: [\n { repo: \"layout-contract\", rule: \"memory-probe\", doc: \"run 42172612147 (2026-11-06): GitHub refused memory-probe.yml, and the run had no jobs\" },\n { repo: \"highways\", rule: \"predicate-dump\", doc: \"predicate-dump.yml starts only on a schedule and a dispatch, and the monthly census of algebra reads its dumps\" },\n { repo: \"algebra\", rule: \"study-monthly\", doc: \"study-monthly.yml starts only on a schedule and a dispatch, and refreshes the data of the site\" },\n ],\n options: {},\n check(context) {\n const files = context.gitFiles();\n if (files === undefined) return { skipped: \"the root is not in a git repository\" };\n const breaks: Break[] = [];\n for (const file of files.filter((path) => GITHUB_YAML.test(path)).sort(byCode)) {\n let text: string;\n try {\n text = readFileSync(join(context.root, file), \"utf8\");\n } catch {\n continue;\n }\n // A fault often causes more faults after it, so the break names the first fault of the file and counts the others\n const [first, ...more] = yamlFaults(text);\n if (first === undefined) continue;\n const others = more.length === 0 ? \"\" : ` The parser finds ${more.length} more ${more.length === 1 ? \"fault\" : \"faults\"} after it.`;\n breaks.push({ file, line: first.line, message: `${file} does not parse as YAML, so GitHub starts no job of it: ${first.message}.${others}` });\n }\n return breaks;\n },\n};\n","/**\n * The rule `workspace-protocol`: a package uses another package of the workspace through `workspace:`.\n */\nimport { keyLine, specifiersOf, type Break, type Rule } from \"../rule.ts\";\n\n/** The fields that the rule examines. A peer dependency often keeps a range for its users, so the rule does not examine it. */\nconst FIELDS = [\"dependencies\", \"devDependencies\", \"optionalDependencies\"] as const;\n\nexport const workspaceProtocol: Rule = {\n id: \"workspace-protocol\",\n title: \"A dependency on a package of this workspace uses the `workspace:` protocol.\",\n reason:\n \"A version range or a git ref of a package of the same repository gets an old copy from the registry or from git, not the source next to it. Then a change and its test do not meet.\",\n fix: 'Use `\"workspace:*\"`. pnpm writes the real version when it publishes the package.',\n sources: [\n { repo: \"client\", rule: \"workspace-protocol\", doc: \"CLAUDE.md:52\" },\n { repo: \"client\", rule: \"workspace-deps\", doc: \"CLAUDE.md:52\" },\n { repo: \"coeval\", rule: \"pinned-deps\", doc: \"CLAUDE.md:41\" },\n { repo: \"headroom\", rule: \"non-npm-deps-pinned\", doc: \"CLAUDE.md:38\" },\n { repo: \"crawler\", rule: \"mcp-workspace-dep\", doc: \"CLAUDE.md:55\" },\n ],\n options: {\n prefix: { type: \"string\", default: \"workspace:\", description: 'The start of each specifier, for example \"workspace:*\" to refuse \"workspace:^\".' },\n },\n check(context, options) {\n const prefix = typeof options[\"prefix\"] === \"string\" ? options[\"prefix\"] : \"workspace:\";\n const names = new Set(context.packages.map((info) => info.manifest[\"name\"]).filter((name): name is string => typeof name === \"string\"));\n const breaks: Break[] = [];\n for (const info of [context.rootPackage, ...context.packages]) {\n for (const field of FIELDS) {\n for (const [name, spec] of specifiersOf(info.manifest, field)) {\n if (!names.has(name) || name === info.manifest[\"name\"] || spec.startsWith(prefix)) continue;\n const line = keyLine(info.text, field, name);\n breaks.push({\n file: info.file,\n ...(line === undefined ? {} : { line }),\n message: `${field} \"${name}\" is \"${spec}\", but \"${name}\" is a package of this workspace.`,\n fix: `Use \"${prefix === \"workspace:\" ? \"workspace:*\" : prefix}\".`,\n });\n }\n }\n }\n return breaks;\n },\n};\n","/**\n * The list of the rules, in the order of the output.\n */\nimport type { Rule } from \"../rule.ts\";\nimport { changelogVersion } from \"./changelog-version.ts\";\nimport { cuePreset } from \"./cue-preset.ts\";\nimport { gateAfterCancel } from \"./gate-after-cancel.ts\";\nimport { gateTrigger } from \"./gate-trigger.ts\";\nimport { securityOneJob } from \"./security-one-job.ts\";\nimport { setupCue } from \"./setup-cue.ts\";\nimport { sharedCi } from \"./shared-ci.ts\";\nimport { serviceRunMain } from \"./service-run-main.ts\";\nimport { homePackage } from \"./home-package.ts\";\nimport { licenseFile } from \"./license-file.ts\";\nimport { mainCheck } from \"./main-check.ts\";\nimport { mainRunsFinish } from \"./main-runs-finish.ts\";\nimport { noBuildOutput } from \"./no-build-output.ts\";\nimport { noLocalPaths } from \"./no-local-paths.ts\";\nimport { packNoBuildinfo } from \"./pack-no-buildinfo.ts\";\nimport { apiReportScript } from \"./api-report-script.ts\";\nimport { pagesAfterRelease } from \"./pages-after-release.ts\";\nimport { pagesSite } from \"./pages-site.ts\";\nimport { pinnedGitDeps } from \"./pinned-git-deps.ts\";\nimport { pipeFails } from \"./pipe-fails.ts\";\nimport { pushMainOnly } from \"./push-main-only.ts\";\nimport { publishedMinor } from \"./published-minor.ts\";\nimport { releaseFiles } from \"./release-files.ts\";\nimport { requiredScripts } from \"./required-scripts.ts\";\nimport { roadmapParses } from \"./roadmap-parses.ts\";\nimport { runnerBudget } from \"./runner-budget.ts\";\nimport { sharedDocs } from \"./shared-docs.ts\";\nimport { sourceMain } from \"./source-main.ts\";\nimport { testsRequired } from \"./tests-required.ts\";\nimport { tsconfigTest } from \"./tsconfig-test.ts\";\nimport { typedFiles } from \"./typed-files.ts\";\nimport { typedScripts } from \"./typed-scripts.ts\";\nimport { trustPolicy } from \"./trust-policy.ts\";\nimport { unreleasedChange } from \"./unreleased-change.ts\";\nimport { versionTitle } from \"./version-title.ts\";\nimport { workflowParses } from \"./workflow-parses.ts\";\nimport { workspaceProtocol } from \"./workspace-protocol.ts\";\n\n/** Each rule of the check. */\nexport const RULES: readonly Rule[] = [\n pinnedGitDeps,\n workspaceProtocol,\n trustPolicy,\n sourceMain,\n serviceRunMain,\n tsconfigTest,\n cuePreset,\n requiredScripts,\n noBuildOutput,\n noLocalPaths,\n apiReportScript,\n releaseFiles,\n unreleasedChange,\n versionTitle,\n publishedMinor,\n changelogVersion,\n typedScripts,\n typedFiles,\n mainCheck,\n testsRequired,\n roadmapParses,\n workflowParses,\n runnerBudget,\n mainRunsFinish,\n pushMainOnly,\n pipeFails,\n gateAfterCancel,\n gateTrigger,\n securityOneJob,\n sharedCi,\n setupCue,\n homePackage,\n licenseFile,\n packNoBuildinfo,\n pagesSite,\n pagesAfterRelease,\n sharedDocs,\n];\n\nexport { publishedMinor };\nexport { apiReportScript, changelogVersion, cuePreset, gateAfterCancel, gateTrigger, securityOneJob, serviceRunMain, setupCue, sharedCi, homePackage, licenseFile, mainCheck, mainRunsFinish, noBuildOutput, noLocalPaths, packNoBuildinfo, pagesAfterRelease, pagesSite, pinnedGitDeps, pipeFails, pushMainOnly, releaseFiles, requiredScripts, roadmapParses, runnerBudget, sharedDocs, sourceMain, testsRequired, trustPolicy, tsconfigTest, typedFiles, typedScripts, unreleasedChange, versionTitle, workflowParses, workspaceProtocol };\n","/**\n * The commands `conventions pre-push` and `conventions hook install`. The hook `pre-push` of git starts the first\n * command before each push. It examines the new commits of the push with the private name list, which is outside\n * of the public repositories. The second command writes that hook.\n */\nimport { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { join, resolve } from \"node:path\";\nimport { parseConfig } from \"./config.ts\";\nimport { matchesAny, type Break, type Manifest } from \"./rule.ts\";\nimport { RULES } from \"./rules/index.ts\";\nimport { repositoryOfRemote } from \"./rules/runner-budget.ts\";\nimport { parsePrivateNames, PrivateNameListError, type PrivateNameList } from \"./private-names.ts\";\nimport {\n invalidPatternBreaks,\n PRIVATE_NAMES_FILE_CONFIG,\n PRIVATE_NAMES_FILE_VARIABLE,\n privateNamesFile,\n privatePatterns,\n privateTextBreaks,\n type PrivateSources,\n} from \"./rules/no-local-paths.ts\";\nimport type { CliIo } from \"./run.ts\";\n\n/** The line of `conventions pre-push` when no setting names a private name list and no environment variable has a pattern. */\nexport const NO_READ_LINE: string = `conventions pre-push: No read: no private name list. Set ${PRIVATE_NAMES_FILE_VARIABLE} or the git config ${PRIVATE_NAMES_FILE_CONFIG}.`;\n\n/** The options of `prePush`. */\nexport interface PrePushOptions {\n /** The name of the remote: the first argument of the hook. */\n readonly remote: string;\n /**\n * The URL of the remote: the second argument of the hook. The list `allow` of the private name list uses its repository.\n * With no URL, the command asks `git remote get-url`.\n */\n readonly url?: string;\n /** The standard input of the hook: a line `<local ref> <local sha> <remote ref> <remote sha>` for each ref of the push. */\n readonly input: string;\n readonly env: Readonly<Record<string, string | undefined>>;\n /** The root of the working tree. A relative path of the private name list starts at the root. */\n readonly root: string;\n /** This function starts git in the root, and gives its output, or undefined when git fails. */\n readonly git: (args: readonly string[]) => string | undefined;\n /** This function reads a file as text. The default reads it with `node:fs`. */\n readonly readFile?: (path: string) => string;\n}\n\n/** A sha of no commit: git gives it for a ref that the push deletes, or for a ref that the remote does not have. */\nconst ZERO = /^0+$/;\n\n/** The form of a sha of a commit. */\nconst SHA = /^[0-9a-f]{40,64}$/;\n\n/** The home folder settings of the rule `no-local-paths` in the root `package.json`. */\ninterface HomeSettings {\n readonly on: boolean;\n readonly allow: readonly string[];\n readonly ignore: readonly string[];\n}\n\n/**\n * This function reads the settings of the rule `no-local-paths` in the root `package.json`: the state, the permitted names\n * and the globs of `ignore` and `generated`. They apply only to the home folders. A private pattern always counts.\n */\nfunction homeSettings(root: string, readFile: (path: string) => string): HomeSettings {\n try {\n const manifest = JSON.parse(readFile(join(root, \"package.json\"))) as Manifest;\n const config = parseConfig(manifest[\"conventions\"], RULES).rules[\"no-local-paths\"];\n if (config === undefined) return { on: true, allow: [], ignore: [] };\n const allow = config.options[\"allow\"];\n return { on: config.off === undefined, allow: Array.isArray(allow) ? [...allow] : [], ignore: [...config.ignore, ...(config.generated ?? [])] };\n } catch {\n // The check of CI reports a configuration that does not parse. The hook uses the defaults\n return { on: true, allow: [], ignore: [] };\n }\n}\n\n/** This function gives the text of a path in a header of a patch, without the quotes of git. */\nfunction unquote(path: string): string {\n if (!path.startsWith('\"') || !path.endsWith('\"')) return path;\n const bytes: number[] = [];\n const body = path.slice(1, -1);\n const escapes: Record<string, number> = { a: 7, b: 8, t: 9, n: 10, v: 11, f: 12, r: 13, '\"': 34, \"\\\\\": 92 };\n for (let index = 0; index < body.length; index++) {\n if (body.charAt(index) !== \"\\\\\") {\n // One code point, so a pair of surrogates stays one character\n const char = String.fromCodePoint(body.codePointAt(index) ?? 0);\n bytes.push(...Buffer.from(char, \"utf8\"));\n index += char.length - 1;\n continue;\n }\n const octal = /^[0-7]{3}/.exec(body.slice(index + 1));\n if (octal !== null) {\n bytes.push(parseInt(octal[0], 8));\n index += 3;\n continue;\n }\n const next = body.charAt(index + 1);\n bytes.push(escapes[next] ?? next.charCodeAt(0));\n index += 1;\n }\n return Buffer.from(bytes).toString(\"utf8\");\n}\n\n/** A run of added lines of one file that follow each other in the new file. */\ninterface AddedRun {\n readonly file: string;\n /** The line of the first line in the new file, from 1. */\n readonly first: number;\n readonly lines: string[];\n}\n\n/**\n * This function gives the added lines of a patch of `git show --unified=0`, in runs of lines that follow each other.\n * It reads the counts of each hunk, so an added line that starts with `+++` is a line, not a header. It also reads the\n * combined patch of a merge commit, with one column of marks for each parent.\n */\nexport function addedRuns(patch: string): readonly AddedRun[] {\n const runs: AddedRun[] = [];\n let file: string | undefined;\n let columns = 1;\n let parentLeft: number[] = [];\n let resultLeft = 0;\n let next = 0;\n for (const raw of patch.split(\"\\n\")) {\n const line = raw.endsWith(\"\\r\") ? raw.slice(0, -1) : raw;\n if (line.startsWith(\"\\\\\")) continue;\n if (resultLeft > 0 || parentLeft.some((count) => count > 0)) {\n const marks = line.slice(0, columns);\n const removed = marks.includes(\"-\");\n for (let column = 0; column < columns; column++) {\n const mark = marks.charAt(column);\n if (mark === \"-\" || (!removed && mark === \" \")) parentLeft[column] = (parentLeft[column] ?? 0) - 1;\n }\n if (removed) continue;\n resultLeft -= 1;\n if (marks.includes(\"+\") && file !== undefined) {\n const text = line.slice(columns);\n const last = runs.at(-1);\n if (last !== undefined && last.file === file && last.first + last.lines.length === next) last.lines.push(text);\n else runs.push({ file, first: next, lines: [text] });\n }\n next += 1;\n continue;\n }\n if (line.startsWith(\"diff \")) {\n file = undefined;\n continue;\n }\n if (line.startsWith(\"+++ \")) {\n const path = unquote(line.slice(4));\n file = path === \"/dev/null\" ? undefined : path.replace(/^b\\//, \"\");\n continue;\n }\n const hunk = /^(@{2,}) ((?:-\\d+(?:,\\d+)? )+)\\+(\\d+)(?:,(\\d+))? \\1/.exec(line);\n if (hunk === null) continue;\n columns = (hunk[1] ?? \"@@\").length - 1;\n parentLeft = (hunk[2] ?? \"\")\n .trim()\n .split(\" \")\n .map((range) => {\n const count = /^-\\d+(?:,(\\d+))?$/.exec(range)?.[1];\n return count === undefined ? 1 : Number(count);\n });\n next = Number(hunk[3]);\n resultLeft = hunk[4] === undefined ? 1 : Number(hunk[4]);\n }\n return runs;\n}\n\n/** This function gives the place of a break as `file:line`. */\nconst placeOf = (item: Break): string => (item.line === undefined ? item.file : `${item.file}:${String(item.line)}`);\n\n/** The result of the examination of one commit. */\ninterface CommitRead {\n readonly breaks: readonly Break[];\n readonly lines: number;\n}\n\n/** This function examines one commit: its message, the paths that it adds or changes, and each line that it adds. */\nfunction readCommit(sha: string, privates: PrivateSources, home: HomeSettings, repo: string | undefined, git: PrePushOptions[\"git\"]): CommitRead | undefined {\n const short = sha.slice(0, 12);\n const message = git([\"show\", \"-s\", \"--format=%B\", sha]);\n const names = git([\"show\", \"--format=\", \"--name-only\", \"--diff-filter=AMRC\", \"-z\", \"--no-ext-diff\", sha]);\n const patch = git([\"-c\", \"core.quotePath=false\", \"show\", \"--format=\", \"--no-color\", \"--unified=0\", \"--no-ext-diff\", \"--no-textconv\", \"--src-prefix=a/\", \"--dst-prefix=b/\", sha]);\n if (message === undefined || names === undefined || patch === undefined) return undefined;\n const breaks: Break[] = [];\n const add = (items: readonly Break[]): void => {\n for (const item of items) breaks.push(item);\n };\n const text = message.replace(/\\s+$/, \"\");\n add(privateTextBreaks(`commit ${short} message`, text, privates, { allow: home.allow, homes: home.on }));\n let lines = text === \"\" ? 0 : text.split(/\\r?\\n/).length;\n const runs = addedRuns(patch);\n // The empty format can put a line end before the first name\n const paths = names\n .replace(/^\\n+/, \"\")\n .split(\"\\0\")\n .filter((path) => path !== \"\");\n for (const run of runs) if (!paths.includes(run.file)) paths.push(run.file);\n // A break of a path does not show the path, because the path has the private text. The lines of that file do not show it either\n const shown = new Map<string, string>();\n paths.forEach((path, index) => {\n const homes = home.on && !matchesAny(path, home.ignore);\n const found = privateTextBreaks(`commit ${short} path ${String(index + 1)}`, path, privates, { allow: home.allow, homes, isPath: true });\n lines += 1;\n shown.set(path, found.length > 0 ? `commit ${short} path ${String(index + 1)}` : `commit ${short} ${path}`);\n for (const item of found) breaks.push({ file: item.file, message: item.message.replace(/^A text /, \"The path \"), ...(item.fix === undefined ? {} : { fix: item.fix }) });\n });\n for (const run of runs) {\n const homes = home.on && !matchesAny(run.file, home.ignore);\n const place = { ...(repo === undefined ? {} : { repo }), path: run.file };\n add(privateTextBreaks(shown.get(run.file) ?? `commit ${short} ${run.file}`, run.lines.join(\"\\n\"), privates, { allow: home.allow, homes, firstLine: run.first, rootPackage: run.file === \"package.json\", ...place }));\n lines += run.lines.length;\n }\n return { breaks, lines };\n}\n\n/** This function gives the reason of a read that failed, in words. */\nfunction readReason(error: unknown): string {\n const code = typeof error === \"object\" && error !== null && \"code\" in error ? String((error as { code: unknown }).code) : \"\";\n if (code === \"ENOENT\") return \"the file does not exist\";\n if (code === \"EISDIR\") return \"the path is a folder\";\n if (code === \"EACCES\" || code === \"EPERM\") return \"the file has no read permission\";\n return error instanceof Error ? error.message : String(error);\n}\n\n/**\n * This function gives the repository `owner/name` of the push: from the URL of the hook, else from `git remote get-url`.\n * It gives undefined when neither URL is a URL of a GitHub repository.\n */\nfunction repoOfPush(options: PrePushOptions): string | undefined {\n const fromHook = options.url === undefined ? undefined : repositoryOfRemote(options.url);\n return fromHook ?? repositoryOfRemote(options.git([\"remote\", \"get-url\", options.remote]) ?? \"\");\n}\n\n/**\n * This function is the command `conventions pre-push`. It examines each new commit of the push: its message, the paths\n * that it adds or changes, and each line that it adds. It writes the breaks to `stderr`, and gives the exit code: 1 on a\n * break, 0 on a pass. With no private name list and no private pattern, it writes the line `NO_READ_LINE` and gives 0.\n */\nexport function prePush(options: PrePushOptions, io: Pick<CliIo, \"stderr\">): number {\n const readFile = options.readFile ?? ((path: string): string => readFileSync(path, \"utf8\"));\n const file = privateNamesFile(options.env, options.git);\n const patterns = privatePatterns(options.env);\n if (file === undefined && patterns.length === 0) {\n // A push with no read is not a pass, so the line tells it. It does not stop the push\n io.stderr(`${NO_READ_LINE}\\n`);\n return 0;\n }\n let names: PrivateNameList | undefined;\n if (file !== undefined) {\n // A list that the settings name and that the gate cannot read or parse stops the push: the check fails closed\n const source = (options.env[PRIVATE_NAMES_FILE_VARIABLE]?.trim() ?? \"\") !== \"\" ? PRIVATE_NAMES_FILE_VARIABLE : `the git config ${PRIVATE_NAMES_FILE_CONFIG}`;\n let text: string;\n try {\n text = readFile(resolve(options.root, file));\n } catch (error) {\n io.stderr(`conventions pre-push: Cannot read the private name list that ${source} names: ${readReason(error)}. Correct the setting or the file. The push stops.\\n`);\n return 1;\n }\n try {\n names = parsePrivateNames(text);\n } catch (error) {\n const reason = error instanceof PrivateNameListError ? error.reason : \"the parse failed\";\n io.stderr(`conventions pre-push: The private name list that ${source} names is not valid: ${reason}. Correct the file. The push stops.\\n`);\n return 1;\n }\n }\n const privates: PrivateSources = { ...(names === undefined ? {} : { names }), patterns };\n const repo = names === undefined || names.allow.length === 0 ? undefined : repoOfPush(options);\n const home = homeSettings(options.root, readFile);\n const breaks: Break[] = invalidPatternBreaks(patterns);\n const commits = new Set<string>();\n for (const line of options.input.split(/\\r?\\n/)) {\n if (line.trim() === \"\") continue;\n const [localRef, localSha, , remoteSha] = line.trim().split(/\\s+/);\n if (localSha === undefined || remoteSha === undefined || !SHA.test(localSha) || !SHA.test(remoteSha)) {\n io.stderr(`conventions pre-push: The input line \"${line.trim()}\" does not have the form <local ref> <local sha> <remote ref> <remote sha>. The push stops.\\n`);\n return 1;\n }\n // The push deletes the ref, so it adds no commit\n if (ZERO.test(localSha)) continue;\n const others = [\"rev-list\", localSha, \"--not\", `--remotes=${options.remote}`];\n const listed = ZERO.test(remoteSha) ? options.git(others) : (options.git([\"rev-list\", localSha, `^${remoteSha}`]) ?? options.git(others));\n if (listed === undefined) {\n io.stderr(`conventions pre-push: git cannot list the new commits of ${localRef ?? localSha}. The push stops.\\n`);\n return 1;\n }\n for (const sha of listed.split(/\\r?\\n/)) if (SHA.test(sha.trim())) commits.add(sha.trim());\n }\n let lines = 0;\n for (const sha of commits) {\n const read = readCommit(sha, privates, home, repo, options.git);\n if (read === undefined) {\n io.stderr(`conventions pre-push: git cannot show the commit ${sha.slice(0, 12)}. The push stops.\\n`);\n return 1;\n }\n for (const item of read.breaks) breaks.push(item);\n lines += read.lines;\n }\n if (breaks.length === 0) {\n io.stderr(`conventions pre-push: ${String(commits.size)} commits, ${String(lines)} lines read, 0 breaks.\\n`);\n return 0;\n }\n const out = [`conventions pre-push: ${String(commits.size)} commits, ${String(lines)} lines read, ${String(breaks.length)} breaks. The push stops.`];\n for (const item of breaks) {\n out.push(` ${placeOf(item)} ${item.message}`);\n if (item.fix !== undefined) out.push(` fix: ${item.fix}`);\n }\n out.push(\"Change the commits (git commit --amend, or git rebase), and push again.\");\n io.stderr(`${out.join(\"\\n\")}\\n`);\n return 1;\n}\n\n/** The marker line of the hook that `conventions hook install` writes. The command rewrites only a hook with this line. */\nexport const HOOK_MARKER = \"# conventions hook: pre-push\";\n\n/** The first version of the package with the command `conventions pre-push`. */\nexport const FIRST_PRE_PUSH_VERSION = \"0.37.1\";\n\n/** This function gives the version of this package, from its package.json, or FIRST_PRE_PUSH_VERSION when it cannot read it. */\nfunction ownVersion(): string {\n try {\n const { version } = JSON.parse(readFileSync(new URL(\"../package.json\", import.meta.url), \"utf8\")) as { version?: unknown };\n return typeof version === \"string\" && /^\\d+\\.\\d+\\.\\d+/.test(version) ? version : FIRST_PRE_PUSH_VERSION;\n } catch {\n return FIRST_PRE_PUSH_VERSION;\n }\n}\n\n/**\n * A Node program for the hook. Argument 1 is a package.json, and argument 2 is a version. The program exits 0 when the\n * version of the package.json is the same as or later than argument 2, and 1 otherwise. A pre-release counts as its release. It has no single quote, so the shell\n * gives it as one argument.\n */\nconst AT_LEAST =\n 'let v;try{v=JSON.parse(require(\"fs\").readFileSync(process.argv[1],\"utf8\")).version}catch{process.exit(1)}' +\n 'const a=String(v).split(\"-\")[0].split(\".\").map(Number),b=process.argv[2].split(\".\").map(Number);' +\n \"for(let i=0;i<3;i++)if(a[i]!==b[i])process.exit(a[i]>b[i]?0:1);process.exit(0)\";\n\n/**\n * The text of the hook `pre-push` that `conventions hook install` writes: a POSIX shell script.\n *\n * Git keeps one hooks folder for all worktrees of a repository, but each worktree has its own node_modules. A worktree\n * of an older branch can have a conventions with no pre-push command (before 0.37.1). Then the hook starts the\n * version that wrote it, with pnpm dlx. The hook stays closed: when no conventions can start, the push stops.\n */\nexport const PRE_PUSH_HOOK: string = `#!/bin/sh\n${HOOK_MARKER}\n# The command \"conventions hook install\" wrote this file, and each install writes it again.\n# The hook examines the new commits of each push with the private name list.\n# All worktrees use this file. A worktree with a conventions older than ${FIRST_PRE_PUSH_VERSION} has no pre-push command,\n# so then the hook starts the version that wrote it.\nroot=\"$(git rev-parse --show-toplevel)\" || exit 1\nbin=\"$root/node_modules/.bin/conventions\"\npkg=\"$root/node_modules/@mark1russell7/conventions/package.json\"\nif [ -x \"$bin\" ] && node -e '${AT_LEAST}' \"$pkg\" ${FIRST_PRE_PUSH_VERSION} 2>/dev/null; then\n exec \"$bin\" pre-push \"$@\"\nfi\nexec pnpm dlx @mark1russell7/conventions@${ownVersion()} pre-push \"$@\"\n`;\n\n/** The options of `installHook`. */\nexport interface HookOptions {\n /** The folder of the command. A relative hooks folder of git starts here. */\n readonly cwd: string;\n readonly env: Readonly<Record<string, string | undefined>>;\n /** This function starts git in `cwd`, and gives its output, or undefined when git fails. */\n readonly git: (args: readonly string[]) => string | undefined;\n}\n\n/** This function tells if the environment is a CI run. */\nconst isCi = (env: Readonly<Record<string, string | undefined>>): boolean => [\"true\", \"1\"].includes((env[\"CI\"] ?? \"\").toLowerCase()) || env[\"GITHUB_ACTIONS\"] === \"true\";\n\n/**\n * This function is the command `conventions hook install`. It writes the hook `pre-push` into the hooks folder of git,\n * so it uses the folder of `core.hooksPath` and works in a worktree. It keeps a hook that does not have `HOOK_MARKER`, and writes a warning.\n * In CI or outside a git repository, it writes one line and does nothing.\n */\nexport function installHook(options: HookOptions, io: Pick<CliIo, \"stdout\" | \"stderr\">): number {\n if (isCi(options.env)) {\n io.stdout(\"conventions hook install: CI has no push hook, so the command does nothing.\\n\");\n return 0;\n }\n const hooks = options.git([\"rev-parse\", \"--git-path\", \"hooks\"])?.trim() ?? \"\";\n if (hooks === \"\") {\n io.stdout(\"conventions hook install: The folder is not in a git repository, so the command does nothing.\\n\");\n return 0;\n }\n const dir = resolve(options.cwd, hooks);\n const file = join(dir, \"pre-push\");\n const shown = `${hooks.replace(/[\\\\/]+$/, \"\")}/pre-push`;\n const before = existsSync(file) ? readFileSync(file, \"utf8\") : undefined;\n if (before !== undefined && !before.includes(HOOK_MARKER)) {\n io.stderr(`conventions hook install: warning: ${shown} exists and conventions did not write it. The command keeps it. Add the line 'conventions pre-push \"$@\"' to it, or remove it and install again.\\n`);\n return 0;\n }\n if (before === PRE_PUSH_HOOK) {\n io.stdout(`conventions hook install: ${shown} is current.\\n`);\n return 0;\n }\n try {\n mkdirSync(dir, { recursive: true });\n writeFileSync(file, PRE_PUSH_HOOK, { mode: 0o755 });\n chmodSync(file, 0o755);\n } catch (error) {\n io.stderr(`conventions hook install: Cannot write ${shown}: ${error instanceof Error ? error.message : String(error)}\\n`);\n return 1;\n }\n io.stdout(`conventions hook install: ${before === undefined ? \"wrote\" : \"updated\"} ${shown}.\\n`);\n return 0;\n}\n","/**\n * The commands `check`, `fix` and `--list` of the bin `conventions`, as functions. `runChecks` starts the\n * rules, `runFix` writes the edits of the breaks, and `runCli` reads the arguments and writes the result.\n * The commands `pre-push` and `hook install` are in `pre-push.ts`.\n */\nimport { appendFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { dirname, join, resolve } from \"node:path\";\nimport { addedFiles } from \"./change.ts\";\nimport { findHomes, HOMES, mapMarkdown, mapText, mergeHomes, readOverlay, type Home } from \"./map.ts\";\nimport { parseConfig, type ConventionsConfig } from \"./config.ts\";\nimport { installHook, prePush } from \"./pre-push.ts\";\nimport { matchesAny, runGit, type Break, type Manifest, type PackageInfo, type Rule, type RuleContext } from \"./rule.ts\";\nimport { RULES } from \"./rules/index.ts\";\nimport { packageFolders, relativePath } from \"./workspace.ts\";\n\n/** The result of one rule. */\nexport interface RuleResult {\n readonly id: string;\n readonly title: string;\n readonly fix: string;\n /**\n * `pass`: no break. `break`: one or more breaks. `warn`: one or more breaks before the day `failsFrom` of the rule, so the\n * check passes. `off`: the configuration turns the rule off. `skipped`: the rule did not start. `error`: the rule threw.\n */\n readonly status: \"pass\" | \"break\" | \"warn\" | \"off\" | \"skipped\" | \"error\";\n readonly breaks: readonly Break[];\n /** The number of breaks in the files of `ignore`. */\n readonly ignored: number;\n /** The reason of `off`, of `ignore`, of `skipped`, or the message of `error`. */\n readonly note?: string;\n}\n\n/** The result of `runChecks`. */\nexport interface CheckResult {\n readonly rules: readonly RuleResult[];\n /** True when a rule has a break or an error. */\n readonly failed: boolean;\n}\n\n/** The options of `runChecks`. */\nexport interface CheckOptions {\n /** The root of the repository. */\n readonly root: string;\n /** Only these rules. The default is each rule. */\n readonly only?: readonly string[];\n /** The base commit of the change, for the rules that examine a change. */\n readonly base?: string;\n readonly env?: Readonly<Record<string, string | undefined>>;\n /** The rules. The default is `RULES`. */\n readonly rules?: readonly Rule[];\n /** The day of the check (`YYYY-MM-DD`, UTC), for `failsFrom`. The default is the day of the clock. */\n readonly today?: string;\n}\n\n/** This function reads a `package.json` file. */\nfunction readPackage(root: string, dir: string): PackageInfo {\n const path = join(dir, \"package.json\");\n const text = readFileSync(path, \"utf8\");\n const parsed: unknown = JSON.parse(text);\n const manifest = (typeof parsed === \"object\" && parsed !== null ? parsed : {}) as Manifest;\n return { folder: relativePath(root, dir), dir, file: relativePath(root, path), text, manifest };\n}\n\n/** This function reads the configuration of the root `package.json` at `root`. */\nexport function readConfig(root: string, rules: readonly Rule[] = RULES): ConventionsConfig {\n const file = join(root, \"package.json\");\n if (!existsSync(file)) throw new Error(`No package.json in ${root}.`);\n return parseConfig((JSON.parse(readFileSync(file, \"utf8\")) as Manifest)[\"conventions\"], rules);\n}\n\n/** This function gives the facts of the repository at `root` that the rules read. */\nexport function createContext(root: string, config: ConventionsConfig, options: Pick<CheckOptions, \"base\" | \"env\"> = {}): RuleContext {\n const rootPackage = readPackage(root, root);\n const packages = packageFolders(root, config.packages ?? undefined)\n .filter((dir) => resolve(dir) !== resolve(root))\n .map((dir) => readPackage(root, dir));\n let files: readonly string[] | undefined | null = null;\n return {\n root,\n rootPackage,\n packages,\n env: options.env ?? {},\n ...(options.base === undefined ? {} : { base: options.base }),\n gitFiles() {\n if (files === null) {\n const out = runGit(root, [\"ls-files\", \"-z\", \"--cached\"]);\n files = out === undefined ? undefined : out.split(\"\\0\").filter((file) => file !== \"\");\n }\n return files;\n },\n git: (args) => runGit(root, args),\n };\n}\n\n/** This function starts each rule on the repository at `options.root`, and gives the result of each rule. */\nexport function runChecks(options: CheckOptions): CheckResult {\n const root = resolve(options.root);\n const rules = options.rules ?? RULES;\n const unknown = (options.only ?? []).filter((id) => !rules.some((rule) => rule.id === id));\n if (unknown.length > 0) throw new Error(`Unknown rule: ${unknown.join(\", \")}. The rules are: ${rules.map((rule) => rule.id).join(\", \")}.`);\n const config = readConfig(root, rules);\n const context = createContext(root, config, options);\n const today = options.today ?? new Date().toISOString().slice(0, 10);\n const results: RuleResult[] = [];\n for (const rule of rules) {\n if (options.only !== undefined && options.only.length > 0 && !options.only.includes(rule.id)) continue;\n const ruleConfig = config.rules[rule.id] ?? { ignore: [], options: {} };\n const base = { id: rule.id, title: rule.title, fix: rule.fix };\n if (ruleConfig.off !== undefined) {\n results.push({ ...base, status: \"off\", breaks: [], ignored: 0, note: ruleConfig.off });\n continue;\n }\n let outcome: ReturnType<Rule[\"check\"]>;\n try {\n outcome = rule.check(context, ruleConfig.options);\n } catch (error) {\n results.push({ ...base, status: \"error\", breaks: [], ignored: 0, note: error instanceof Error ? error.message : String(error) });\n continue;\n }\n if (\"skipped\" in outcome) {\n results.push({ ...base, status: \"skipped\", breaks: [], ignored: 0, note: outcome.skipped });\n continue;\n }\n // `ignore` keeps the exceptions that exist. A file that the change adds is not one of them, so `ignore` does not\n // cover it: the glob scripts/*.mjs let new JavaScript files in with no check (client, 11-02).\n // `generated` is build output: a build adds a file there for each new source file, so it covers added files too.\n const generated = ruleConfig.generated ?? [];\n const added = ruleConfig.ignore.length > 0 ? addedFiles(context) : undefined;\n const breaks: Break[] = [];\n for (const item of outcome) {\n if (matchesAny(item.file, generated)) continue;\n if (!matchesAny(item.file, ruleConfig.ignore)) breaks.push(item);\n else if (added?.has(item.file) === true) breaks.push({ ...item, message: `${item.message} The change adds this file, so \\`ignore\\` does not cover it.` });\n }\n const ignored = outcome.length - breaks.length;\n // An entry of `ignore` that matches no break is stale. A converted file stays on the list, and a new file with\n // the same name later passes with no check (found on 11-03).\n if (rule.changeScoped !== true) {\n for (const [field, globs] of [[\"ignore\", ruleConfig.ignore], [\"generated\", generated]] as const) {\n for (const glob of globs) {\n if (outcome.some((item) => matchesAny(item.file, [glob]))) continue;\n breaks.push({ file: \"package.json\", message: `The entry \\`${glob}\\` of \\`${field}\\` matches no break of this rule. Remove it from the field \\`conventions\\`.` });\n }\n }\n }\n // A new rule warns until its day `failsFrom`. The owners fix the breaks in that time, and the update pull requests merge.\n const warns = breaks.length > 0 && rule.failsFrom !== undefined && today < rule.failsFrom;\n const reason = warns ? [ruleConfig.reason, `The rule fails from ${rule.failsFrom ?? \"\"}.`].filter((text) => text !== undefined).join(\" \") : ruleConfig.reason;\n const note = reason === undefined ? {} : { note: reason };\n results.push({ ...base, status: breaks.length === 0 ? \"pass\" : warns ? \"warn\" : \"break\", breaks, ignored, ...note });\n }\n return { rules: results, failed: results.some((result) => result.status === \"break\" || result.status === \"error\") };\n}\n\n/** The result of `runFix`. */\nexport interface FixResult {\n /** The files that the edits changed, relative to the root, with `/`, in the order of the first change. */\n readonly changed: readonly string[];\n /** The number of checks. */\n readonly passes: number;\n /** The result of the last check, after the edits. */\n readonly result: CheckResult;\n}\n\n/** The most checks of `runFix`. Each check writes at most one edit of each file. */\nconst MAX_PASSES = 20;\n\n/**\n * This function writes the edits of the breaks, and checks again, until no edit applies. In each pass it writes the first\n * edit of each file whose `before` is the current text of the file. The other edits of that file wait for the next check,\n * which gives them again from the new text. Thus a fix does not write over a change that it did not see.\n */\nexport function runFix(options: CheckOptions): FixResult {\n const root = resolve(options.root);\n const changed: string[] = [];\n let result = runChecks(options);\n let passes = 1;\n while (passes < MAX_PASSES) {\n const written = new Set<string>();\n for (const rule of result.rules) {\n for (const edit of rule.breaks.flatMap((item) => item.edits ?? [])) {\n if (written.has(edit.file)) continue;\n const path = join(root, edit.file);\n // A file that does not exist has the text \"\": an edit with an empty `before` makes the file\n if ((existsSync(path) ? readFileSync(path, \"utf8\") : \"\") !== edit.before) continue;\n mkdirSync(dirname(path), { recursive: true });\n writeFileSync(path, edit.after);\n written.add(edit.file);\n if (!changed.includes(edit.file)) changed.push(edit.file);\n }\n }\n if (written.size === 0) break;\n result = runChecks(options);\n passes += 1;\n }\n return { changed, passes, result };\n}\n\n/** This function gives a result for JSON: each break without the texts of its edits, and with `fixable`. */\nfunction withoutEdits(result: CheckResult): object {\n return {\n ...result,\n rules: result.rules.map((rule) => ({ ...rule, breaks: rule.breaks.map(({ edits, ...item }) => ({ ...item, fixable: (edits ?? []).length > 0 })) })),\n };\n}\n\n/** The most breaks of one rule in the text output. The JSON output has each break. */\nconst MAX_SHOWN = 50;\n\n/** This function gives the place of a break as `file:line`. */\nconst placeOf = (item: Break): string => (item.line === undefined ? item.file : `${item.file}:${item.line}`);\n\n/** This function gives the text of a result for a terminal or a CI log. */\nexport function formatResult(result: CheckResult): string {\n const count = (status: RuleResult[\"status\"]): number => result.rules.filter((rule) => rule.status === status).length;\n const breaks = result.rules.filter((rule) => rule.status === \"break\").reduce((sum, rule) => sum + rule.breaks.length, 0);\n const out: string[] = [\n `conventions: ${result.rules.length} rules: ${count(\"pass\")} pass, ${count(\"break\")} with ${breaks} break(s), ${count(\"warn\")} warn, ${count(\"off\")} off, ${count(\"skipped\")} skipped, ${count(\"error\")} error(s).`,\n \"\",\n ];\n const label: Record<RuleResult[\"status\"], string> = { pass: \"pass \", break: \"BREAK\", warn: \"warn \", off: \"off \", skipped: \"skip \", error: \"ERROR\" };\n for (const rule of result.rules) {\n const extra = rule.ignored > 0 ? ` (${rule.ignored} ignored: ${rule.note ?? \"\"})` : rule.note !== undefined && rule.status !== \"pass\" ? ` (${rule.note})` : \"\";\n out.push(`${label[rule.status]} ${rule.id}${rule.breaks.length > 0 ? `: ${rule.breaks.length} break(s)` : \"\"}${extra}`);\n for (const item of rule.breaks.slice(0, MAX_SHOWN)) {\n out.push(` ${placeOf(item)} ${item.message}${(item.edits ?? []).length > 0 ? \" (conventions fix writes the fix)\" : \"\"}`);\n if (item.fix !== undefined) out.push(` fix: ${item.fix}`);\n }\n if (rule.breaks.length > MAX_SHOWN) out.push(` ... ${rule.breaks.length - MAX_SHOWN} more. Start \\`conventions check --json\\` for each break.`);\n if (rule.breaks.length > 0) out.push(` rule: ${rule.title}`, ` fix: ${rule.fix}`);\n }\n if (result.failed) out.push(\"\", \"To turn a rule off or to keep an exception, add a reason in the field conventions of package.json (`conventions --list`).\");\n return `${out.join(\"\\n\")}\\n`;\n}\n\n/** This function escapes the text of a cell of a Markdown table: first each backslash, then each `|`. */\nconst cell = (text: string): string => text.replace(/\\\\/g, \"\\\\\\\\\").replace(/\\|/g, \"\\\\|\").replace(/\\r?\\n/g, \" \");\n\n/** This function gives the result as Markdown for the summary of a GitHub Actions run. */\nexport function summaryMarkdown(result: CheckResult): string {\n const out = [\"### Conventions\", \"\", \"| Rule | Result | Note |\", \"|---|---|---|\"];\n for (const rule of result.rules) {\n const shown = rule.status === \"break\" ? `${rule.breaks.length} break(s)` : rule.status === \"warn\" ? `warn: ${rule.breaks.length} break(s)` : rule.status;\n const note = rule.ignored > 0 ? `${rule.ignored} ignored: ${rule.note ?? \"\"}` : (rule.note ?? \"\");\n out.push(`| \\`${rule.id}\\` | ${shown} | ${cell(note)} |`);\n }\n const broken = result.rules.filter((rule) => rule.breaks.length > 0);\n for (const rule of broken) {\n out.push(\"\", `<details open><summary><code>${rule.id}</code>: ${rule.breaks.length} break(s)</summary>`, \"\", `${rule.title} Fix: ${rule.fix}`, \"\");\n for (const item of rule.breaks.slice(0, MAX_SHOWN)) out.push(`- \\`${placeOf(item)}\\`: ${item.message}${item.fix === undefined ? \"\" : ` Fix: ${item.fix}`}`);\n if (rule.breaks.length > MAX_SHOWN) out.push(`- ... ${rule.breaks.length - MAX_SHOWN} more`);\n out.push(\"\", \"</details>\");\n }\n return `${out.join(\"\\n\")}\\n`;\n}\n\n/** This function escapes a value of a workflow command of GitHub Actions. */\nconst escapeData = (text: string): string => text.replace(/%/g, \"%25\").replace(/\\r/g, \"%0D\").replace(/\\n/g, \"%0A\");\nconst escapeProperty = (text: string): string => escapeData(text).replace(/:/g, \"%3A\").replace(/,/g, \"%2C\");\n\n/**\n * This function gives an `::error` workflow command for each break, so that GitHub shows each break on its line in the pull request.\n * A break of a rule that only warns gives a `::warning` command.\n */\nexport function annotations(result: CheckResult): string {\n const out: string[] = [];\n for (const rule of result.rules) {\n for (const item of rule.breaks) {\n const line = item.line === undefined ? \"\" : `,line=${item.line}`;\n out.push(`::${rule.status === \"warn\" ? \"warning\" : \"error\"} file=${escapeProperty(item.file)}${line},title=${escapeProperty(`conventions ${rule.id}`)}::${escapeData(`${item.message} Fix: ${item.fix ?? rule.fix}`)}`);\n }\n }\n return out.length === 0 ? \"\" : `${out.join(\"\\n\")}\\n`;\n}\n\n/** This function gives the text of `--list`: each rule, its reason, its fix, its options, its state and its audit sources. */\nexport function listRules(config: ConventionsConfig | undefined, rules: readonly Rule[] = RULES): string {\n const out: string[] = [];\n for (const rule of rules) {\n const ruleConfig = config?.rules[rule.id];\n const state = ruleConfig?.off !== undefined ? `off: ${ruleConfig.off}` : \"on\";\n out.push(`${rule.id} (${state})`, ` ${rule.title}`, ` why: ${rule.reason}`, ` fix: ${rule.fix}`);\n for (const [name, spec] of Object.entries(rule.options)) {\n const value = ruleConfig?.options[name] ?? spec.default;\n out.push(` option ${name} = ${JSON.stringify(value)}: ${spec.description}`);\n }\n if (ruleConfig !== undefined && ruleConfig.ignore.length > 0) out.push(` ignore ${ruleConfig.ignore.join(\", \")}: ${ruleConfig.reason ?? \"\"}`);\n else if (ruleConfig?.reason !== undefined) out.push(` reason: ${ruleConfig.reason}`);\n out.push(` from: ${rule.sources.map((source) => `${source.repo} ${source.rule} (${source.doc})`).join(\"; \")}`, \"\");\n }\n return `${out.join(\"\\n\")}`;\n}\n\n/** The input and output of `runCli`. */\nexport interface CliIo {\n readonly cwd: string;\n readonly env: Readonly<Record<string, string | undefined>>;\n readonly stdout: (text: string) => void;\n readonly stderr: (text: string) => void;\n /** The standard input. The bin reads it only for the command `pre-push`, which reads the refs of the push from git. */\n readonly stdin?: string;\n}\n\n/** The help text of the bin. */\nexport const USAGE: string = `Usage: conventions check [options]\n conventions fix [options]\n conventions --list\n conventions map [words] [--markdown | --json] [--overlay <file>]\n conventions pre-push <remote> [<url>]\n conventions hook install\n\n check Start each rule. Exit code 1 when a rule has a break.\n fix Write the fixes of the breaks that have one, and check again. Exit code 1 when a break stays.\n --list Show each rule: why, fix, options, state and the audit rows that it comes from.\n map Show the home package of each area of code, or of the areas that match the words.\n --markdown writes the table with the rule, and --overlay adds the homes of a JSON file.\n pre-push The git hook pre-push starts it. It reads the refs of the push on the standard input, and\n examines each new commit with the private name list: the message, the paths and the added\n lines. Exit code 1 on a break. The list is the JSON file of CONVENTIONS_PRIVATE_NAMES_FILE, else\n of the git config conventions.privateNamesFile. CONVENTIONS_PRIVATE_PATTERNS adds one regular\n expression on each line. With neither, it writes a \"No read\" line and gives 0.\n hook install Write the hook pre-push into the hooks folder of git. It keeps a hook that it did not write.\n In CI, or outside a git repository, it does nothing.\n\n --root <folder> The root of the repository. The default is the current folder.\n --rule <id> Only this rule. Use it again for more rules.\n --base <ref> The base commit of the change, for the rules that examine a change. On a pull request, the\n rules find it. Outside CI, the default is the default branch of origin.\n --no-base Do not use the default base.\n --json Write the result as JSON.\n -h, --help Show this text.\n\nThe field \"conventions\" of the root package.json turns a rule off with a reason, keeps an exception\nwith a reason, and sets the options of a rule with a reason:\n\n \"conventions\": { \"rules\": { \"no-build-output\": { \"off\": \"<reason>\" },\n \"cue-preset\": { \"ignore\": [\"packages/web/**\"], \"reason\": \"<reason>\" },\n \"workspace-protocol\": { \"prefix\": \"workspace:*\", \"reason\": \"<reason>\" } } }\n`;\n\n/**\n * This function gives the default base of a check outside CI: the default branch of origin. So a local check examines the same\n * added lines as the check of the pull request. On 2026-11-04, two pull requests went red at the first push because a plain local\n * check skipped those rules. In CI, the event gives the change, so this function gives undefined.\n */\nexport function localBase(root: string, env: Readonly<Record<string, string | undefined>>): string | undefined {\n if (env[\"CI\"] !== undefined || env[\"GITHUB_ACTIONS\"] !== undefined) return undefined;\n const head = runGit(root, [\"symbolic-ref\", \"--quiet\", \"--short\", \"refs/remotes/origin/HEAD\"])?.trim();\n for (const ref of [head, \"origin/main\", \"origin/master\"]) {\n if (ref !== undefined && ref !== \"\" && runGit(root, [\"rev-parse\", \"--verify\", \"--quiet\", `${ref}^{commit}`]) !== undefined) return ref;\n }\n return undefined;\n}\n\n/** An error of the arguments: exit code 2 and the help text. */\nclass UsageError extends Error {}\n\n/** This function starts the bin with the arguments `args`, and gives its exit code. */\nexport function runCli(args: readonly string[], io: CliIo): number {\n if (args[0] === \"map\") return runMap(args.slice(1), io);\n if (args[0] === \"pre-push\") return runPrePush(args.slice(1), io);\n if (args[0] === \"hook\") return runHook(args.slice(1), io);\n let check = false;\n let fix = false;\n let list = false;\n let json = false;\n let root = io.cwd;\n let base: string | undefined;\n let noBase = false;\n const only: string[] = [];\n try {\n for (let index = 0; index < args.length; index++) {\n const arg = args[index] ?? \"\";\n const value = (): string => {\n const next = args[++index];\n if (next === undefined || next.startsWith(\"-\")) throw new UsageError(`The option ${arg} needs a value.`);\n return next;\n };\n if (arg === \"check\") check = true;\n else if (arg === \"fix\") fix = true;\n else if (arg === \"--list\" || arg === \"list\") list = true;\n else if (arg === \"--json\") json = true;\n else if (arg === \"--root\") root = resolve(io.cwd, value());\n else if (arg === \"--rule\") only.push(value());\n else if (arg === \"--base\") base = value();\n else if (arg === \"--no-base\") noBase = true;\n else if (arg === \"--help\" || arg === \"-h\") {\n io.stdout(USAGE);\n return 0;\n } else throw new UsageError(`An unknown argument: ${arg}`);\n }\n if (!check && !fix && !list) throw new UsageError(\"Give the command check or fix, or --list.\");\n } catch (error) {\n if (!(error instanceof UsageError)) throw error;\n io.stderr(`conventions: ${error.message}\\n\\n${USAGE}`);\n return 2;\n }\n if (list) {\n let config: ConventionsConfig | undefined;\n try {\n config = existsSync(join(root, \"package.json\")) ? readConfig(root) : undefined;\n } catch (error) {\n io.stderr(`conventions: ${error instanceof Error ? error.message : String(error)}\\n`);\n return 1;\n }\n io.stdout(listRules(config));\n return 0;\n }\n let result: CheckResult;\n let fixed: FixResult | undefined;\n try {\n const change = noBase ? undefined : (base ?? localBase(root, io.env));\n const options = { root, only, env: io.env, ...(change === undefined ? {} : { base: change }) };\n if (fix) {\n fixed = runFix(options);\n result = fixed.result;\n } else result = runChecks(options);\n } catch (error) {\n io.stderr(`conventions: ${error instanceof Error ? error.message : String(error)}\\n`);\n return 1;\n }\n if (fixed !== undefined && !json) {\n const files = fixed.changed.map((file) => ` ${file}\\n`).join(\"\");\n io.stdout(fixed.changed.length === 0 ? \"conventions fix: no break has a fix that applies.\\n\" : `conventions fix: changed ${fixed.changed.length} file(s) in ${fixed.passes} check(s):\\n${files}\\n`);\n }\n const shown = fixed === undefined ? withoutEdits(result) : { changed: fixed.changed, passes: fixed.passes, ...withoutEdits(result) };\n if (json) io.stdout(`${JSON.stringify(shown, null, 2)}\\n`);\n else {\n if (io.env[\"GITHUB_ACTIONS\"] === \"true\") io.stdout(annotations(result));\n io.stdout(formatResult(result));\n }\n const summary = io.env[\"GITHUB_STEP_SUMMARY\"];\n if (summary) appendFileSync(summary, summaryMarkdown(result));\n return result.failed ? 1 : 0;\n}\n\n/** The command `map`: the home of each area, or of the areas that match the words. */\nfunction runMap(args: readonly string[], io: CliIo): number {\n let format: \"text\" | \"markdown\" | \"json\" = \"text\";\n let homes: readonly Home[] = HOMES;\n const words: string[] = [];\n for (let index = 0; index < args.length; index++) {\n const arg = args[index] ?? \"\";\n if (arg === \"--markdown\") format = \"markdown\";\n else if (arg === \"--json\") format = \"json\";\n else if (arg === \"--overlay\") {\n const file = args[++index];\n if (file === undefined) {\n io.stderr(`conventions: The option --overlay needs a value.\\n\\n${USAGE}`);\n return 2;\n }\n try {\n homes = mergeHomes(homes, readOverlay(resolve(io.cwd, file)));\n } catch (error) {\n io.stderr(`conventions: ${error instanceof Error ? error.message : String(error)}\\n`);\n return 1;\n }\n } else if (arg.startsWith(\"-\")) {\n io.stderr(`conventions: An unknown argument: ${arg}\\n\\n${USAGE}`);\n return 2;\n } else words.push(arg);\n }\n const found = findHomes(words.join(\" \"), homes);\n if (format === \"json\") io.stdout(`${JSON.stringify(found, null, 2)}\\n`);\n else if (format === \"markdown\") io.stdout(mapMarkdown(found));\n else io.stdout(mapText(found));\n return 0;\n}\n\n/** The command `pre-push`: the arguments of the git hook, the remote and its URL. */\nfunction runPrePush(args: readonly string[], io: CliIo): number {\n const remote = args[0];\n if (remote === undefined || remote.startsWith(\"-\") || args.length > 2) {\n io.stderr(`conventions: The command pre-push takes the name of the remote and, after it, its URL.\\n\\n${USAGE}`);\n return 2;\n }\n const top = runGit(io.cwd, [\"rev-parse\", \"--show-toplevel\"])?.trim() ?? \"\";\n const root = top === \"\" ? io.cwd : top;\n const url = args[1];\n return prePush({ remote, ...(url === undefined ? {} : { url }), input: io.stdin ?? \"\", env: io.env, root, git: (gitArgs) => runGit(root, gitArgs) }, io);\n}\n\n/** The command `hook install`: it writes the git hook pre-push. */\nfunction runHook(args: readonly string[], io: CliIo): number {\n if (args.length !== 1 || args[0] !== \"install\") {\n io.stderr(`conventions: The command hook takes one argument: install.\\n\\n${USAGE}`);\n return 2;\n }\n return installHook({ cwd: io.cwd, env: io.env, git: (gitArgs) => runGit(io.cwd, gitArgs) }, io);\n}\n"],"mappings":";;;;;;;;;AAiCA,MAAM,cAAc;CAAC;CAAO;CAAU;CAAa;AAAQ;AAE3D,MAAMA,cAAY,UAAqD,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAE1I,MAAM,aAAa,UAAsC,MAAM,QAAQ,KAAK,KAAK,MAAM,OAAO,SAAS,OAAO,SAAS,QAAQ;;AAG/H,SAAgB,eAAe,MAAqB;CAClD,OAAO,OAAO,YAAY,OAAO,QAAQ,KAAK,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,UAAU,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC;AACpG;;;;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