@mark1russell7/canon-ontology 0.3.0 → 0.4.1

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.
package/README.md CHANGED
@@ -35,6 +35,8 @@ const targets = targetsOf(ontology);
35
35
 
36
36
  In a clone of canon, `pnpm canon check` checks the records, `pnpm canon targets` shows the targets, and `pnpm canon results` shows the state of each claim.
37
37
 
38
+ `pnpm canon engine` loads each record into the ontology engine [`@mark1russell7/ontology`](https://github.com/metrograph-labs/ontology). It fails when the engine changes or refuses a value. It also fails when the files of `schema/engine/` do not agree with the grammar. `pnpm canon engine --write` writes these files again.
39
+
38
40
  ## License
39
41
 
40
42
  MIT
@@ -0,0 +1,227 @@
1
+ import { R as pathOfId, r as ONTOLOGY_REPOSITORY } from "./targets-DFXTvFDm.mjs";
2
+ // src/board.ts
3
+ /** The label of each issue of the board. */
4
+ const TARGET_LABEL = "target";
5
+ /** The time of a claim with no pull request, in hours. */
6
+ const CLAIM_HOURS = 48;
7
+ /** The most open issues of the board. */
8
+ const BOARD_LIMIT = 20;
9
+ /** The start of the hidden line of an issue body that has the id of its target. */
10
+ const MARK = "<!-- canon-target: ";
11
+ /** The end of the hidden line. */
12
+ const MARK_END = " -->";
13
+ /** This function gives the id of the target of an issue body, or undefined when the body has no hidden line. */
14
+ function targetOfIssue(body) {
15
+ const start = body.indexOf(MARK);
16
+ if (start < 0) return void 0;
17
+ const end = body.indexOf(MARK_END, start + 19);
18
+ const id = end < 0 ? "" : body.slice(start + 19, end).trim();
19
+ return id === "" || /\s/.test(id) ? void 0 : id;
20
+ }
21
+ /** This function gives the time of the end of a claim, as an ISO 8601 text to the minute. */
22
+ function claimEnd(claimedAt) {
23
+ return `${new Date(claimedAt + 1728e5).toISOString().slice(0, 16)}Z`;
24
+ }
25
+ /** This function tells if a claim is older than `CLAIM_HOURS`. A claim with no known start is live. */
26
+ function isExpired(issue, now) {
27
+ return issue.assignees.length > 0 && issue.claimedAt !== void 0 && now - issue.claimedAt >= 1728e5;
28
+ }
29
+ /** This function gives the title, the body and the labels of the issue of a target. */
30
+ function issueText(target, repository = ONTOLOGY_REPOSITORY) {
31
+ const { attrs } = target;
32
+ const path = pathOfId(target.id);
33
+ const body = [
34
+ `${MARK}${target.id}${MARK_END}`,
35
+ `**Target:** \`${target.id}\``,
36
+ "",
37
+ "| Gap | Home | Size | Area |",
38
+ "| --- | --- | --- | --- |",
39
+ `| \`${attrs.gap}\` | [${attrs.home}](https://github.com/${attrs.home}) | ${attrs.size} | ${attrs.area === void 0 ? "" : `\`${attrs.area}\``} |`,
40
+ "",
41
+ "## Acceptance",
42
+ "",
43
+ attrs.acceptance.text,
44
+ "",
45
+ ...attrs.acceptance.checks.map((check) => `- [ ] ${check}`),
46
+ "",
47
+ "## Why",
48
+ "",
49
+ attrs.why,
50
+ "",
51
+ "## Claim and close",
52
+ "",
53
+ `1. Write the comment \`/claim\` on this issue. A claim stops after ${String(48)} hours with no open pull request.`,
54
+ `2. Do the work. [\`AGENTS.md\`](https://github.com/${repository}/blob/main/AGENTS.md) tells how.`,
55
+ `3. In the pull request, write the line \`Target: ${target.id}\`.`,
56
+ "",
57
+ `The record of the target is [\`${path}\`](https://github.com/${repository}/blob/main/${path}). Write \`/unclaim\` to stop your claim.`,
58
+ ""
59
+ ].join("\n");
60
+ return {
61
+ title: attrs.title,
62
+ body,
63
+ labels: [TARGET_LABEL, `gap:${attrs.gap}`]
64
+ };
65
+ }
66
+ /** This function tells if an issue has the text of a target: the same title, body and labels. */
67
+ function sameText(issue, text) {
68
+ const labels = [...issue.labels].sort();
69
+ const wanted = [...text.labels].sort();
70
+ return issue.title === text.title && issue.body === text.body && labels.length === wanted.length && labels.every((label, index) => label === wanted[index]);
71
+ }
72
+ /**
73
+ * This function gives the steps that make the board agree with the target query.
74
+ *
75
+ * - The board keeps the open issue of each claimable target. It adds other claimable targets, up to the limit. An issue
76
+ * does not close because new targets come before it.
77
+ * - Each added target is the first claimable target of the gap with the fewest targets on the board. So one gap with
78
+ * many targets does not fill the board.
79
+ * - An issue whose target is not claimable closes: `completed` when the target is gone, else `not_planned`.
80
+ * - A claim older than `CLAIM_HOURS` stops when no open pull request names its target.
81
+ * - An issue with no hidden line is not an issue of the board. Of two issues of one target, the board uses the first.
82
+ */
83
+ function planBoard(input) {
84
+ const limit = input.limit ?? 20;
85
+ const known = new Set(input.targets.map((target) => target.id));
86
+ const claimable = input.targets.filter((target) => target.attrs.claimable);
87
+ const byTarget = /* @__PURE__ */ new Map();
88
+ for (const issue of [...input.issues].sort((a, b) => a.number - b.number)) {
89
+ const id = targetOfIssue(issue.body);
90
+ if (id !== void 0 && !byTarget.has(id)) byTarget.set(id, issue);
91
+ }
92
+ const board = new Set(claimable.filter((target) => byTarget.get(target.id)?.state === "open").map((target) => target.id));
93
+ const gaps = /* @__PURE__ */ new Map();
94
+ for (const target of claimable) if (board.has(target.id)) gaps.set(target.attrs.gap, (gaps.get(target.attrs.gap) ?? 0) + 1);
95
+ const waiting = claimable.filter((target) => !board.has(target.id));
96
+ while (board.size < limit && waiting.length > 0) {
97
+ let best = 0;
98
+ for (let index = 1; index < waiting.length; index += 1) if ((gaps.get(waiting[index]?.attrs.gap ?? "") ?? 0) < (gaps.get(waiting[best]?.attrs.gap ?? "") ?? 0)) best = index;
99
+ const [next] = waiting.splice(best, 1);
100
+ if (next === void 0) break;
101
+ board.add(next.id);
102
+ gaps.set(next.attrs.gap, (gaps.get(next.attrs.gap) ?? 0) + 1);
103
+ }
104
+ const actions = [];
105
+ for (const target of claimable.filter((candidate) => board.has(candidate.id))) {
106
+ const text = issueText(target);
107
+ const issue = byTarget.get(target.id);
108
+ if (issue === void 0) {
109
+ actions.push({
110
+ kind: "create",
111
+ target: target.id,
112
+ text
113
+ });
114
+ continue;
115
+ }
116
+ if (issue.state === "closed" || !sameText(issue, text)) actions.push({
117
+ kind: "update",
118
+ number: issue.number,
119
+ target: target.id,
120
+ text,
121
+ reopen: issue.state === "closed"
122
+ });
123
+ if (issue.state === "open" && isExpired(issue, input.now) && !input.pulls.has(target.id)) actions.push({
124
+ kind: "release",
125
+ number: issue.number,
126
+ target: target.id,
127
+ users: issue.assignees
128
+ });
129
+ }
130
+ for (const [target, issue] of byTarget) if (issue.state === "open" && !board.has(target)) actions.push({
131
+ kind: "close",
132
+ number: issue.number,
133
+ target,
134
+ reason: known.has(target) ? "not_planned" : "completed"
135
+ });
136
+ return actions;
137
+ }
138
+ /** The comment of a step of the board, or undefined for a step with no comment. */
139
+ function actionComment(action) {
140
+ if (action.kind === "release") return `The claim of ${action.users.map((user) => `\`${user}\``).join(", ")} stopped: ${String(48)} hours passed with no open pull request. Another contributor can claim the target now.`;
141
+ if (action.kind === "close") return action.reason === "completed" ? "The target query does not give this target now, so the gap is closed." : "The target query does not give this target as claimable now. The issue opens again when the target is claimable.";
142
+ }
143
+ /** This function applies the steps of the board through the API, in their order. It gives the number of each new issue. */
144
+ async function applyBoard(api, actions) {
145
+ const labels = new Set(actions.flatMap((action) => action.kind === "create" || action.kind === "update" ? action.text.labels : []));
146
+ if (labels.size > 0) await api.ensureLabels([...labels].sort());
147
+ const created = [];
148
+ for (const action of actions) {
149
+ if (action.kind === "create") {
150
+ created.push(await api.create(action.text));
151
+ continue;
152
+ }
153
+ if (action.kind === "update") {
154
+ const { title, body, labels: issueLabels } = action.text;
155
+ await api.update(action.number, {
156
+ title,
157
+ body,
158
+ labels: issueLabels,
159
+ ...action.reopen ? {
160
+ state: "open",
161
+ stateReason: "reopened"
162
+ } : {}
163
+ });
164
+ continue;
165
+ }
166
+ if (action.kind === "release") await api.update(action.number, { assignees: [] });
167
+ const comment = actionComment(action);
168
+ if (comment !== void 0) await api.comment(action.number, comment);
169
+ if (action.kind === "close") await api.update(action.number, {
170
+ state: "closed",
171
+ stateReason: action.reason
172
+ });
173
+ }
174
+ return created;
175
+ }
176
+ /** This function gives the command of a comment: its first word is `/claim` or `/unclaim`. */
177
+ function claimCommandOf(comment) {
178
+ const first = comment.trim().split(/\s/, 1)[0];
179
+ return first === "/claim" ? "claim" : first === "/unclaim" ? "unclaim" : void 0;
180
+ }
181
+ /**
182
+ * This function decides a claim comment. A contributor claims one target at a time, and a claim stops after
183
+ * `CLAIM_HOURS` with no pull request. A claim that stopped does not block a new claim, also before the board removes it.
184
+ */
185
+ function decideClaim(input) {
186
+ const { command, user, issue, target, now } = input;
187
+ const who = `\`${user}\``;
188
+ if (issue.state !== "open") return {
189
+ kind: "refuse",
190
+ comment: "This issue is closed, so its target has no claim."
191
+ };
192
+ if (target === void 0 || !target.attrs.claimable) return {
193
+ kind: "refuse",
194
+ comment: "The target of this issue is not claimable now. `AGENTS.md` tells which targets are claimable."
195
+ };
196
+ const has = issue.assignees.includes(user);
197
+ if (command === "unclaim") return has ? {
198
+ kind: "set",
199
+ assignees: issue.assignees.filter((login) => login !== user),
200
+ comment: `${who} stopped the claim. Another contributor can claim the target now.`
201
+ } : {
202
+ kind: "refuse",
203
+ comment: `${who} has no claim on this target.`
204
+ };
205
+ const until = issue.claimedAt === void 0 ? "the end of the claim" : claimEnd(issue.claimedAt);
206
+ if (has) return {
207
+ kind: "refuse",
208
+ comment: `${who} has the claim already, until ${until}.`
209
+ };
210
+ if (issue.assignees.length > 0 && !isExpired(issue, now)) return {
211
+ kind: "refuse",
212
+ comment: `${issue.assignees.map((login) => `\`${login}\``).join(", ")} has the claim until ${until}. Claim another target, or claim this target after that time.`
213
+ };
214
+ const other = input.issues.find((candidate) => candidate.number !== issue.number && candidate.state === "open" && candidate.assignees.includes(user) && !isExpired(candidate, now));
215
+ if (other !== void 0) return {
216
+ kind: "refuse",
217
+ comment: `${who} has a claim on #${String(other.number)} already. Claim one target at a time. Write \`/unclaim\` on #${String(other.number)} to stop that claim.`
218
+ };
219
+ return {
220
+ kind: "set",
221
+ assignees: [user],
222
+ comment: `${who} claims this target until ${claimEnd(now)}. Open the pull request before that time, with the line \`Target: ${target.id}\`.`
223
+ };
224
+ }
225
+ export { applyBoard as a, decideClaim as c, planBoard as d, targetOfIssue as f, actionComment as i, isExpired as l, CLAIM_HOURS as n, claimCommandOf as o, TARGET_LABEL as r, claimEnd as s, BOARD_LIMIT as t, issueText as u };
226
+
227
+ //# sourceMappingURL=board-7NZb3yv_.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"board-7NZb3yv_.mjs","names":[],"sources":["../src/board.ts"],"sourcesContent":["// The target board: one GitHub issue for each claimable target, and the claims on the issues. The plan and the claim\n// decision are pure functions. The sync and the claim send the requests through an IssueApi.\nimport { pathOfId } from \"./ids.ts\";\nimport { ONTOLOGY_REPOSITORY, type TargetRecord } from \"./targets.ts\";\n\n/** The label of each issue of the board. */\nexport const TARGET_LABEL = \"target\";\n\n/** The time of a claim with no pull request, in hours. */\nexport const CLAIM_HOURS = 48;\n\n/** The most open issues of the board. */\nexport const BOARD_LIMIT = 20;\n\n/** The start of the hidden line of an issue body that has the id of its target. */\nconst MARK = \"<!-- canon-target: \";\n\n/** The end of the hidden line. */\nconst MARK_END = \" -->\";\n\n/** An issue of the board, as the API of the issues gives it. */\nexport interface BoardIssue {\n readonly number: number;\n readonly title: string;\n readonly body: string;\n readonly state: \"open\" | \"closed\";\n readonly labels: readonly string[];\n readonly assignees: readonly string[];\n /** This time is the start of the claim of an open issue with an assignee, in milliseconds since 1970. */\n readonly claimedAt?: number | undefined;\n}\n\n/** The title, the body and the labels of the issue of a target. */\nexport interface IssueText {\n readonly title: string;\n readonly body: string;\n readonly labels: readonly string[];\n}\n\n/** A change of an issue. Each field that is not here does not change. */\nexport interface IssueChange {\n readonly title?: string;\n readonly body?: string;\n readonly labels?: readonly string[];\n readonly state?: \"open\" | \"closed\";\n readonly stateReason?: \"completed\" | \"not_planned\" | \"reopened\";\n /** This list replaces the assignees of the issue. */\n readonly assignees?: readonly string[];\n}\n\n/** The API of the issues of one repository. A test gives a fake, and `githubIssueApi` gives the API of GitHub. */\nexport interface IssueApi {\n /** This method gives each issue with the label `target`, open and closed, with the start of each claim. */\n issues(): Promise<readonly BoardIssue[]>;\n /** This method tells if an open pull request names the target id. */\n hasOpenPull(targetId: string): Promise<boolean>;\n /** This method makes each label that does not exist. */\n ensureLabels(names: readonly string[]): Promise<void>;\n /** This method opens an issue, and gives its number. */\n create(text: IssueText): Promise<number>;\n /** This method changes an issue, and gives the issue after the change. */\n update(number: number, change: IssueChange): Promise<BoardIssue>;\n /** This method writes a comment on an issue. */\n comment(number: number, text: string): Promise<void>;\n}\n\n/** One step of the sync of the board. */\nexport type BoardAction =\n | { readonly kind: \"create\"; readonly target: string; readonly text: IssueText }\n | { readonly kind: \"update\"; readonly number: number; readonly target: string; readonly text: IssueText; readonly reopen: boolean }\n | { readonly kind: \"close\"; readonly number: number; readonly target: string; readonly reason: \"completed\" | \"not_planned\" }\n | { readonly kind: \"release\"; readonly number: number; readonly target: string; readonly users: readonly string[] };\n\n/** The inputs of the plan of the board. */\nexport interface BoardInput {\n /** Each target of the target query, in the order of `compareTargets`. */\n readonly targets: readonly TargetRecord[];\n readonly issues: readonly BoardIssue[];\n /** This time is the time of the decision, in milliseconds since 1970. */\n readonly now: number;\n /** The ids of the targets that an open pull request names. */\n readonly pulls: ReadonlySet<string>;\n /** The most open issues. The default is `BOARD_LIMIT`. */\n readonly limit?: number | undefined;\n}\n\n/** This function gives the id of the target of an issue body, or undefined when the body has no hidden line. */\nexport function targetOfIssue(body: string): string | undefined {\n const start = body.indexOf(MARK);\n if (start < 0) return undefined;\n const end = body.indexOf(MARK_END, start + MARK.length);\n const id = end < 0 ? \"\" : body.slice(start + MARK.length, end).trim();\n return id === \"\" || /\\s/.test(id) ? undefined : id;\n}\n\n/** This function gives the time of the end of a claim, as an ISO 8601 text to the minute. */\nexport function claimEnd(claimedAt: number): string {\n return `${new Date(claimedAt + CLAIM_HOURS * 3_600_000).toISOString().slice(0, 16)}Z`;\n}\n\n/** This function tells if a claim is older than `CLAIM_HOURS`. A claim with no known start is live. */\nexport function isExpired(issue: BoardIssue, now: number): boolean {\n return issue.assignees.length > 0 && issue.claimedAt !== undefined && now - issue.claimedAt >= CLAIM_HOURS * 3_600_000;\n}\n\n/** This function gives the title, the body and the labels of the issue of a target. */\nexport function issueText(target: TargetRecord, repository: string = ONTOLOGY_REPOSITORY): IssueText {\n const { attrs } = target;\n const path = pathOfId(target.id);\n const body = [\n `${MARK}${target.id}${MARK_END}`,\n `**Target:** \\`${target.id}\\``,\n \"\",\n \"| Gap | Home | Size | Area |\",\n \"| --- | --- | --- | --- |\",\n `| \\`${attrs.gap}\\` | [${attrs.home}](https://github.com/${attrs.home}) | ${attrs.size} | ${attrs.area === undefined ? \"\" : `\\`${attrs.area}\\``} |`,\n \"\",\n \"## Acceptance\",\n \"\",\n attrs.acceptance.text,\n \"\",\n ...attrs.acceptance.checks.map((check) => `- [ ] ${check}`),\n \"\",\n \"## Why\",\n \"\",\n attrs.why,\n \"\",\n \"## Claim and close\",\n \"\",\n `1. Write the comment \\`/claim\\` on this issue. A claim stops after ${String(CLAIM_HOURS)} hours with no open pull request.`,\n `2. Do the work. [\\`AGENTS.md\\`](https://github.com/${repository}/blob/main/AGENTS.md) tells how.`,\n `3. In the pull request, write the line \\`Target: ${target.id}\\`.`,\n \"\",\n `The record of the target is [\\`${path}\\`](https://github.com/${repository}/blob/main/${path}). Write \\`/unclaim\\` to stop your claim.`,\n \"\",\n ].join(\"\\n\");\n return { title: attrs.title, body, labels: [TARGET_LABEL, `gap:${attrs.gap}`] };\n}\n\n/** This function tells if an issue has the text of a target: the same title, body and labels. */\nfunction sameText(issue: BoardIssue, text: IssueText): boolean {\n const labels = [...issue.labels].sort();\n const wanted = [...text.labels].sort();\n return issue.title === text.title && issue.body === text.body && labels.length === wanted.length && labels.every((label, index) => label === wanted[index]);\n}\n\n/**\n * This function gives the steps that make the board agree with the target query.\n *\n * - The board keeps the open issue of each claimable target. It adds other claimable targets, up to the limit. An issue\n * does not close because new targets come before it.\n * - Each added target is the first claimable target of the gap with the fewest targets on the board. So one gap with\n * many targets does not fill the board.\n * - An issue whose target is not claimable closes: `completed` when the target is gone, else `not_planned`.\n * - A claim older than `CLAIM_HOURS` stops when no open pull request names its target.\n * - An issue with no hidden line is not an issue of the board. Of two issues of one target, the board uses the first.\n */\nexport function planBoard(input: BoardInput): readonly BoardAction[] {\n const limit = input.limit ?? BOARD_LIMIT;\n const known = new Set(input.targets.map((target) => target.id));\n const claimable = input.targets.filter((target) => target.attrs.claimable);\n const byTarget = new Map<string, BoardIssue>();\n for (const issue of [...input.issues].sort((a, b) => a.number - b.number)) {\n const id = targetOfIssue(issue.body);\n if (id !== undefined && !byTarget.has(id)) byTarget.set(id, issue);\n }\n const board = new Set(claimable.filter((target) => byTarget.get(target.id)?.state === \"open\").map((target) => target.id));\n const gaps = new Map<string, number>();\n for (const target of claimable) if (board.has(target.id)) gaps.set(target.attrs.gap, (gaps.get(target.attrs.gap) ?? 0) + 1);\n const waiting = claimable.filter((target) => !board.has(target.id));\n while (board.size < limit && waiting.length > 0) {\n let best = 0;\n for (let index = 1; index < waiting.length; index += 1) {\n if ((gaps.get(waiting[index]?.attrs.gap ?? \"\") ?? 0) < (gaps.get(waiting[best]?.attrs.gap ?? \"\") ?? 0)) best = index;\n }\n const [next] = waiting.splice(best, 1);\n if (next === undefined) break;\n board.add(next.id);\n gaps.set(next.attrs.gap, (gaps.get(next.attrs.gap) ?? 0) + 1);\n }\n const actions: BoardAction[] = [];\n for (const target of claimable.filter((candidate) => board.has(candidate.id))) {\n const text = issueText(target);\n const issue = byTarget.get(target.id);\n if (issue === undefined) {\n actions.push({ kind: \"create\", target: target.id, text });\n continue;\n }\n if (issue.state === \"closed\" || !sameText(issue, text)) actions.push({ kind: \"update\", number: issue.number, target: target.id, text, reopen: issue.state === \"closed\" });\n if (issue.state === \"open\" && isExpired(issue, input.now) && !input.pulls.has(target.id)) {\n actions.push({ kind: \"release\", number: issue.number, target: target.id, users: issue.assignees });\n }\n }\n for (const [target, issue] of byTarget) {\n if (issue.state === \"open\" && !board.has(target)) actions.push({ kind: \"close\", number: issue.number, target, reason: known.has(target) ? \"not_planned\" : \"completed\" });\n }\n return actions;\n}\n\n/** The comment of a step of the board, or undefined for a step with no comment. */\nexport function actionComment(action: BoardAction): string | undefined {\n if (action.kind === \"release\") {\n return `The claim of ${action.users.map((user) => `\\`${user}\\``).join(\", \")} stopped: ${String(CLAIM_HOURS)} hours passed with no open pull request. Another contributor can claim the target now.`;\n }\n if (action.kind === \"close\") {\n return action.reason === \"completed\"\n ? \"The target query does not give this target now, so the gap is closed.\"\n : \"The target query does not give this target as claimable now. The issue opens again when the target is claimable.\";\n }\n return undefined;\n}\n\n/** This function applies the steps of the board through the API, in their order. It gives the number of each new issue. */\nexport async function applyBoard(api: IssueApi, actions: readonly BoardAction[]): Promise<readonly number[]> {\n const labels = new Set(actions.flatMap((action) => (action.kind === \"create\" || action.kind === \"update\" ? action.text.labels : [])));\n if (labels.size > 0) await api.ensureLabels([...labels].sort());\n const created: number[] = [];\n for (const action of actions) {\n if (action.kind === \"create\") {\n created.push(await api.create(action.text));\n continue;\n }\n if (action.kind === \"update\") {\n const { title, body, labels: issueLabels } = action.text;\n await api.update(action.number, { title, body, labels: issueLabels, ...(action.reopen ? { state: \"open\", stateReason: \"reopened\" } : {}) });\n continue;\n }\n if (action.kind === \"release\") await api.update(action.number, { assignees: [] });\n const comment = actionComment(action);\n if (comment !== undefined) await api.comment(action.number, comment);\n if (action.kind === \"close\") await api.update(action.number, { state: \"closed\", stateReason: action.reason });\n }\n return created;\n}\n\n/** The command of a claim comment. */\nexport type ClaimCommand = \"claim\" | \"unclaim\";\n\n/** This function gives the command of a comment: its first word is `/claim` or `/unclaim`. */\nexport function claimCommandOf(comment: string): ClaimCommand | undefined {\n const first = comment.trim().split(/\\s/, 1)[0];\n return first === \"/claim\" ? \"claim\" : first === \"/unclaim\" ? \"unclaim\" : undefined;\n}\n\n/** The inputs of the decision on a claim comment. */\nexport interface ClaimInput {\n readonly command: ClaimCommand;\n /** The login of the author of the comment. */\n readonly user: string;\n readonly issue: BoardIssue;\n /** The target of the issue, or undefined when the target query does not give it. */\n readonly target: TargetRecord | undefined;\n /** Each issue of the board, with the start of each claim. */\n readonly issues: readonly BoardIssue[];\n /** This time is the time of the decision, in milliseconds since 1970. */\n readonly now: number;\n}\n\n/** The decision on a claim comment: the new assignees and a comment, or a refusal with its reason. */\nexport type ClaimDecision =\n | { readonly kind: \"set\"; readonly assignees: readonly string[]; readonly comment: string }\n | { readonly kind: \"refuse\"; readonly comment: string };\n\n/**\n * This function decides a claim comment. A contributor claims one target at a time, and a claim stops after\n * `CLAIM_HOURS` with no pull request. A claim that stopped does not block a new claim, also before the board removes it.\n */\nexport function decideClaim(input: ClaimInput): ClaimDecision {\n const { command, user, issue, target, now } = input;\n const who = `\\`${user}\\``;\n if (issue.state !== \"open\") return { kind: \"refuse\", comment: \"This issue is closed, so its target has no claim.\" };\n if (target === undefined || !target.attrs.claimable) {\n return { kind: \"refuse\", comment: \"The target of this issue is not claimable now. `AGENTS.md` tells which targets are claimable.\" };\n }\n const has = issue.assignees.includes(user);\n if (command === \"unclaim\") {\n return has\n ? { kind: \"set\", assignees: issue.assignees.filter((login) => login !== user), comment: `${who} stopped the claim. Another contributor can claim the target now.` }\n : { kind: \"refuse\", comment: `${who} has no claim on this target.` };\n }\n const until = issue.claimedAt === undefined ? \"the end of the claim\" : claimEnd(issue.claimedAt);\n if (has) return { kind: \"refuse\", comment: `${who} has the claim already, until ${until}.` };\n if (issue.assignees.length > 0 && !isExpired(issue, now)) {\n const holders = issue.assignees.map((login) => `\\`${login}\\``).join(\", \");\n return { kind: \"refuse\", comment: `${holders} has the claim until ${until}. Claim another target, or claim this target after that time.` };\n }\n const other = input.issues.find((candidate) => candidate.number !== issue.number && candidate.state === \"open\" && candidate.assignees.includes(user) && !isExpired(candidate, now));\n if (other !== undefined) {\n return { kind: \"refuse\", comment: `${who} has a claim on #${String(other.number)} already. Claim one target at a time. Write \\`/unclaim\\` on #${String(other.number)} to stop that claim.` };\n }\n return {\n kind: \"set\",\n assignees: [user],\n comment: `${who} claims this target until ${claimEnd(now)}. Open the pull request before that time, with the line \\`Target: ${target.id}\\`.`,\n };\n}\n"],"mappings":";;;AAMA,MAAa,eAAe;;AAG5B,MAAa,cAAc;;AAG3B,MAAa,cAAc;;AAG3B,MAAM,OAAO;;AAGb,MAAM,WAAW;;AAqEjB,SAAgB,cAAc,MAAkC;CAC9D,MAAM,QAAQ,KAAK,QAAQ,IAAI;CAC/B,IAAI,QAAQ,GAAG,OAAO,KAAA;CACtB,MAAM,MAAM,KAAK,QAAQ,UAAU,QAAQ,EAAW;CACtD,MAAM,KAAK,MAAM,IAAI,KAAK,KAAK,MAAM,QAAQ,IAAa,GAAG,CAAC,CAAC,KAAK;CACpE,OAAO,OAAO,MAAM,KAAK,KAAK,EAAE,IAAI,KAAA,IAAY;AAClD;;AAGA,SAAgB,SAAS,WAA2B;CAClD,OAAO,GAAG,IAAI,KAAK,YAAA,MAAmC,CAAC,CAAC,YAAY,CAAC,CAAC,MAAM,GAAG,EAAE,EAAE;AACrF;;AAGA,SAAgB,UAAU,OAAmB,KAAsB;CACjE,OAAO,MAAM,UAAU,SAAS,KAAK,MAAM,cAAc,KAAA,KAAa,MAAM,MAAM,aAAA;AACpF;;AAGA,SAAgB,UAAU,QAAsB,aAAqB,qBAAgC;CACnG,MAAM,EAAE,UAAU;CAClB,MAAM,OAAO,SAAS,OAAO,EAAE;CAC/B,MAAM,OAAO;EACX,GAAG,OAAO,OAAO,KAAK;EACtB,iBAAiB,OAAO,GAAG;EAC3B;EACA;EACA;EACA,OAAO,MAAM,IAAI,QAAQ,MAAM,KAAK,uBAAuB,MAAM,KAAK,MAAM,MAAM,KAAK,KAAK,MAAM,SAAS,KAAA,IAAY,KAAK,KAAK,MAAM,KAAK,IAAI;EAChJ;EACA;EACA;EACA,MAAM,WAAW;EACjB;EACA,GAAG,MAAM,WAAW,OAAO,KAAK,UAAU,SAAS,OAAO;EAC1D;EACA;EACA;EACA,MAAM;EACN;EACA;EACA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AC,CAAC,KAAK,IACzB,EAAE,uBAAuB,MAAM;CAA+D;CAE3I,MAAM,QAAQ,MAAM,OAAO,MAAM,cAAc,UAAU,WAAW,MAAM,UAAU,UAAU,UAAU,UAAU,UAAU,UAAU,SAAS,IAAI,KAAK,CAAC,UAAU,WAAW,GAAG,CAAC;CAClL,IAAI,UAAU,KAAA,GACZ,OAAO;EAAE,MAAM;EAAU,SAAS,GAAG,IAAI,mBAAmB,OAAO,MAAM,MAAM,EAAE,+DAA+D,OAAO,MAAM,MAAM,EAAE;CAAsB;CAE7L,OAAO;EACL,MAAM;EACN,WAAW,CAAC,IAAI;EAChB,SAAS,GAAG,IAAI,4BAA4B,SAAS,GAAG,EAAE,oEAAoE,OAAO,GAAG;CAC1I;AACF"}
package/build/index.d.mts CHANGED
@@ -1,7 +1,9 @@
1
1
  import { Home, HomeAnswer } from "@mark1russell7/conventions";
