@mailwoman/geographic-model 10.0.0 → 10.2.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 (62) hide show
  1. package/README.md +32 -32
  2. package/data/geographic-model.json +5 -5
  3. package/data/model/concepts.json +5 -5
  4. package/lib/artifact.ts +37 -65
  5. package/lib/compile.ts +55 -70
  6. package/lib/index.ts +22 -35
  7. package/lib/load.ts +60 -72
  8. package/lib/lookup.ts +12 -28
  9. package/lib/packaged.ts +50 -0
  10. package/lib/schema.ts +104 -97
  11. package/lib/validate.ts +32 -56
  12. package/lib/validation/issues.ts +32 -36
  13. package/lib/validation/references.ts +24 -27
  14. package/out/artifact.d.ts +28 -45
  15. package/out/artifact.d.ts.map +1 -1
  16. package/out/artifact.js +25 -52
  17. package/out/artifact.js.map +1 -1
  18. package/out/compile.d.ts +27 -41
  19. package/out/compile.d.ts.map +1 -1
  20. package/out/compile.js +42 -64
  21. package/out/compile.js.map +1 -1
  22. package/out/index.d.ts +22 -35
  23. package/out/index.d.ts.map +1 -1
  24. package/out/index.js +22 -35
  25. package/out/index.js.map +1 -1
  26. package/out/load.d.ts +30 -39
  27. package/out/load.d.ts.map +1 -1
  28. package/out/load.js +42 -56
  29. package/out/load.js.map +1 -1
  30. package/out/lookup.d.ts +12 -28
  31. package/out/lookup.d.ts.map +1 -1
  32. package/out/lookup.js +4 -16
  33. package/out/lookup.js.map +1 -1
  34. package/out/packaged.d.ts +24 -0
  35. package/out/packaged.d.ts.map +1 -0
  36. package/out/packaged.js +42 -0
  37. package/out/packaged.js.map +1 -0
  38. package/out/schema.d.ts +104 -97
  39. package/out/schema.d.ts.map +1 -1
  40. package/out/schema.js +37 -52
  41. package/out/schema.js.map +1 -1
  42. package/out/tools/build-artifact.d.ts +27 -0
  43. package/out/tools/build-artifact.d.ts.map +1 -0
  44. package/out/tools/build-artifact.js +44 -0
  45. package/out/tools/build-artifact.js.map +1 -0
  46. package/out/validate.d.ts +29 -50
  47. package/out/validate.d.ts.map +1 -1
  48. package/out/validate.js +12 -35
  49. package/out/validate.js.map +1 -1
  50. package/out/validation/issues.d.ts +17 -20
  51. package/out/validation/issues.d.ts.map +1 -1
  52. package/out/validation/issues.js +25 -29
  53. package/out/validation/issues.js.map +1 -1
  54. package/out/validation/references.d.ts.map +1 -1
  55. package/out/validation/references.js +20 -23
  56. package/out/validation/references.js.map +1 -1
  57. package/package.json +35 -76
  58. package/tools/build-artifact.ts +56 -0
  59. package/out/scripts/build-artifact.d.ts +0 -51
  60. package/out/scripts/build-artifact.d.ts.map +0 -1
  61. package/out/scripts/build-artifact.js +0 -85
  62. package/out/scripts/build-artifact.js.map +0 -1
package/out/compile.d.ts CHANGED
@@ -3,82 +3,68 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Deterministic compilation of a validated {@link GeographicModelDocument} into the runtime artifact.
6
+ * Compiles a validated {@link GeographicModelDocument} into the runtime artifact deterministically.
7
7
  *
8
- * The compiler validates by DELEGATION: `parseGeographicModelDocument` is the only thing that
9
- * decides whether a document is well formed, and it throws with every violation before a single byte
10
- * is computed. There is no second validator here, and no partial artifact on failure — a compile
11
- * either produces the whole artifact or produces nothing.
8
+ * `parseGeographicModelDocument` performs all document validation and throws before compilation
9
+ * starts. A compile either returns the whole artifact or throws.
12
10
  *
