@inventarch/compliance 3.6.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +3 -3
  2. package/SPEC.md +16 -7
  3. package/dist/canon/laws.d.ts +33 -0
  4. package/dist/canon/laws.d.ts.map +1 -0
  5. package/dist/canon/laws.js +100 -0
  6. package/dist/canon/laws.js.map +1 -0
  7. package/dist/canon/rules.d.ts +49 -0
  8. package/dist/canon/rules.d.ts.map +1 -0
  9. package/dist/canon/rules.js +341 -0
  10. package/dist/canon/rules.js.map +1 -0
  11. package/dist/catalog.d.ts +36 -7
  12. package/dist/catalog.d.ts.map +1 -1
  13. package/dist/catalog.js +100 -30
  14. package/dist/catalog.js.map +1 -1
  15. package/dist/check-ids.d.ts +1 -1
  16. package/dist/check-ids.d.ts.map +1 -1
  17. package/dist/check-ids.js +8 -0
  18. package/dist/check-ids.js.map +1 -1
  19. package/dist/conformance/evidence-fixtures.d.ts.map +1 -1
  20. package/dist/conformance/evidence-fixtures.js +10 -7
  21. package/dist/conformance/evidence-fixtures.js.map +1 -1
  22. package/dist/conformance/evidence.d.ts +4 -4
  23. package/dist/conformance/evidence.d.ts.map +1 -1
  24. package/dist/conformance/evidence.js +3 -2
  25. package/dist/conformance/evidence.js.map +1 -1
  26. package/dist/conformance/inventory.d.ts +5 -1
  27. package/dist/conformance/inventory.d.ts.map +1 -1
  28. package/dist/conformance/inventory.generated.d.ts +1 -1
  29. package/dist/conformance/inventory.generated.d.ts.map +1 -1
  30. package/dist/conformance/inventory.generated.js +18 -2
  31. package/dist/conformance/inventory.generated.js.map +1 -1
  32. package/dist/conformance/inventory.js +5 -0
  33. package/dist/conformance/inventory.js.map +1 -1
  34. package/dist/conformance/refusals.d.ts.map +1 -1
  35. package/dist/conformance/refusals.js +249 -0
  36. package/dist/conformance/refusals.js.map +1 -1
  37. package/dist/conformance/verify.d.ts +1 -1
  38. package/dist/conformance/verify.d.ts.map +1 -1
  39. package/dist/conformance/verify.js +6 -4
  40. package/dist/conformance/verify.js.map +1 -1
  41. package/dist/evidence.d.ts.map +1 -1
  42. package/dist/evidence.js +2 -2
  43. package/dist/evidence.js.map +1 -1
  44. package/dist/index.d.ts +6 -3
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +4 -2
  47. package/dist/index.js.map +1 -1
  48. package/dist/obligations.d.ts.map +1 -1
  49. package/dist/obligations.js +10 -7
  50. package/dist/obligations.js.map +1 -1
  51. package/dist/profiles.d.ts +4 -3
  52. package/dist/profiles.d.ts.map +1 -1
  53. package/dist/profiles.js +9 -2
  54. package/dist/profiles.js.map +1 -1
  55. package/dist/report.d.ts +6 -0
  56. package/dist/report.d.ts.map +1 -1
  57. package/dist/report.js +3 -0
  58. package/dist/report.js.map +1 -1
  59. package/dist/types.d.ts +1 -1
  60. package/dist/types.d.ts.map +1 -1
  61. package/dist/types.js +8 -0
  62. package/dist/types.js.map +1 -1
  63. package/package.json +3 -3