2
2
  import { A as KindDef, C as EntityRecord, D as GateName, E as GateFact, F as RelationKindDef, I as TestGates, M as LoadedRecord, N as Ontology, O as Grammar, P as Problem, S as EdgeRecord, T as FacetDef, _ as findProblem, a as NecessaryGate, b as problemIdOf, c as SIZES, d as TargetRecord, f as compareTargets, g as ProblemResult, h as ProblemRead, i as NECESSARY_GATES, j as KindMode, k as JsonSchema, l as Size, m as targetsOf, n as Gap, o as ONTOLOGY_REPOSITORY, p as targetId, s as PLACES_SHOWN, t as Acceptance, u as TargetAttrs, v as formalKeyOf, w as Envelope, x as Edge, y as leanKey } from "./targets-D3vj1inS.mjs";
3
+ import "ajv/dist/2020.js";
3
4
  import { Printer } from "@mark1russell7/text/print";
4
5
  import { Transport } from "polite-crawler/api";
6
+ import { Edge as Edge$1, Entity, GenerateOptions, Registry, RegistryInput } from "@mark1russell7/ontology";
5
7
  import { RestClient } from "@procedures/gh";
6
8
  /** The id of the record of kind source for the map of homes. */
7
9
  export declare const MAP_SOURCE_ID = "source.conventions-map";