13
- * **`isA` alone defines semantic inheritance.** Two things follow from it, and they are the whole
14
- * derivation surface:
11
+ * Only `isA` defines inheritance. The compiler materializes the transitive `isA` closure for each
12
+ * concept. It copies each ancestor's assertions onto descendants as {@link DerivedFactRecord}
13
+ * entries. The compiler does not close over relations marked `transitive` or `inverse`.
15
14
  *
16
- * 1. The transitive `isA` closure is materialized per concept, so a consumer asks "what is this a
17
- * kind of" with one lookup rather than by walking the graph at query time.
18
- * 2. Every assertion an ancestor carries is materialized onto its descendants as a
19
- * {@link DerivedFactRecord}, naming {@link DERIVATION_ISA_INHERITANCE} and every record the
20
- * derivation read. Without this a consumer would still be traversing — the closure alone tells it
21
- * which concepts to go and read, which is the traversal it was supposed to be spared.
22
- *
23
- * A relation declaring `transitive` or `inverse` is NOT closed over. Those fields are vocabulary
24
- * describing what the relation means; materializing them is a reasoning step no executable need has
25
- * asked for, and the boundary record excludes general reasoning from this package. The day one is
26
- * needed it arrives as its own named derivation beside this one.
27
- *
28
- * Cycles never reach the derivations: `parseGeographicModelDocument` refuses a direct or indirect
29
- * `isA` cycle and names the trail it followed, so a cyclic document fails as a validation error
30
- * rather than as a hang. The walk below is breadth-first over a visited set regardless, which makes
31
- * it total for any graph rather than for the graphs the validator happens to admit.
15
+ * The validator rejects `isA` cycles, but the ancestor walk also tracks visited concepts, so it
16
+ * terminates on any graph.
32
17
  */
33
18
  import { type CompiledGeographicModel } from "#artifact";
34
19
  /**
35
- * The name a fact derived by `isA` inheritance carries in its `derivation` field. A consumer branches on this rather
36
- * than on where the record sits.
20
+ * The `derivation` value of a fact derived by `isA` inheritance.
37
21
  */
38
22
  export declare const DERIVATION_ISA_INHERITANCE = "isa-assertion-inheritance";
39
23
  /**
40
- * Every way compilation can refuse a document the validator accepted.
24
+ * Reasons that compilation rejects a document that passed validation.
41
25
  *
42
- * Both are discovered while writing derived records, which is why the validator cannot report them: they are properties
43
- * of what the compiler is about to write, not of what the author wrote.
26
+ * Both problems concern the derived records.
27
+ * The validator never sees those records.
44
28
  */
45
29
  export declare const CompileIssueCode: {
46
30
  /**
47
- * An inherited assertion would land on a concept whose kind the relation does not accept on the asserting side.
48
- * Emitting it would put a record in the artifact that the document validator would reject if it were authored.
31
+ * An inherited assertion would apply to a concept whose kind the relation's `domainKinds` excludes.
49
32
  */
50
33
  readonly InheritedDomainKindMismatch: "inherited_domain_kind_mismatch";
51
34
  /**
52
- * Two derived facts claim one identifier. Reachable when an authored derived fact takes an identifier a derivation
53
- * also produces, or when authored identifiers carry the separators the derived form is built from.
35
+ * Two derived facts share one identifier.
36
+ *
37
+ * This happens when an authored derived fact uses an identifier that a derivation also
38
+ * produces, or when authored identifiers contain the separators of the derived form.
54
39
  */
55
40
  readonly DuplicateDerivedFactID: "duplicate_derived_fact_id";
56
41
  };
42
+ /**
43
+ * A {@link CompileIssueCode} value.
44
+ */
57
45
  export type CompileIssueCode = (typeof CompileIssueCode)[keyof typeof CompileIssueCode];
58
46
  /**
59
- * One reason a document that validates does not compile.
47
+ * One reason that a valid document does not compile.
60
48
  */