@@ -0,0 +1,341 @@
1
+ import { selectionWithin } from '@inventarch/graph';
2
+ import { assess } from '../types.js';
3
+ import { fields, textField } from '../graph-checks.js';
4
+ import { SEVERITY_ORDER, canonSeverity, lawSeverity } from './laws.js';
5
+ const WORK_INSTANCES = new Set(['plan', 'milestone', 'task', 'decision', 'spec']);
6
+ const SYSTEM_FOLDER = /^\.ia\/src\/systems\/([^/]+)\//;
7
+ /** The `@system` of the folder `.ia/src/systems/<folder>/`: the one authored in it, else the one named `<folder>`. */
8
+ function folderSystems(nodes, folder) {
9
+ const systems = nodes.filter((node) => node.discriminator === 'system');
10
+ const inside = systems.filter((s) => posix(s.source.path).startsWith(`.ia/src/systems/${folder}/`));
11
+ return inside.length > 0 ? inside : systems.filter((s) => s.name === folder);
12
+ }
13
+ const mintsWords = (systems) => systems.some((s) => sectionKeys(s, 'discriminators').length > 0);
14
+ /** The system folders `.ia/src/systems/<name>/` whose `@system` declares discriminators, so mints words. */
15
+ function vocabularyFolders(nodes) {
16
+ const folders = new Set();
17
+ for (const node of nodes) {
18
+ const match = SYSTEM_FOLDER.exec(posix(node.source.path));
19
+ if (match !== null)
20
+ folders.add(match[1]);
21
+ }
22
+ return new Set([...folders].filter((folder) => mintsWords(folderSystems(nodes, folder))));
23
+ }
24
+ /**
25
+ * A14: work records inside a vocabulary system's folder `.ia/src/systems/<name>/`, one whose `@system` declares
26
+ * discriminators. A wordless method system's folder is not a vocabulary payload. The caller sets the severity.
27
+ */
28
+ export function canonWorkPlacement(nodes) {
29
+ const vocabulary = vocabularyFolders(nodes);
30
+ return nodes
31
+ .filter((node) => {
32
+ if (!WORK_INSTANCES.has(node.discriminator))
33
+ return false;
34
+ const match = SYSTEM_FOLDER.exec(posix(node.source.path));
35
+ return match !== null && vocabulary.has(match[1]);
36
+ })
37
+ .map((node) => ({
38
+ code: 'IA-COMP-CANON-WORK-PLACEMENT',
39
+ path: node.source.path,
40
+ line: node.source.line,
41
+ severity: 'error',
42
+ message: `${node.source.path}:${node.source.line}: Repository plans, milestones, tasks, decisions and specifications belong in workspace-authored records, outside reusable vocabulary system payloads.`,
43
+ }));
44
+ }
45
+ const posix = (path) => path.split(String.fromCharCode(92)).join('/');
46
+ const PLUGIN_RECORDS = /^\.ia\/src\/systems\/([^/]+)\/records\/plugin\.ia$/;
47
+ const SYSTEM_RECORDS = /^\.ia\/src\/systems\/([^/]+)\/records\/[^/]+$/;
48
+ /** The kit's seat workspace: the repository's own, which a kit never ships. */
49
+ const SEAT_WORKSPACE = '.ia/src/workspace.ia';
50
+ const NO_KIT = { systems: [], distributions: [] };
51
+ /** The names of the `@<discriminator>` references a distribution's `distribution.records` lists. */
52
+ function listed(distribution, discriminator) {
53
+ const names = [];
54
+ for (const field of fields(distribution, 'distribution', 'records'))
55
+ if (field.value.kind === 'list')
56
+ for (const item of field.value.items)
57
+ if (item.kind === 'ref' && item.discriminator === discriminator)
58
+ names.push(item.name);
59
+ return names;
60
+ }
61
+ /** Form (a): the one system whose `records/plugin.ia` authors a product `@distribution` (host-plugin-distribution section 12). */
62
+ function loweredKit(nodes) {
63
+ const found = new Map();
64
+ for (const node of nodes) {
65
+ if (node.discriminator !== 'distribution' || !node.sections.some((s) => s.name === 'product'))
66
+ continue;
67
+ const match = PLUGIN_RECORDS.exec(posix(node.source.path));
68
+ if (match !== null)
69
+ found.set(match[1], [...(found.get(match[1]) ?? []), node]);
70
+ }
71
+ if (found.size !== 1)
72
+ return NO_KIT;
73
+ const [system, distributions] = [...found][0];
74
+ return { systems: [system], distributions };
75
+ }
76
+ /**
77
+ * Form (b): a `@distribution` authored under `.ia/src/systems/<n>/records/` whose `distribution.records` lists `@system`
78
+ * or `@workspace` records. Its kit systems are the `@system`s it lists. One listing only `@workspace`s (as ia-brand,
79
+ * ia-design, ia-ui and ia-ux ship) makes `<n>`, the system folder holding it, the kit system, but only when that folder's
80
+ * `@system` declares no discriminators: a vocabulary system's `@workspace`-only distribution (the foundation's
81
+ * `workspace-system`) is not a kit. A folder with no `@system` is not one either. The detection is heuristic.
82
+ */
83
+ const wordless = (nodes, folder) => {
84
+ const systems = folderSystems(nodes, folder);
85
+ return systems.length > 0 && !mintsWords(systems);
86
+ };
87
+ function nativeKit(nodes) {
88
+ const systems = new Set();
89
+ const distributions = [];
90
+ for (const node of nodes) {
91
+ if (node.discriminator !== 'distribution')
92
+ continue;
93
+ const match = SYSTEM_RECORDS.exec(posix(node.source.path));
94
+ if (match === null)
95
+ continue;
96
+ const named = listed(node, 'system');
97
+ if (named.length > 0)
98
+ for (const name of named)
99
+ systems.add(name);
100
+ else if (listed(node, 'workspace').length > 0 && wordless(nodes, match[1]))
101
+ systems.add(match[1]);
102
+ else
103
+ continue;
104
+ distributions.push(node);
105
+ }
106
+ return { systems: [...systems].sort(), distributions };
107
+ }
108
+ /** The kit: the single section 12 system, else the systems native release distributions name. */
109
+ function kitOf(nodes) {
110
+ const lowered = loweredKit(nodes);
111
+ return lowered.systems.length > 0 ? lowered : nativeKit(nodes);
112
+ }
113
+ const kitSystems = (nodes) => kitOf(nodes).systems;
114
+ /**
115
+ * True when the workspace is a kit: either exactly one system has `records/plugin.ia` authoring a product `@distribution`,
116
+ * or a `@distribution` authored under `.ia/src/systems/<name>/records/` lists one or more `@system` or `@workspace`
117
+ * records.
118
+ */
119
+ export function isKitWorkspace(nodes) {
120
+ return kitSystems(nodes).length > 0;
121
+ }
122
+ /**
123
+ * The `@workspace` records a kit ships: those its kit distributions list in `distribution.records`, and those authored
124
+ * under a kit system's folder `.ia/src/systems/<kit system>/`. Never the seat `.ia/src/workspace.ia`, which stays home.
125
+ */
126
+ function shippedWorkspaces(nodes) {
127
+ const kit = kitOf(nodes);
128
+ if (kit.systems.length === 0)
129
+ return [];
130
+ const names = new Set(kit.distributions.flatMap((d) => listed(d, 'workspace')));
131
+ return nodes.filter((node) => {
132
+ if (node.discriminator !== 'workspace')
133
+ return false;
134
+ const path = posix(node.source.path);
135
+ if (path === SEAT_WORKSPACE)
136
+ return false;
137
+ return names.has(node.name) || kit.systems.some((system) => path.startsWith(`.ia/src/systems/${system}/`));
138
+ });
139
+ }
140
+ /**
141
+ * The kit systems that execute (dec-040 A): a kit system whose records include an `@execution-binding`. Their folders
142
+ * `.ia/src/systems/<name>/` may hold scripts.
143
+ */
144
+ export function executingKitSystems(nodes) {
145
+ return kitSystems(nodes).filter((name) => nodes.some((node) => node.discriminator === 'execution-binding' && posix(node.source.path).startsWith(`.ia/src/systems/${name}/`)));
146
+ }
147
+ const METHOD_WORDS = new Set([
148
+ 'capability',
149
+ 'playbook',
150
+ 'convention',
151
+ 'principle',
152
+ 'law',
153
+ 'agent-profile',
154
+ ]);
155
+ const systemNode = (nodes, name) => nodes.find((node) => node.discriminator === 'system' && node.name === name);
156
+ const sectionKeys = (node, section) => node.sections
157
+ .filter((s) => s.name === section)
158
+ .flatMap((s) => s.fields.map((f) => ('key' in f ? f.key : f.item.kind === 'scalar' ? f.item.text : '')));
159
+ /** C4: in a kit, each method system declares no discriminators and requires the owner of every word its records use. */
160
+ export function canonKitMethodWords(nodes, folders) {
161
+ const found = [];
162
+ const report = (path, line, message) => {
163
+ found.push({
164
+ code: 'IA-COMP-CANON-KIT-WORDS',
165
+ path,
166
+ line,
167
+ severity: 'error',
168
+ message: `${path}:${line}: ${message}`,
169
+ });
170
+ };
171
+ const owners = new Map();
172
+ for (const node of nodes)
173
+ if (node.discriminator === 'system')
174
+ for (const word of sectionKeys(node, 'discriminators'))
175
+ owners.set(word, node.name);
176
+ for (const kit of kitSystems(nodes)) {
177
+ const folder = folders?.find((f) => f.name === kit);
178
+ const used = new Map();
179
+ const record = (word, path, line) => {
180
+ if (!used.has(word))
181
+ used.set(word, { path, line });
182
+ };
183
+ if (folder !== undefined)
184
+ for (const r of folder.records)
185
+ record(r.discriminator, r.source.path, r.source.line);
186
+ else
187
+ for (const node of nodes)
188
+ if (posix(node.source.path).startsWith(`.ia/src/systems/${kit}/`))
189
+ record(node.discriminator, node.source.path, node.source.line);
190
+ if (![...used.keys()].some((word) => METHOD_WORDS.has(word)))
191
+ continue;
192
+ const method = systemNode(nodes, kit);
193
+ if (method !== undefined) {
194
+ const minted = sectionKeys(method, 'discriminators');
195
+ if (minted.length > 0)
196
+ report(method.source.path, method.source.line, `Kit system ${kit} declares ${minted.join(', ')}; a kit method system mints no words and requires the system that owns each word it uses.`);
197
+ }
198
+ const required = new Set(method === undefined ? [] : sectionKeys(method, 'requires'));
199
+ for (const [word, where] of [...used].sort(([x], [y]) => (x < y ? -1 : x > y ? 1 : 0))) {
200
+ const owner = owners.get(word);
201
+ if (owner !== undefined && owner !== kit && !required.has(owner))
202
+ report(where.path, where.line, `Kit system ${kit} uses ${word} but does not require ${owner}, which owns it.`);
203
+ }
204
+ }
205
+ return found;
206
+ }
207
+ /**
208
+ * C5a: in a kit, each shipped `@workspace` (see `shippedWorkspaces`) has no `composition.steward` and no
209
+ * `composition.sources`. The kit's own seat workspace is not shipped, so it is not checked.
210
+ */
211
+ export function canonKitWorkspace(nodes) {
212
+ const found = [];
213
+ for (const node of shippedWorkspaces(nodes)) {
214
+ for (const key of ['steward', 'sources'])
215
+ for (const field of fields(node, 'composition', key))
216
+ found.push({
217
+ code: 'IA-COMP-CANON-KIT-WORKSPACE',
218
+ path: node.source.path,
219
+ line: field.span.line,
220
+ severity: 'error',
221
+ message: `${node.source.path}:${field.span.line}: A kit workspace declares no composition.${key}; the host workspace supplies it.`,
222
+ });
223
+ }
224
+ return found;
225
+ }
226
+ /** The identities `node` cites. With the graph, only its resolved `cite` edges count; without one, its edges' own targets. */
227
+ function citedBy(node, graph) {
228
+ const found = new Set();
229
+ if (graph !== undefined) {
230
+ for (const edge of graph.edges)
231
+ if (edge.predicate === 'cite' && edge.from === node.identity && edge.to !== null)
232
+ found.add(edge.to);
233
+ }
234
+ else
235
+ for (const edge of node.edges)
236
+ if (edge.predicate === 'cite' && edge.direction === 'out' && edge.target !== null)
237
+ found.add(edge.target);
238
+ return found;
239
+ }
240
+ /** The text of each non-reference item of a list field. */
241
+ const listTexts = (node, section, key) => fields(node, section, key).flatMap((field) => field.value.kind === 'list' ? field.value.items.flatMap((item) => ('text' in item ? [item.text] : [])) : []);
242
+ /**
243
+ * E5: a mandate citing a mandate allows no move and covers no path the cited mandate does not. Each `covers` selection
244
+ * must lie within one of the cited mandate's, read in the graph's path selection dialect (`selectionWithin`, G06c).
245
+ */
246
+ export function canonMandateNarrowing(nodes, graph) {
247
+ const found = [];
248
+ const mandates = new Map(nodes.filter((n) => n.discriminator === 'mandate').map((n) => [n.identity, n]));
249
+ for (const mandate of mandates.values())
250
+ for (const id of [...citedBy(mandate, graph)].sort()) {
251
+ const parent = mandates.get(id);
252
+ if (parent === undefined)
253
+ continue;
254
+ const moves = new Set(listTexts(parent, 'authority', 'moves'));
255
+ const covers = listTexts(parent, 'authority', 'covers');
256
+ const report = (key, message) => {
257
+ const line = fields(mandate, 'authority', key)[0]?.span.line ?? mandate.source.line;
258
+ found.push({
259
+ code: 'IA-COMP-CANON-MANDATE-WIDEN',
260
+ path: mandate.source.path,
261
+ line,
262
+ severity: 'error',
263
+ message: `${mandate.source.path}:${line}: ${message}`,
264
+ });
265
+ };
266
+ for (const move of listTexts(mandate, 'authority', 'moves'))
267
+ if (!moves.has(move))
268
+ report('moves', `Mandate ${mandate.name} allows ${move}, which ${parent.name}, which it cites, does not.`);
269
+ for (const path of listTexts(mandate, 'authority', 'covers'))
270
+ if (!covers.some((c) => selectionWithin(path, c)))
271
+ report('covers', `Mandate ${mandate.name} covers ${path}, outside every path ${parent.name}, which it cites, covers.`);
272
+ }
273
+ return found;
274
+ }
275
+ /**
276
+ * A canon record: one under `.ia/src/systems/<system>/records/canon/`, in the folder of the system owning its word, as
277
+ * authored or as installed (the store prefix `.ia/distributions/store/<sha256 hex>/` before it).
278
+ */
279
+ const CANON_LAWS = /^(?:\.ia\/distributions\/store\/[0-9a-f]{64}\/)?\.ia\/src\/systems\/[^/]+\/records\/canon\//;
280
+ const underCanon = (node) => CANON_LAWS.test(posix(node.source.path));
281
+ /**
282
+ * E4, its verifiable half: a local law or convention that cites a canon law (a resolved `cites` edge to a law under a
283
+ * `records/canon/` folder) governs that law's subject word and is at least as strong (informational < advisory <
284
+ * blocking). The law also asks that a rule tightening a canon law cite it; subject-word equality is no evidence that a
285
+ * rule tightens one, so an uncited rule is not judged here and that half is left to review.
286
+ */
287
+ export function canonLocalTightening(nodes, graph) {
288
+ const found = [];
289
+ const canon = nodes.filter((node) => node.discriminator === 'law' && underCanon(node));
290
+ for (const local of nodes) {
291
+ if ((local.discriminator !== 'law' && local.discriminator !== 'convention') || underCanon(local))
292
+ continue;
293
+ const cited = citedBy(local, graph), tightened = canon.filter((law) => cited.has(law.identity));
294
+ if (tightened.length === 0)
295
+ continue;
296
+ const word = textField(local, 'subject', 'subject-word');
297
+ const report = (message) => {
298
+ found.push({
299
+ code: 'IA-COMP-CANON-LOCAL-TIGHTEN',
300
+ path: local.source.path,
301
+ line: local.source.line,
302
+ severity: 'error',
303
+ message: `${local.source.path}:${local.source.line}: ${message}`,
304
+ });
305
+ };
306
+ for (const law of tightened) {
307
+ // A canon law with no subject word sets no word to match: only its severity is judged.
308
+ const lawWord = textField(law, 'subject', 'subject-word');
309
+ if (lawWord !== undefined && word !== lawWord)
310
+ report(`${local.name} cites the canon law ${law.name}, which governs the word ${lawWord}, but ${word === undefined ? 'governs no subject word' : `governs the word ${word}`}.`);
311
+ if (SEVERITY_ORDER[lawSeverity(local)] < SEVERITY_ORDER[lawSeverity(law)])
312
+ report(`${local.name} is ${lawSeverity(local)}, weaker than the canon law ${law.name}, which is ${lawSeverity(law)}.`);
313
+ }
314
+ }
315
+ return found;
316
+ }
317
+ const RULES = [
318
+ ['CANON-WORK-PLACEMENT', canonWorkPlacement],
319
+ ['CANON-KIT-WORDS', canonKitMethodWords],
320
+ ['CANON-KIT-WORKSPACE', canonKitWorkspace],
321
+ ['CANON-MANDATE-NARROW', (nodes, _folders, graph) => canonMandateNarrowing(nodes, graph)],
322
+ ['CANON-LOCAL-TIGHTEN', (nodes, _folders, graph) => canonLocalTightening(nodes, graph)],
323
+ ];
324
+ /**
325
+ * One built-in canon check as an assessment: null while no law enforces a check that runs `id`, else its findings at the
326
+ * severity the law sets. `find` runs only when the check is active, so a rule that reads files reads none while inactive.
327
+ */
328
+ export function canonAssessment(nodes, id, find, graph) {
329
+ const severity = canonSeverity(nodes, id, graph);
330
+ return severity === null
331
+ ? null
332
+ : assess(id, 'graph', find().map((finding) => ({ ...finding, severity })));
333
+ }
334
+ /**
335
+ * The built-in canon rules, each active only when a law enforces a check that runs it. The law sets the severity;
336
+ * an inactive rule reports nothing. `folders` is read by the rules that look at system folders.
337
+ */
338
+ export function canonAssessments(nodes, folders, graph) {
339
+ return RULES.flatMap(([id, rule]) => canonAssessment(nodes, id, () => rule(nodes, folders, graph), graph) ?? []);
340
+ }
341
+ //# sourceMappingURL=rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.js","sourceRoot":"","sources":["../../src/canon/rules.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,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,MAAM,CACJ,EAAE,EACF,OAAO,EACP,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,CACpD,CAAC;AACR,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAAsB,EACtB,OAA4C,EAC5C,KAAa;IAEb,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;AACnH,CAAC"}
package/dist/catalog.d.ts CHANGED
@@ -1,9 +1,19 @@
1
1
  import type { Assessment } from './types.js';