@@ -46,14 +48,6 @@ interface HomeImport {
46
48
  readonly records: readonly EntityRecord[];
47
49
  readonly skipped: readonly string[];
48
50
  }
49
- /**
50
- * This function gives the public form of a text of the map. It removes the ids of roadmap items, because they mean
51
- * nothing outside their repositories. The map itself keeps the ids.
52
- *
53
- * This function is a shortcut. It ends with the item C28 of `docs/ROADMAP.md`: when the notes of the map have no ids,
54
- * the import stops this removal.
55
- */
56
- export declare function publicText(text: string): string;
57
51
  /** This function gives the repository `owner/name` of a repository URL of npm, or undefined when it is not on GitHub. */
58
52
  export declare function githubRepositoryOf(url: string): string | undefined;
59
53
  /**
@@ -274,6 +268,11 @@ type ClaimDecision = {
274
268
  * `CLAIM_HOURS` with no pull request. A claim that stopped does not block a new claim, also before the board removes it.
275
269
  */
276
270
  export declare function decideClaim(input: ClaimInput): ClaimDecision;
271
+ /**
272
+ * This function tells if the `valid_from` of an envelope is not after its `valid_to`. The comparison uses the instants,
273
+ * so two times with different offsets compare correctly. The record schema refuses a time that is not valid.
274
+ */
275
+ export declare function timesInOrder(envelope: Envelope): boolean;
277
276
  /**
278
277
  * This function checks the ontology, and gives each problem that it finds, in the order of the paths. No problem means
279
278
  * that the data is valid:
@@ -370,6 +369,52 @@ interface CliOptions {
370
369
  * The folder `cwd` is the start of the search for the root. The commands `board` and `claim` use `options.issues`.
371
370
  */