61
49
  export interface CompileIssue {
62
50
  code: CompileIssueCode;
63
51
  message: string;
64
52
  }
65
53
  /**
66
- * Thrown by {@link compileGeographicModel}. Carries every reason at once, and states them all in its message, so a
67
- * caller that only prints `error.message` still sees the whole list.
54
+ * The error that {@link compileGeographicModel} throws.
55
+ * Its message lists every issue.
68
56
  */
69
57
  export declare class GeographicModelCompileError extends Error {
70
58
  readonly issues: readonly CompileIssue[];
71
59
  constructor(issues: readonly CompileIssue[]);
72
60
  }
73
61
  /**
74
- * Compile an authored geographic-model document into its runtime artifact.
62
+ * Compiles an authored geographic-model document into its runtime artifact.
75
63
  *
76
- * Throws `GeographicModelValidationError` with every violation if the input is not a valid document, and
77
- * {@link GeographicModelCompileError} with every reason if it validates but its derivations cannot be written. Nothing
78
- * partial is ever returned.
64
+ * The artifact's tables are new sorted arrays that hold the authored records unchanged.
79
65
  *
80
- * The document is read, never rewritten: the artifact's tables are new arrays holding the authored records themselves,
81
- * ordered by identifier, and the derived tables are new records built beside them.
66
+ * @throws {GeographicModelValidationError} When the input is not a valid document.
67
+ * @throws {GeographicModelCompileError} When the document is valid but its derived facts are invalid.
82
68
  */
83
69
  export declare function compileGeographicModel(input: unknown): CompiledGeographicModel;
84
70
  //# sourceMappingURL=compile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../lib/compile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAIH,OAAO,EAA2B,KAAK,uBAAuB,EAAgC,MAAM,WAAW,CAAA;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GG;AACH,qBAAa,2BAA4B,SAAQ,KAAK;IACrD,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAA;IAExC,YAAY,MAAM,EAAE,SAAS,YAAY,EAAE,EAO1C;CACD;AA6MD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,uBAAuB,CA6B9E"}
package/out/compile.js CHANGED
@@ -3,63 +3,48 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Deterministic compilation of a validated {@link GeographicModelDocument} into the runtime artifact.
6
+ * Compiles a validated {@link GeographicModelDocument} into the runtime artifact deterministically.
7
7
  *
8
- * The compiler validates by DELEGATION: `parseGeographicModelDocument` is the only thing that
9
- * decides whether a document is well formed, and it throws with every violation before a single byte
10
- * is computed. There is no second validator here, and no partial artifact on failure — a compile
11
- * either produces the whole artifact or produces nothing.
8
+ * `parseGeographicModelDocument` performs all document validation and throws before compilation
9
+ * starts. A compile either returns the whole artifact or throws.
12
10
  *
13
- * **`isA` alone defines semantic inheritance.** Two things follow from it, and they are the whole
14
- * derivation surface:
11
+ * Only `isA` defines inheritance. The compiler materializes the transitive `isA` closure for each
12
+ * concept. It copies each ancestor's assertions onto descendants as {@link DerivedFactRecord}
13
+ * entries. The compiler does not close over relations marked `transitive` or `inverse`.
15
14
  *
16
- * 1. The transitive `isA` closure is materialized per concept, so a consumer asks "what is this a
17
- * kind of" with one lookup rather than by walking the graph at query time.
18
- * 2. Every assertion an ancestor carries is materialized onto its descendants as a
19
- * {@link DerivedFactRecord}, naming {@link DERIVATION_ISA_INHERITANCE} and every record the
20
- * derivation read. Without this a consumer would still be traversing — the closure alone tells it
21
- * which concepts to go and read, which is the traversal it was supposed to be spared.
22
- *
23
- * A relation declaring `transitive` or `inverse` is NOT closed over. Those fields are vocabulary
24
- * describing what the relation means; materializing them is a reasoning step no executable need has
25
- * asked for, and the boundary record excludes general reasoning from this package. The day one is
26
- * needed it arrives as its own named derivation beside this one.
27
- *
28
- * Cycles never reach the derivations: `parseGeographicModelDocument` refuses a direct or indirect
29
- * `isA` cycle and names the trail it followed, so a cyclic document fails as a validation error
30
- * rather than as a hang. The walk below is breadth-first over a visited set regardless, which makes
31
- * it total for any graph rather than for the graphs the validator happens to admit.
15
+ * The validator rejects `isA` cycles, but the ancestor walk also tracks visited concepts, so it
16
+ * terminates on any graph.
32
17
  */