2
2
  /**
3
- * Current catalog format (C25). Any minor of major 1 is accepted but must use exactly the v1 fields, so a minor
4
- * that adds behavior is refused rather than ignored; the declared minor is part of the catalog digest.
3
+ * Current catalog format (C25): `{format: 'evaluator-catalog', formatVersion: 2, entries}`. The version is an
4
+ * integer field, never part of the name; an unsupported version is refused, and it is part of the catalog digest.
5
5
  */
6
- export declare const EVALUATOR_CATALOG_FORMAT = "ia-evaluator-catalog/1.0";
6
+ export declare const EVALUATOR_CATALOG_FORMAT = "evaluator-catalog";
7
+ /** The catalog format versions this package reads in the current shape. */
8
+ export declare const EVALUATOR_CATALOG_FORMAT_VERSIONS: readonly [2];
9
+ /** The catalog format version new catalogs declare. */
10
+ export declare const EVALUATOR_CATALOG_FORMAT_VERSION = 2;
11
+ /**
12
+ * The legacy catalog format: `{format: 'ia-evaluator-catalog/1.<minor>', entries}`, whose entries name their codecs
13
+ * with `inputSchemaId` / `outputSchemaId` strings `name@major`. It is still read, by the explicit legacy reader
14
+ * below, and converted to the current entry shape; its digest stays the one computed over the declared legacy entries.
15
+ */
16
+ export declare const LEGACY_EVALUATOR_CATALOG_FORMAT = "ia-evaluator-catalog/1.0";
7
17
  /** Evaluator invocation-contract majors this package understands. */