372
371
  export declare function runCli(args: readonly string[], printer: Printer, cwd: string, options?: CliOptions): Promise<number>;
372
+ /** The folder of the files that the engine generates from the grammar, relative to the root of the repository. */
373
+ export declare const ENGINE_FOLDER = "schema/engine";
374
+ /** The options of the generation: the first line of each SQL file names the command that makes the files. */
375
+ export declare const ENGINE_GENERATE_OPTIONS: GenerateOptions;
376
+ /**
377
+ * The keywords of JSON Schema that the add-on gives to the engine. A test holds each keyword: ajv and the engine give
378
+ * the same verdict on each value of the test.
379
+ */
380
+ export declare const ENGINE_KEYWORDS: ReadonlySet<string>;
381
+ /**
382
+ * The values of the keyword `format` that the add-on gives to the engine. In JSON Schema 2020-12, a format is only an
383
+ * annotation. So each field with a format also has a pattern, and each reader gives the same verdict. The format `uri`
384
+ * is not in the list: zod reads it as `z.url()`, which removes the spaces at the two ends of the value.
385
+ */
386
+ export declare const ENGINE_FORMATS: ReadonlySet<string>;
387
+ /** The error of a grammar rule that the engine cannot keep. Each problem has the path of the rule in the grammar. */
388
+ export declare class EngineGrammarError extends Error {
389
+ /** The problems: one text for each rule that the engine cannot keep. */
390
+ readonly problems: readonly string[];
391
+ constructor(problems: readonly string[]);
392
+ }
393
+ /**
394
+ * This function gives the kinds and the relation kinds of the grammar as an add-on of the engine.
395
+ *
396
+ * @throws EngineGrammarError when the grammar has a rule that the engine cannot keep
397
+ */
398
+ export declare function engineAddOn(grammar: Grammar): RegistryInput;
399
+ /**
400
+ * This function gives the registry of the engine with the spine and the kinds of canon.
401
+ *
402
+ * @throws EngineGrammarError when the grammar has a rule that the engine cannot keep
403
+ */
404
+ export declare function engineRegistry(grammar: Grammar): Registry;
405
+ /** The records of canon in the engine: each entity and each relation, or the problems of the load. */
406
+ interface EngineLoad {
407
+ readonly entities: readonly Entity[];
408
+ readonly edges: readonly Edge$1[];
409
+ /** The problems: one text for each record or relation that the engine refuses or changes. */
410
+ readonly problems: readonly string[];
411
+ }
412
+ /**
413
+ * This function loads each record and each relation into the engine. A record or a relation that the engine refuses is a
414
+ * problem. A value that the engine changes is also a problem: the load keeps each value. The engine adds only the scope
415
+ * `public`, the default scope of each kind of canon, to an envelope with no scope.
416
+ */
417
+ export declare function loadIntoEngine(registry: Registry, records: readonly LoadedRecord[]): EngineLoad;
373
418
  /** The most pages of 100 repositories that the read asks for each owner. A full last page is an error. */