33
18
  import { compareByCodePoint as compareIdentifiers } from "@mailwoman/core/strings/compare";
34
19
  import { ARTIFACT_SCHEMA_VERSION } from "#artifact";
35
20
  import { DerivationInputKind, toConceptID, toDerivedFactID, } from "#schema";
36
21
  import { parseGeographicModelDocument } from "#validate";
37
22
  /**
38
- * The name a fact derived by `isA` inheritance carries in its `derivation` field. A consumer branches on this rather
39
- * than on where the record sits.
23
+ * The `derivation` value of a fact derived by `isA` inheritance.
40
24
  */
41
25
  export const DERIVATION_ISA_INHERITANCE = "isa-assertion-inheritance";
42
26
  /**
43
- * Every way compilation can refuse a document the validator accepted.
27
+ * Reasons that compilation rejects a document that passed validation.
44
28
  *
45
- * Both are discovered while writing derived records, which is why the validator cannot report them: they are properties
46
- * of what the compiler is about to write, not of what the author wrote.
29
+ * Both problems concern the derived records.
30
+ * The validator never sees those records.
47
31
  */
48
32
  export const CompileIssueCode = {
49
33
  /**
50
- * An inherited assertion would land on a concept whose kind the relation does not accept on the asserting side.
51
- * Emitting it would put a record in the artifact that the document validator would reject if it were authored.
34
+ * An inherited assertion would apply to a concept whose kind the relation's `domainKinds` excludes.
52
35
  */
53
36
  InheritedDomainKindMismatch: "inherited_domain_kind_mismatch",
54
37
  /**
55
- * Two derived facts claim one identifier. Reachable when an authored derived fact takes an identifier a derivation
56
- * also produces, or when authored identifiers carry the separators the derived form is built from.
38
+ * Two derived facts share one identifier.
39
+ *
40
+ * This happens when an authored derived fact uses an identifier that a derivation also
41
+ * produces, or when authored identifiers contain the separators of the derived form.
57
42
  */
58
43
  DuplicateDerivedFactID: "duplicate_derived_fact_id",
59
44
  };
60
45
  /**
61
- * Thrown by {@link compileGeographicModel}. Carries every reason at once, and states them all in its message, so a
62
- * caller that only prints `error.message` still sees the whole list.
46
+ * The error that {@link compileGeographicModel} throws.
47
+ * Its message lists every issue.
63
48
  */
64
49
  export class GeographicModelCompileError extends Error {
65
50
  issues;
@@ -71,8 +56,8 @@ export class GeographicModelCompileError extends Error {
71
56
  }
72
57
  }
73
58
  /**
74
- * The order derivation inputs are listed in. Grouping by table first keeps a long input list readable; the identifier
75
- * breaks ties inside a table.
59
+ * Sort order of derivation inputs by kind.
60
+ * Identifiers break ties within a kind.
76
61
  */