8
18
  export declare const EVALUATOR_CONTRACT_MAJORS: readonly [1];
9
19
  export interface EvaluatorLimits {
@@ -29,13 +39,19 @@ export interface EnvironmentProfile {
29
39
  readonly id: string;
30
40
  readonly credentials: 'none' | 'scoped';
31
41
  }
42
+ /** A codec reference: a codec id and its integer version. The pair, never a joined string, names a codec. */
43
+ export interface CodecRef {
44
+ readonly id: string;
45
+ readonly version: number;
46
+ }
32
47
  export interface EvaluatorEntry {
33
48
  readonly id: string;
49
+ /** The version of the evaluator's invocation contract. */
34
50
  readonly contractVersion: string;
35
51
  readonly implementationVersion: string;
36
52
  readonly implementationDigest: string;
37
- readonly inputSchemaId: string;
38
- readonly outputSchemaId: string;
53
+ readonly inputCodec: CodecRef;
54
+ readonly outputCodec: CodecRef;
39
55
  readonly supportedScopes: readonly string[];
40
56
  readonly effects: readonly string[];
41
57
  readonly environmentProfile: EnvironmentProfile;
@@ -49,15 +65,18 @@ export interface EvaluatorEntry {
49
65
  */
50
66
  export interface EvaluatorCodec {
51
67
  readonly id: string;
68
+ readonly version: number;
52
69
  readonly validate: (value: unknown) => boolean;
53
70
  readonly normalize?: (value: unknown) => unknown;
54
71
  }
55
72
  export interface CatalogInput {
56
73
  readonly format: string;
74
+ /** Required in the current shape; absent in the legacy `ia-evaluator-catalog/1.x` shape. */
75
+ readonly formatVersion?: number;
57
76
  readonly entries: readonly unknown[];
58
77
  }
59
78
  export interface CatalogOptions {
60
- readonly codecs: ReadonlyMap<string, EvaluatorCodec> | readonly EvaluatorCodec[];
79
+ readonly codecs: readonly EvaluatorCodec[];
61
80
  /**
62
81
  * Additional host-reserved ids (D4). They only block catalog overrides; they never pass COMP-CHECK and never
63
82
  * resolve as evaluators. Only CHECK_IDS are built in.
@@ -66,6 +85,8 @@ export interface CatalogOptions {
66
85
  }
67
86
  export interface EvaluatorCatalog {
68
87
  readonly format: string;
88
+ /** 2 for the current shape; 1 for a catalog read from the legacy `ia-evaluator-catalog/1.x` shape. */
89
+ readonly formatVersion: number;
69
90
  readonly digest: string;
70
91
  readonly entries: readonly EvaluatorEntry[];
71
92
  /** Always exactly CHECK_IDS. */
@@ -88,6 +109,13 @@ export interface EvaluatorBinding<T> {
88
109
  }
89
110
  export declare const EVALUATOR_ID: RegExp;
90
111
  export declare const DIGEST: RegExp;
112
+ /** True for a `{id, version}` codec reference: a plain-token id and a positive safe-integer version. */
113
+ export declare function isCodecRef(value: unknown): value is CodecRef;
114
+ /**
115
+ * The legacy reader for a codec id written `name@major` (catalogs `ia-evaluator-catalog/1.x`, evidence that
116
+ * recorded such ids): the one place that parses it. Returns undefined for anything else.
117
+ */
118
+ export declare function legacyCodecRef(legacyId: unknown): CodecRef | undefined;
91
119
  export declare function compareVersions(a: string, b: string): number;
92
120
  /**
93
121
  * Pure v1 catalog constructor (C25). Refuses unknown format majors, malformed entries, invalid limits,
@@ -98,7 +126,8 @@ export declare function createEvaluatorCatalog(input: CatalogInput, options: Cat
98
126
  /** True only for a catalog returned by createEvaluatorCatalog in this module instance. */
99
127
  export declare function isEvaluatorCatalog(value: unknown): value is EvaluatorCatalog;
100
128
  export declare function assertCatalog(value: unknown): asserts value is EvaluatorCatalog;
101
- export declare function codecOf(catalog: EvaluatorCatalog, id: string): EvaluatorCodec | undefined;
129
+ /** The host codec registered for exactly this `{id, version}` pair, or undefined. */
130
+ export declare function codecOf(catalog: EvaluatorCatalog, ref: CodecRef): EvaluatorCodec | undefined;
102
131
  /** The entry a check's evaluator id (checkRunner: check.implementation, else check.runs) selects: the supported implementation, else the highest listed version. */
103
132
  export declare function selectEvaluator(catalog: EvaluatorCatalog, id: string): EvaluatorEntry | undefined;
104
133
  export declare function catalogEntry(catalog: EvaluatorCatalog, id: string, implementationVersion: string): EvaluatorEntry | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"catalog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