374
419
  export declare const REPOSITORY_PAGES = 5;
375
420
  /** This function gives the URLs of the pages of the public repositories of each owner. */
@@ -599,8 +644,10 @@ export declare function checkMatches(pattern: string, name: string): boolean;
599
644
  * - mutation: a lane file (`mutation.json`, or the input `lane` of the caller) and a job that calls `reusable-mutation.yml`.
600
645
  * - property: a package file that names `fast-check` or `@mark1russell7/rigor-testkit`. Its checks are the checks of
601
646
  * each job that calls `reusable-ci.yml` or starts the tests, and of each job that needs such a job.
602
- * - speed: a package file that names `@mark1russell7/rigor-bench`, and a job that starts a bench. A bench job uses the
603
- * action `stamp-gate`, the bin `rigor-gate-line` or `rigor-stamp`, or a command with the word `bench`.
647
+ * - speed: a package file that names `@mark1russell7/rigor-bench`, and a job that starts a bench. A summary job with
648
+ * `gate: speed` (the marker of `gate-summary`) gives the bench jobs. With no marker in the repository, the read uses
649
+ * a word rule. Then a bench job uses the action `stamp-gate`, a bin of the bench or a command with the word `bench`.
650
+ * The bins are `rigor-gate-line` and `rigor-stamp`.
604
651
  * - rigs: the file `docs/rigs.json` and a job that calls `reusable-rigs.yml`.