77
62
  const DERIVATION_INPUT_ORDER = [
78
63
  DerivationInputKind.Concept,
@@ -83,30 +68,27 @@ const DERIVATION_INPUT_ORDER = [
83
68
  DerivationInputKind.DerivedFact,
84
69
  ];
85
70
  /**
86
- * The separator for the compound keys this module groups by. `U+0000` cannot appear in a readable identifier without
87
- * being visible in it, so two different key tuples cannot collapse onto one string. The derived IDENTIFIERS written
88
- * into the artifact use readable separators instead, and are checked for collisions once they are all built.
71
+ * Separator for internal grouping keys.
72
+ *
73
+ * Identifiers never contain `U+0000`, so distinct key tuples cannot produce the same string.
89
74
  */
90
75
  const KEY_SEPARATOR = "\u0000";
91
76
  /**
92
- * The separator between country codes inside a derived identifier.
77
+ * Separator between country codes in a derived identifier.
93
78
  */
94
79
  const COUNTRY_SEPARATOR = "+";
95
80
  function compareByID(left, right) {
96
81
  return compareIdentifiers(left.id, right.id);
97
82
  }
98
83
  /**
99
- * Walk `isA` upward from one concept and return every concept reachable, in code-point order.
100
- *
101
- * Breadth-first over a visited set: each concept is expanded once, so the walk terminates on any graph and the answer
102
- * does not depend on how the parents were authored. The concept itself is never in its own list — it could only get
103
- * there around a cycle, and the validator refuses those before the compiler runs.
84
+ * Returns every concept reachable from `conceptID` through `isA`, sorted by code point.
85
+ * The result excludes the concept itself.
104
86
  */
105
87
  function ancestorsOfConcept(conceptID, parents) {
106
88
  const visited = new Set();
107
89
  const frontier = [...(parents.get(conceptID) ?? [])];
108
- // An array iterator reads entries appended during the walk, which is what makes this breadth-first rather than a
109
- // pass over the direct parents.
90
+ // The array iterator also visits entries pushed during the loop.
91
+ // This makes the walk breadth-first.
110
92
  for (const next of frontier) {
111
93
  if (next === conceptID || visited.has(next))
112
94
  continue;
@@ -127,8 +109,9 @@ function draftInputs(draft) {
127
109
  });
128
110
  }
129
111
  /**
130
- * The identifier a derived fact carries. Built from the proposition it states, so it is stable across edits elsewhere
131
- * in the document, and readable, so a reader meeting one in a diff can tell what it says.
112
+ * Builds a readable derived-fact identifier from the fact's proposition.
113
+ *
114
+ * The identifier stays stable when unrelated parts of the document change.
132
115
  */
133
116
  function derivedFactID(draft) {
134
117
  const scope = draft.countries?.length ? `:${draft.countries.join(COUNTRY_SEPARATOR)}` : "";
@@ -136,7 +119,7 @@ function derivedFactID(draft) {
136
119
  return `${DERIVATION_ISA_INHERITANCE}:${draft.subject}:${relation}:${target}:${modality}${scope}`;
137
120
  }
138
121
  /**
139
- * The relation and target one assertion is about — the pair a descendant's own assertion speaks for.
122
+ * Returns a key for an assertion's relation and target.
140
123
  */
141
124
  function edgeKey(assertion) {
142
125
  return `${assertion.relation}${KEY_SEPARATOR}${assertion.target}`;
@@ -146,11 +129,9 @@ function draftKey(subject, assertion, countries) {
146
129
  return `${subject}${KEY_SEPARATOR}${edgeKey(assertion)}${KEY_SEPARATOR}${assertion.modality}${KEY_SEPARATOR}${scope}`;
147
130
  }
148
131
  /**
149
- * Materialize every ancestor's assertions onto their descendants.
132
+ * Copies each ancestor's assertions onto its descendants as derived facts.
150
133
  *
151
- * A concept that authors its own assertion for the same relation and target inherits nothing for that pair. The
152
- * authored record is the more specific one, which is what `isA` means, and re-stating the pair would put two modalities
153
- * for one proposition into the artifact with no rule saying which of them holds.
134
+ * A concept's own assertion for a relation and target overrides every inherited assertion for that pair.
154
135
  */
155
136
  function deriveInheritedFacts(concepts, closure, relations, issues) {
156
137
  const conceptByID = new Map(concepts.map((concept) => [String(concept.id), concept]));
@@ -163,9 +144,8 @@ function deriveInheritedFacts(concepts, closure, relations, issues) {
163
144
  const authored = new Set(concept.assertions.map(edgeKey));
164
145
  for (const ancestorID of entry.ancestors) {
165
146
  const ancestor = conceptByID.get(String(ancestorID));
166
- // Validation refuses an `isA` naming an undeclared concept, and an assertion naming an undeclared relation,
167
- // so both resolve for any document that reached the compiler. The guards keep the walk total; they do not
168
- // describe a state the artifact can hold.
147
+ // Validation guarantees that every referenced concept and relation exists.
148
+ // These guards only satisfy the type checker.
169
149
  if (!ancestor)
170
150
  continue;
171
151
  for (const assertion of ancestor.assertions) {
@@ -182,7 +162,7 @@ function deriveInheritedFacts(concepts, closure, relations, issues) {
182
162
  });
183
163
  continue;
184
164
  }
185
- const countries = assertion.countries?.length ? assertion.countries.toSorted(compareIdentifiers) : undefined;
165
+ const countries = assertion.countries?.length ? assertion.countries.toSorted(compareIdentifiers) : null;
186
166
  const key = draftKey(concept.id, assertion, countries);
187
167
  const existing = drafts.get(key);
188
168
  const draft = existing ?? { subject: concept.id, assertion, countries, inputs: new Map() };
@@ -222,14 +202,12 @@ function checkDerivedIdentifiers(facts, issues) {
222
202
  }
223
203
  }
224
204
  /**
225
- * Compile an authored geographic-model document into its runtime artifact.
205
+ * Compiles an authored geographic-model document into its runtime artifact.
226
206
  *
227
- * Throws `GeographicModelValidationError` with every violation if the input is not a valid document, and
228
- * {@link GeographicModelCompileError} with every reason if it validates but its derivations cannot be written. Nothing
229
- * partial is ever returned.
207
+ * The artifact's tables are new sorted arrays that hold the authored records unchanged.
230
208
  *
231
- * The document is read, never rewritten: the artifact's tables are new arrays holding the authored records themselves,
232
- * ordered by identifier, and the derived tables are new records built beside them.
209
+ * @throws {GeographicModelValidationError} When the input is not a valid document.
210
+ * @throws {GeographicModelCompileError} When the document is valid but its derived facts are invalid.
233
211
  */
234
212
  export function compileGeographicModel(input) {
235
213
  const document = parseGeographicModelDocument(input);
@@ -1 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
7
- * vocabulary, relation definitions, activities and affordances, rule modality, source
8
- * observations, derived facts, derivation provenance, deterministic compilation and validation,
9
- * and mappings from external vocabularies into world concepts.
6
+ * `@mailwoman/geographic-model` — the world-semantic layer: stable concepts beyond the POI
7
+ * vocabulary, relation definitions, activities, affordances, rule modality, source observations,
8
+ * derived facts, derivation provenance, deterministic compilation, plus validation.
10
9
  *
11
- * The public surface is the authored-record schema (`./schema.ts`), its deterministic validator
12
- * (`./validate.ts`), the compiler that turns a validated document into the runtime artifact
13
- * (`./compile.ts`), the artifact's shape and canonical bytes (`./artifact.ts`), and the lookups a
14
- * runtime consumer reads it through (`./lookup.ts`). All five are re-exported here and all five are
15
- * reachable as curated subpaths.
10
+ * The authoring loader (`./load.ts`, the `./load` subpath) is deliberately not re-exported here: it is
11
+ * the only module in the package that touches a filesystem and belongs to the build step rather than
12
+ * to the consumers that read an artifact.
16
13
  *
17
- * The authoring loader (`./load.ts`, the `./load` subpath) is deliberately NOT re-exported here. It
18
- * is the only module in the package that touches a filesystem, and it belongs to the build step that
19
- * produces an artifact rather than to the consumers that read one. The first authored document
20
- * arrives with #1927; this entry point carries no data.
14
+ * Four things this package must never hold, each owned elsewhere:
21
15
  *
22
- * Four things this package must never hold, each owned elsewhere and each a rule the review
23
- * applies rather than a preference:
16
+ * 1. The resolver owns ranking policy. It defines weights, boosts, penalties and candidate order.
17
+ * The resolver package also owns rank order. The neural package and `@mailwoman/core/decoder` own
18
+ * the decode objective. This package creates observations and leaves candidate order to the resolver.
19
+ * 2. A second POI vocabulary — external and curated POI categories, their containment hierarchy, the
20
+ * Overture-leaf translation, the query-phrase lexicon and the brand table belong to
21
+ * `@mailwoman/poi-taxonomy`; this package maps into those identifiers.
22
+ * 3. A second coverage register — dataset identity and coverage epistemics belong to
23
+ * `@mailwoman/core/layers`, and an expected-but-absent observation becomes negative evidence only
24
+ * where `supportsExclusion` permits it there.
25
+ * 4. Empirical affordance statistics — this package owns the stable activity and affordance identifiers.
26
+ * It does not own numeric values fitted against those identifiers.
24
27
  *
25
- * 1. **Ranking policy.** No weights, boosts, penalties, or candidate-ordering API — not as a
26
- * function, not as a type. Candidate ordering belongs to `@mailwoman/resolver`, and the decode
27
- * objective to `@mailwoman/neural` plus `@mailwoman/core/decoder`. Knowledge here creates
28
- * observations; it never overrides learned interpretation.
29
- * 2. **A second POI vocabulary.** External and curated POI categories, their containment
30
- * hierarchy, the Overture-leaf translation, the query-phrase lexicon and the brand table all
31
- * belong to `@mailwoman/poi-taxonomy`. This package maps INTO those identifiers.
32
- * 3. **A second coverage register.** Dataset identity and coverage epistemics belong to
33
- * `@mailwoman/core/layers`. An expected-but-absent observation becomes negative evidence only
34
- * where `supportsExclusion` permits it there.
35
- * 4. **Empirical affordance statistics.** #1683 fits those. This package owns the stable
36
- * activity and affordance identifiers they are fitted against, and nothing numeric about them.
37
- *
38
- * `@mailwoman/core` must not depend on this package. Core ships the pipeline contract and roughly
39
- * 9 MB of reference data to every consumer, so a world-semantics dependency there is one every
40
- * drop-in API inherits without asking for it. Reversing that direction is an explicit amendment to
41
- * the boundary record, not a convenience during implementation.
42
- *
43
- * Boundary record: `docs/superpowers/specs/2026-08-26-geographic-model-boundaries.md` (#1917).
44
- * Program parent: #1916.
28
+ * `@mailwoman/core` must not depend on this package: core ships the pipeline interface and roughly
29
+ * 9 MB of reference data to every consumer, so a world-semantics dependency there is one every
30
+ * drop-in API inherits without asking.
45
31
  */
46
32
  export * from "#artifact";
47
33
  export * from "#compile";
48
34
  export * from "#lookup";
49
35
  export * from "#schema";
50
36
  export * from "#validate";
37
+ export { type ValidationIssue, ValidationIssueCode } from "#validation/issues";
51
38
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,KAAK,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA"}
package/out/index.js CHANGED
@@ -3,49 +3,36 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `@mailwoman/geographic-model` — the world-semantic layer: stable concepts beyond the POI
7
- * vocabulary, relation definitions, activities and affordances, rule modality, source
8
- * observations, derived facts, derivation provenance, deterministic compilation and validation,
9
- * and mappings from external vocabularies into world concepts.
6
+ * `@mailwoman/geographic-model` — the world-semantic layer: stable concepts beyond the POI
7
+ * vocabulary, relation definitions, activities, affordances, rule modality, source observations,
8
+ * derived facts, derivation provenance, deterministic compilation, plus validation.
10
9
  *
11
- * The public surface is the authored-record schema (`./schema.ts`), its deterministic validator
12
- * (`./validate.ts`), the compiler that turns a validated document into the runtime artifact
13
- * (`./compile.ts`), the artifact's shape and canonical bytes (`./artifact.ts`), and the lookups a
14
- * runtime consumer reads it through (`./lookup.ts`). All five are re-exported here and all five are
15
- * reachable as curated subpaths.
10
+ * The authoring loader (`./load.ts`, the `./load` subpath) is deliberately not re-exported here: it is
11
+ * the only module in the package that touches a filesystem and belongs to the build step rather than
12
+ * to the consumers that read an artifact.
16
13
  *
17
- * The authoring loader (`./load.ts`, the `./load` subpath) is deliberately NOT re-exported here. It
18
- * is the only module in the package that touches a filesystem, and it belongs to the build step that
19
- * produces an artifact rather than to the consumers that read one. The first authored document
20
- * arrives with #1927; this entry point carries no data.
14
+ * Four things this package must never hold, each owned elsewhere:
21
15
  *
22
- * Four things this package must never hold, each owned elsewhere and each a rule the review
23
- * applies rather than a preference:
16
+ * 1. The resolver owns ranking policy. It defines weights, boosts, penalties and candidate order.
17
+ * The resolver package also owns rank order. The neural package and `@mailwoman/core/decoder` own
18
+ * the decode objective. This package creates observations and leaves candidate order to the resolver.
19
+ * 2. A second POI vocabulary — external and curated POI categories, their containment hierarchy, the
20
+ * Overture-leaf translation, the query-phrase lexicon and the brand table belong to
21
+ * `@mailwoman/poi-taxonomy`; this package maps into those identifiers.
22
+ * 3. A second coverage register — dataset identity and coverage epistemics belong to
23
+ * `@mailwoman/core/layers`, and an expected-but-absent observation becomes negative evidence only
24
+ * where `supportsExclusion` permits it there.
25
+ * 4. Empirical affordance statistics — this package owns the stable activity and affordance identifiers.
26
+ * It does not own numeric values fitted against those identifiers.
24
27
  *
25
- * 1. **Ranking policy.** No weights, boosts, penalties, or candidate-ordering API — not as a
26
- * function, not as a type. Candidate ordering belongs to `@mailwoman/resolver`, and the decode
27
- * objective to `@mailwoman/neural` plus `@mailwoman/core/decoder`. Knowledge here creates
28
- * observations; it never overrides learned interpretation.
29
- * 2. **A second POI vocabulary.** External and curated POI categories, their containment
30
- * hierarchy, the Overture-leaf translation, the query-phrase lexicon and the brand table all
31
- * belong to `@mailwoman/poi-taxonomy`. This package maps INTO those identifiers.
32
- * 3. **A second coverage register.** Dataset identity and coverage epistemics belong to
33
- * `@mailwoman/core/layers`. An expected-but-absent observation becomes negative evidence only
34
- * where `supportsExclusion` permits it there.
35
- * 4. **Empirical affordance statistics.** #1683 fits those. This package owns the stable
36
- * activity and affordance identifiers they are fitted against, and nothing numeric about them.
37
- *
38
- * `@mailwoman/core` must not depend on this package. Core ships the pipeline contract and roughly
39
- * 9 MB of reference data to every consumer, so a world-semantics dependency there is one every
40
- * drop-in API inherits without asking for it. Reversing that direction is an explicit amendment to
41
- * the boundary record, not a convenience during implementation.
42
- *
43
- * Boundary record: `docs/superpowers/specs/2026-08-26-geographic-model-boundaries.md` (#1917).
44
- * Program parent: #1916.
28
+ * `@mailwoman/core` must not depend on this package: core ships the pipeline interface and roughly
29
+ * 9 MB of reference data to every consumer, so a world-semantics dependency there is one every
30
+ * drop-in API inherits without asking.
45
31
  */
46
32
  export * from "#artifact";
47
33
  export * from "#compile";
48
34
  export * from "#lookup";
49
35
  export * from "#schema";
50
36
  export * from "#validate";
37
+ export { ValidationIssueCode } from "#validation/issues";
51
38
  //# sourceMappingURL=index.js.map
package/out/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,OAAO,EAAwB,mBAAmB,EAAE,MAAM,oBAAoB,CAAA"}