605
652
  *
606
653
  * A file with no answer, or a file that the read cannot parse, gives a no read for each gate that needs it.
@@ -612,7 +659,7 @@ export declare function gatesOf(tree: Tree, answers: ReadonlyMap<string, HomeAns
612
659
  * This function reads the test gates of each repository. The default fetch is `politeFetch` with no token, so each
613
660
  * request goes at the pace of its host. The read makes two rounds of requests:
614
661
  *
615
- * 1. the tree and the rules of the branch of each repository, from the API of GitHub,
662
+ * 1. the tree, the rules and the classic protection of the branch of each repository, from the API of GitHub,
616
663
  * 2. each workflow file and each package file of each tree, from the host of raw files. Two files with the same content
617
664
  * id give one request.
618
665
  *
@@ -652,4 +699,4 @@ export declare function planWrite(root: string, records: readonly EntityRecord[]
652
699
  export declare function isEmptyPlan(plan: WritePlan): boolean;
653
700
  /** This function applies a plan: it writes each file, with its folder, and removes each file of `remove`. */
654
701
  export declare function applyPlan(root: string, plan: WritePlan): void;
655
- export { type Acceptance, type Atlas, type AtlasClass, type AtlasCopy, type AtlasImport, type AtlasRead, type AtlasRepository, type AtlasRow, type BoardAction, type BoardInput, type BoardIssue, type ClaimCommand, type ClaimDecision, type ClaimInput, type ClaimState, type CliOptions, type CloneClass, type CloneGroup, type CloneMember, type Edge, type EdgeRecord, type EntityRecord, type Envelope, type FacetDef, type Gap, type GateFact, type GateName, type GateRepository, type Grammar, type HomeFacts, type HomeImport, type IssueApi, type IssueChange, type IssueText, type JsonSchema, type KindDef, type KindMode, type LoadedRecord, NECESSARY_GATES, type NecessaryGate, type NoRead, type NpmFact, ONTOLOGY_REPOSITORY, type Ontology, PLACES_SHOWN, type PoliteFetchOptions, type Problem, type ProblemRead, type ProblemResult, type PublicRepository, type RelationKindDef, type ResultClaim, SIZES, type Scope, type Size, type TargetAttrs, type TargetRecord, type TestGates, type Tree, type UrlAnswers, type UrlFetch, type WritePlan, compareTargets, findProblem, formalKeyOf, leanKey, problemIdOf, targetId, targetsOf };
702
+ export { type Acceptance, type Atlas, type AtlasClass, type AtlasCopy, type AtlasImport, type AtlasRead, type AtlasRepository, type AtlasRow, type BoardAction, type BoardInput, type BoardIssue, type ClaimCommand, type ClaimDecision, type ClaimInput, type ClaimState, type CliOptions, type CloneClass, type CloneGroup, type CloneMember, type Edge, type EdgeRecord, type EngineLoad, type EntityRecord, type Envelope, type FacetDef, type Gap, type GateFact, type GateName, type GateRepository, type Grammar, type HomeFacts, type HomeImport, type IssueApi, type IssueChange, type IssueText, type JsonSchema, type KindDef, type KindMode, type LoadedRecord, NECESSARY_GATES, type NecessaryGate, type NoRead, type NpmFact, ONTOLOGY_REPOSITORY, type Ontology, PLACES_SHOWN, type PoliteFetchOptions, type Problem, type ProblemRead, type ProblemResult, type PublicRepository, type RelationKindDef, type ResultClaim, SIZES, type Scope, type Size, type TargetAttrs, type TargetRecord, type TestGates, type Tree, type UrlAnswers, type UrlFetch, type WritePlan, compareTargets, findProblem, formalKeyOf, leanKey, problemIdOf, targetId, targetsOf };