aontu 0.53.0 → 0.55.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 (197) hide show
  1. package/dist/aontu.d.ts +3 -2
  2. package/dist/aontu.js +36 -7
  3. package/dist/aontu.js.map +1 -1
  4. package/dist/cli.d.ts +2 -1
  5. package/dist/cli.js +500 -8
  6. package/dist/cli.js.map +1 -1
  7. package/dist/ctx.d.ts +5 -0
  8. package/dist/ctx.js +1 -0
  9. package/dist/ctx.js.map +1 -1
  10. package/dist/diff.js.map +1 -1
  11. package/dist/err.js +7 -1
  12. package/dist/err.js.map +1 -1
  13. package/dist/graph.d.ts +2 -5
  14. package/dist/graph.js +83 -46
  15. package/dist/graph.js.map +1 -1
  16. package/dist/hcanon.js +9 -10
  17. package/dist/hcanon.js.map +1 -1
  18. package/dist/hints.js +94 -26
  19. package/dist/hints.js.map +1 -1
  20. package/dist/jsonschema.js +34 -0
  21. package/dist/jsonschema.js.map +1 -1
  22. package/dist/lang.js +593 -191
  23. package/dist/lang.js.map +1 -1
  24. package/dist/lsp.d.ts +1 -1
  25. package/dist/lsp.js +86 -6
  26. package/dist/lsp.js.map +1 -1
  27. package/dist/mcp.js +153 -6
  28. package/dist/mcp.js.map +1 -1
  29. package/dist/mod-tool.js +42 -8
  30. package/dist/mod-tool.js.map +1 -1
  31. package/dist/mod.d.ts +4 -0
  32. package/dist/mod.js +97 -2
  33. package/dist/mod.js.map +1 -1
  34. package/dist/patch.d.ts +5 -0
  35. package/dist/patch.js +25 -25
  36. package/dist/patch.js.map +1 -1
  37. package/dist/provenance.d.ts +1 -0
  38. package/dist/provenance.js +2 -1
  39. package/dist/provenance.js.map +1 -1
  40. package/dist/query.js.map +1 -1
  41. package/dist/reach.d.ts +1 -0
  42. package/dist/reach.js +49 -21
  43. package/dist/reach.js.map +1 -1
  44. package/dist/relation.d.ts +4 -0
  45. package/dist/relation.js +125 -200
  46. package/dist/relation.js.map +1 -1
  47. package/dist/sig.d.ts +25 -0
  48. package/dist/sig.js +277 -0
  49. package/dist/sig.js.map +1 -0
  50. package/dist/sigdecl.d.ts +2 -0
  51. package/dist/sigdecl.js +11 -0
  52. package/dist/sigdecl.js.map +1 -0
  53. package/dist/siggate.d.ts +4 -0
  54. package/dist/siggate.js +90 -0
  55. package/dist/siggate.js.map +1 -0
  56. package/dist/std.js +75 -16
  57. package/dist/std.js.map +1 -1
  58. package/dist/subsume.js +57 -10
  59. package/dist/subsume.js.map +1 -1
  60. package/dist/tsconfig.tsbuildinfo +1 -1
  61. package/dist/unify.d.ts +2 -2
  62. package/dist/unify.js +93 -114
  63. package/dist/unify.js.map +1 -1
  64. package/dist/utility.d.ts +1 -2
  65. package/dist/utility.js +7 -61
  66. package/dist/utility.js.map +1 -1
  67. package/dist/val/AggFuncVal.d.ts +12 -1
  68. package/dist/val/AggFuncVal.js +165 -3
  69. package/dist/val/AggFuncVal.js.map +1 -1
  70. package/dist/val/BagVal.d.ts +2 -0
  71. package/dist/val/BagVal.js +56 -8
  72. package/dist/val/BagVal.js.map +1 -1
  73. package/dist/val/ConstraintVal.js +33 -5
  74. package/dist/val/ConstraintVal.js.map +1 -1
  75. package/dist/val/ContainerKindVal.d.ts +35 -0
  76. package/dist/val/ContainerKindVal.js +99 -0
  77. package/dist/val/ContainerKindVal.js.map +1 -0
  78. package/dist/val/CopyFuncVal.js +0 -7
  79. package/dist/val/CopyFuncVal.js.map +1 -1
  80. package/dist/val/DisjunctVal.d.ts +1 -2
  81. package/dist/val/DisjunctVal.js +146 -39
  82. package/dist/val/DisjunctVal.js.map +1 -1
  83. package/dist/val/ExpectVal.js +37 -2
  84. package/dist/val/ExpectVal.js.map +1 -1
  85. package/dist/val/FuncBaseVal.d.ts +1 -0
  86. package/dist/val/FuncBaseVal.js +19 -8
  87. package/dist/val/FuncBaseVal.js.map +1 -1
  88. package/dist/val/GraphAtomVal.d.ts +39 -0
  89. package/dist/val/GraphAtomVal.js +184 -0
  90. package/dist/val/GraphAtomVal.js.map +1 -0
  91. package/dist/val/JunctionVal.js +22 -5
  92. package/dist/val/JunctionVal.js.map +1 -1
  93. package/dist/val/ListVal.js +27 -34
  94. package/dist/val/ListVal.js.map +1 -1
  95. package/dist/val/MapVal.d.ts +1 -0
  96. package/dist/val/MapVal.js +82 -35
  97. package/dist/val/MapVal.js.map +1 -1
  98. package/dist/val/PathFuncVal.d.ts +2 -2
  99. package/dist/val/PathFuncVal.js +75 -16
  100. package/dist/val/PathFuncVal.js.map +1 -1
  101. package/dist/val/PathVal.d.ts +25 -0
  102. package/dist/val/PathVal.js +150 -0
  103. package/dist/val/PathVal.js.map +1 -0
  104. package/dist/val/PlusOpVal.d.ts +2 -1
  105. package/dist/val/PlusOpVal.js +50 -35
  106. package/dist/val/PlusOpVal.js.map +1 -1
  107. package/dist/val/PrefVal.d.ts +2 -0
  108. package/dist/val/PrefVal.js +159 -32
  109. package/dist/val/PrefVal.js.map +1 -1
  110. package/dist/val/RecurseVal.d.ts +19 -0
  111. package/dist/val/RecurseVal.js +217 -0
  112. package/dist/val/RecurseVal.js.map +1 -0
  113. package/dist/val/RefVal.d.ts +2 -1
  114. package/dist/val/RefVal.js +105 -72
  115. package/dist/val/RefVal.js.map +1 -1
  116. package/dist/val/ReferFuncVal.d.ts +30 -7
  117. package/dist/val/ReferFuncVal.js +395 -94
  118. package/dist/val/ReferFuncVal.js.map +1 -1
  119. package/dist/val/ScalarKindVal.d.ts +4 -2
  120. package/dist/val/ScalarKindVal.js +12 -1
  121. package/dist/val/ScalarKindVal.js.map +1 -1
  122. package/dist/val/SuperFuncVal.d.ts +4 -2
  123. package/dist/val/SuperFuncVal.js +118 -14
  124. package/dist/val/SuperFuncVal.js.map +1 -1
  125. package/dist/val/TopVal.d.ts +1 -1
  126. package/dist/val/Val.d.ts +2 -3
  127. package/dist/val/Val.js +39 -20
  128. package/dist/val/Val.js.map +1 -1
  129. package/dist/val/arith.js +4 -1
  130. package/dist/val/arith.js.map +1 -1
  131. package/dist/vet.d.ts +1 -0
  132. package/dist/vet.js +32 -1
  133. package/dist/vet.js.map +1 -1
  134. package/dist/view.d.ts +90 -0
  135. package/dist/view.js +2168 -0
  136. package/dist/view.js.map +1 -0
  137. package/grammar/aontu.gbnf +18 -10
  138. package/grammar/aontu.lark +15 -10
  139. package/grammar/aontu.tmLanguage.json +184 -0
  140. package/package.json +10 -3
  141. package/skill/grammar-card.md +1 -2
  142. package/src/aontu.ts +37 -7
  143. package/src/cli.ts +553 -8
  144. package/src/ctx.ts +20 -0
  145. package/src/diff.ts +4 -2
  146. package/src/err.ts +8 -1
  147. package/src/graph.ts +125 -75
  148. package/src/hcanon.ts +9 -11
  149. package/src/hints.ts +112 -29
  150. package/src/jsonschema.ts +41 -0
  151. package/src/lang.ts +642 -203
  152. package/src/lsp.ts +75 -6
  153. package/src/mcp.ts +164 -6
  154. package/src/mod-tool.ts +48 -9
  155. package/src/mod.ts +110 -1
  156. package/src/patch.ts +31 -27
  157. package/src/provenance.ts +8 -1
  158. package/src/query.ts +4 -2
  159. package/src/reach.ts +52 -23
  160. package/src/relation.ts +139 -236
  161. package/src/sig.ts +345 -0
  162. package/src/sigdecl.ts +11 -0
  163. package/src/siggate.ts +144 -0
  164. package/src/std.ts +77 -16
  165. package/src/subsume.ts +59 -10
  166. package/src/unify.ts +102 -125
  167. package/src/utility.ts +7 -67
  168. package/src/val/AggFuncVal.ts +231 -4
  169. package/src/val/BagVal.ts +58 -9
  170. package/src/val/ConstraintVal.ts +34 -5
  171. package/src/val/ContainerKindVal.ts +158 -0
  172. package/src/val/CopyFuncVal.ts +0 -7
  173. package/src/val/DisjunctVal.ts +152 -40
  174. package/src/val/ExpectVal.ts +39 -4
  175. package/src/val/FuncBaseVal.ts +21 -8
  176. package/src/val/GraphAtomVal.ts +264 -0
  177. package/src/val/JunctionVal.ts +23 -6
  178. package/src/val/ListVal.ts +30 -37
  179. package/src/val/MapVal.ts +87 -39
  180. package/src/val/PathFuncVal.ts +107 -19
  181. package/src/val/PathVal.ts +221 -0
  182. package/src/val/PlusOpVal.ts +56 -37
  183. package/src/val/PrefVal.ts +186 -38
  184. package/src/val/RecurseVal.ts +285 -0
  185. package/src/val/RefVal.ts +105 -83
  186. package/src/val/ReferFuncVal.ts +445 -100
  187. package/src/val/ScalarKindVal.ts +12 -0
  188. package/src/val/SuperFuncVal.ts +137 -13
  189. package/src/val/TopVal.ts +1 -1
  190. package/src/val/Val.ts +44 -35
  191. package/src/val/arith.ts +4 -1
  192. package/src/vet.ts +41 -4
  193. package/src/view.ts +2882 -0
  194. package/dist/val/IdFuncVal.d.ts +0 -13
  195. package/dist/val/IdFuncVal.js +0 -54
  196. package/dist/val/IdFuncVal.js.map +0 -1
  197. package/src/val/IdFuncVal.ts +0 -91
package/dist/graph.js CHANGED
@@ -4,70 +4,107 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.graphOf = graphOf;
5
5
  const keyorder_1 = require("./keyorder");
6
6
  const formatPath = (path) => 0 === path.length ? '$' : '$.' + path.join('.');
7
- // The nearest map key on the path below an entity: list indices are
8
- // positions within a relation, not relations of their own. Digits-only
9
- // segments are the indices, which is exactly how the rest of the engine
10
- // spells them.
11
- const relationKey = (tail) => {
12
- for (let i = tail.length - 1; 0 <= i; i--) {
13
- if (!/^[0-9]+$/.test(tail[i])) {
14
- return tail[i];
7
+ // Digits-only segments are list indices, which is exactly how the rest
8
+ // of the engine spells them.
9
+ const isIndex = (seg) => /^[0-9]+$/.test(seg);
10
+ // The node a link starts at and the relation it hangs under, derived
11
+ // from the link's own position.
12
+ //
13
+ // A DECLARED predicate (rel()-minted) is authoritative: the link is cut
14
+ // at the key the rel() sat on, wherever that is on the way down, which
15
+ // is what makes a MAP-valued relation report the relation rather than
16
+ // the inner label. Without one the relation is INFERRED: strip the list
17
+ // indices, and the first real key above the link is it.
18
+ const cut = (at, relkey) => {
19
+ if (undefined !== relkey) {
20
+ for (let i = at.length - 1; 0 <= i; i--) {
21
+ if (at[i] === relkey) {
22
+ return { from: formatPath(at.slice(0, i)), key: relkey };
23
+ }
15
24
  }
16
25
  }
17
- return '';
26
+ let i = at.length - 1;
27
+ for (; 0 <= i && isIndex(at[i]); i--) { }
28
+ return 0 > i
29
+ ? { from: formatPath([]), key: relkey ?? '' }
30
+ : { from: formatPath(at.slice(0, i)), key: relkey ?? at[i] };
18
31
  };
19
- // The graph of an evaluated tree. Walks POSITIONS, not values: two
20
- // positions of one entity share a value object after the merge, so a
21
- // walk guarded by object identity would find the entity once and miss
22
- // every other place it is declared. The guard is therefore the
23
- // ancestor chain — which is what a cycle actually is.
32
+ // The graph of an evaluated tree. Walks POSITIONS, not values: a
33
+ // reference or a spread can put one value object at several positions,
34
+ // and a walk guarded by object identity would find the first and miss
35
+ // every other place it is reached. The guard is therefore the ancestor
36
+ // chain — which is what a cycle actually is.
24
37
  function graphOf(root) {
25
- const byId = new Map();
26
38
  const edges = [];
27
- const visit = (node, path, entity, tail, ancestors) => {
39
+ const disjunct = [];
40
+ // ONE WALK, with `undecided` saying which side of ADR-007 it is on:
41
+ // below an unresolved disjunction every link is a position the
42
+ // document has not decided, and nothing there is an edge.
43
+ const visit = (node, path, ancestors, hidden, undecided) => {
28
44
  if (null == node || true !== node.isVal || ancestors.has(node)) {
29
45
  return;
30
46
  }
31
- let inside = entity;
32
- let below = tail;
33
- const name = node.entity;
34
- if (null != name) {
35
- let paths = byId.get(name);
36
- if (undefined === paths) {
37
- paths = [];
38
- byId.set(name, paths);
39
- }
40
- paths.push(formatPath(path));
41
- // A nested entity is not a component of the one above it: the
42
- // key path restarts at the identified node.
43
- inside = name;
44
- below = [];
45
- }
47
+ hidden = hidden || true === node.mark?.hide;
46
48
  const link = node.link;
47
49
  if (null != link) {
48
- edges.push({
49
- from: inside,
50
- key: relationKey(below),
51
- to: link,
52
- at: formatPath(path),
53
- });
50
+ if (undecided) {
51
+ disjunct.push(formatPath(path));
52
+ }
53
+ else {
54
+ const { from, key } = cut(path, node.relkey);
55
+ const edge = { from, key, to: link, at: formatPath(path) };
56
+ if (hidden) {
57
+ edge.hidden = true;
58
+ }
59
+ edges.push(edge);
60
+ }
61
+ }
62
+ // A graph atom is TRANSPARENT here (RELATIONS P2): it carries the
63
+ // field's value at the field's own position, and the graph is about
64
+ // the value.
65
+ if (true === node.isGraphAtom && undefined !== node.held) {
66
+ visit(node.held, path, ancestors, hidden, undecided);
67
+ }
68
+ // An unresolved conjunction (a link waiting on a peer that never
69
+ // came, a constraint still open) holds its terms at the SAME
70
+ // position; every link among them is written there, and is an
71
+ // edge. This is what a match-selected branch or a deferred refer()
72
+ // looks like after evaluation.
73
+ if (true === node.isConjunct && Array.isArray(node.peg)) {
74
+ ancestors.add(node);
75
+ for (const term of node.peg) {
76
+ visit(term, path, ancestors, hidden, undecided);
77
+ }
78
+ ancestors.delete(node);
79
+ }
80
+ // AN UNRESOLVED DISJUNCTION IS NOT A VALUE (ADR-007), so a link
81
+ // under one of its arms is not an edge. Its POSITION is collected
82
+ // instead, so a figure can report what the document leaves
83
+ // undecided rather than drawing it or dropping it in silence.
84
+ if (true === node.isDisjunct && Array.isArray(node.peg)) {
85
+ ancestors.add(node);
86
+ for (const arm of node.peg) {
87
+ visit(arm, path, ancestors, hidden, true);
88
+ }
89
+ ancestors.delete(node);
54
90
  }
55
91
  if ((true === node.isMap || true === node.isList) && null != node.peg) {
56
92
  ancestors.add(node);
57
93
  for (const k of Object.keys(node.peg)) {
58
- visit(node.peg[k], [...path, k], inside, [...below, k], ancestors);
94
+ visit(node.peg[k], [...path, k], ancestors, hidden, undecided);
59
95
  }
60
96
  ancestors.delete(node);
61
97
  }
62
98
  };
63
- visit(root, [], '', [], new Set());
64
- // DETERMINISTIC by construction, not by luck: ids in code-point
65
- // order, each id's paths in code-point order, edges by the position
66
- // they are written at (which is unique — one link, one place).
67
- const entities = [...byId.keys()]
68
- .sort(keyorder_1.cmpCodePoint)
69
- .map((id) => ({ id, paths: byId.get(id).sort(keyorder_1.cmpCodePoint) }));
99
+ visit(root, [], new Set(), false, false);
100
+ // DETERMINISTIC by construction, not by luck: edges by the position
101
+ // they are written at, which is unique — one link, one place. That
102
+ // holds through a conjunction too: its terms share the position, and
103
+ // two links there would have had to unify into one.
70
104
  edges.sort((a, b) => (0, keyorder_1.cmpCodePoint)(a.at, b.at));
71
- return { entities, edges };
105
+ if (0 < disjunct.length) {
106
+ return { edges, disjunct: [...new Set(disjunct)].sort(keyorder_1.cmpCodePoint) };
107
+ }
108
+ return { edges };
72
109
  }
73
110
  //# sourceMappingURL=graph.js.map
package/dist/graph.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"graph.js","sourceRoot":"","sources":["../src/graph.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;AAiBpD,yCAAyC;AAmCzC,MAAM,UAAU,GAAG,CAAC,IAAc,EAAU,EAAE,CAC5C,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAGjD,oEAAoE;AACpE,uEAAuE;AACvE,wEAAwE;AACxE,eAAe;AACf,MAAM,WAAW,GAAG,CAAC,IAAc,EAAU,EAAE;IAC7C,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC1C,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAC,CAAC,CAAC,CAAA;QAChB,CAAC;IACH,CAAC;IACD,OAAO,EAAE,CAAA;AACX,CAAC,CAAA;AAGD,mEAAmE;AACnE,qEAAqE;AACrE,sEAAsE;AACtE,+DAA+D;AAC/D,sDAAsD;AACtD,iBAAwB,IAAS;IAC/B,MAAM,IAAI,GAAG,IAAI,GAAG,EAAoB,CAAA;IACxC,MAAM,KAAK,GAAW,EAAE,CA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AK,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;gBACtC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,CAAA;YAChE,CAAC;YACD,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QACxB,CAAC;IACH,CAAC,CAAA;IAED,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;IAExC,oEAAoE;IACpE,mEAAmE;IACnE,qEAAqE;IACrE,oDAAoD;IACpD,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAA,uBAAY,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAE9C,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;QACxB,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,uBAAY,CAAC,EAAE,CAAA;IACvE,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,CAAA;AAClB,CAAC"}
package/dist/hcanon.js CHANGED
@@ -56,7 +56,15 @@ function render(v, inh) {
56
56
  };
57
57
  let s;
58
58
  if (true === v.isMap) {
59
- const keys = Object.keys(v.peg).sort(keyorder_1.cmpCodePoint);
59
+ // Alias declarations are dropped here for the same reason
60
+ // MapVal.canon drops them, and this is the surface where it counts:
61
+ // `aon1-` pins MEANING, so a document written with aliases and the
62
+ // same document written longhand must hash to one string. Two
63
+ // renderers, one rule -- hcanon is not canon and does not inherit
64
+ // the filter (docs/design/ALIASES.0.md §4).
65
+ const keys = Object.keys(v.peg)
66
+ .filter((k) => !v.aliasKeys.includes(k))
67
+ .sort(keyorder_1.cmpCodePoint);
60
68
  s = '{' +
61
69
  (v.spread.cj ? '&:' + render(v.spread.cj, inner) +
62
70
  (0 < keys.length ? ',' : '') : '') +
@@ -89,15 +97,6 @@ function render(v, inh) {
89
97
  else {
90
98
  s = v.canon;
91
99
  }
92
- // The IDENTITY is innermost, exactly as canon writes it (G4 phase
93
- // 1). It is IN the hash — a node declared `id(svc/auth)` and the
94
- // same node declared `id(svc/billing)` describe different systems,
95
- // and a pin that could not tell them apart would be a pin on the
96
- // shape rather than on the meaning.
97
- const e = v.entity;
98
- if (null != e) {
99
- s = 'id(' + JSON.stringify(e) + ')&' + s;
100
- }
101
100
  if (mtype && !inh.type) {
102
101
  s = 'type(' + s + ')';
103
102
  }
@@ -1 +1 @@
1
- {"version":3,"file":"hcanon.js","sourceRoot":"","sources":["../src/hcanon.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;;AAEpD,yEAAyE;AACzE,kEAAkE;AAClE,wEAAwE;AACxE,gBAAgB;AAChB,EAAE;AACF,uEAAuE;AACvE,gCAAgC;AAChC,qEAAqE;AACrE,mCAAmC;AACnC,EAAE;AACF,mEAAmE;AACnE,8CAA8C;AAC9C,wEAAwE;AACxE,uEAAuE;AACvE,sBAAsB;AACtB,EAAE;AACF,wEAAwE;AACxE,sEAAsE;AACtE,iEAAiE;AACjE,qEAAqE;AACrE,mEAAmE;AACnE,eAAe;AACf,EAAE;AACF,iDAAiD;AACjD,yDAAyD;AACzD,kEAAkE;AAClE,sEAAsE;AACtE,gEAAgE;AAChE,qEAAqE;AACrE,wEAAwE;AACxE,sEAAsE;AACtE,yDAAyD;AAEzD,6CAAwC;AAIxC,yCAAyC;AASzC,iEAAiE;AACjE,wEAAwE;AACxE,iEAAiE;AACjE,uEAAuE;AACvE,kEAAkE;AAClE,sEAAsE;AACtE,qEAAqE;AACrE,SAAS,MAAM,CAAC,CAAM,EAAE,GAAW;IACjC,IAAI,IAAI,KAAK,CA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MAAM,CAAC,WAAW,CAAC,CAAA;AACtE,CAAC"}
package/dist/hints.js CHANGED
@@ -42,6 +42,15 @@ const hints = {
42
42
  unknown_function: 'This function name is not recognized.',
43
43
  literal_nil: 'A literal nil cannot unify with any other value.',
44
44
  unify_cycle: 'Circular reference detected during unification.',
45
+ pref_implicit_bag: 'A preference marks a VALUE, and a bare key is not one. Without\n' +
46
+ 'braces the `*` took the whole implicit map as its operand, so the\n' +
47
+ 'document became a preferred map rather than a map with a preferred\n' +
48
+ 'entry. Brace the bag, or move the `*` onto the value it marks.' +
49
+ '\n \nExamples:\n' +
50
+ ' *a: 1 -> nil # No braces: the `*` takes the whole map;\n' +
51
+ ' a: *1 -> *1 # ... the `*` belongs on the value;\n' +
52
+ ' *{a: 1} -> *{"a":1} # ... or brace the bag to prefer it whole;\n' +
53
+ ' *{x:1}|*{y:2} -> *{"x":1}|*{"y":2} # which is what disjunction needs.',
45
54
  constraint: 'This value does not satisfy the constraint. A constraint is the\n' +
46
55
  'meet of bound atoms (min, max, above, below) and exclusions (neq)\n' +
47
56
  'over one domain; the expected form shown is the normalised\n' +
@@ -115,20 +124,41 @@ const hints = {
115
124
  'parse_bad_src': 'Invalid source provided for parsing. The source must be a non-empty string.',
116
125
  merge_conflict: 'A version-control conflict marker was found in the source. The\nfile still holds an unresolved merge: resolve it and remove the\n`<<<<<<<`, `=======` and `>>>>>>>` lines before unifying.\n \nExamples:\n <<<<<<< HEAD -> nil # A conflict marker, not a `<` operation;\n ======= -> nil # ... nor a chain of `=` characters;\n >>>>>>> other -> nil # ... nor a `>` operation.',
117
126
  include_denied: 'An @"..." include was refused by the active trust profile\n(docs/trust.md). The document asked to read a source the evaluation\'s\ninclude capability does not allow: widen the capability if the read is\nintended, or remove the include if it is not.\n \nExamples:\n a:@"in-root.aon" -> {..} # Inside the confinement root: allowed;\n a:@"../secret.aon" -> nil # ... but escaping the root is denied;\n a:@"/etc/hostname" -> nil # ... and so is an absolute path outside it.',
127
+ include_extension: 'An @\"...\" include named a file the engine does not read. THE\nEXTENSION DECIDES which of two things a file is: `.aon` and\n`.aontu` are Aontu source, with the whole language in them, and\n`.json`, `.jsonld`, `.jsonc`, `.json5`, `.jsonic`, `.jsc`, `.toml`,\n`.yaml`, `.yml` and `.ini` are configuration DATA, read by that\nformat\'s own parser. Anything else -- and a name with no extension\n-- is refused rather than guessed at: a guess produces a document\nthat looks right and is not.\n \nExamples:\n a:@\"model.aon\" -> {..} # Aontu source;\n a:@\"server.toml\" -> {..} # ... config data, read as TOML;\n a:@\"notes.txt\" -> nil # ... but text is not a document;\n a:@\"data\" -> nil # ... and neither is an unnamed kind.',
118
128
  func_arity: 'This function was called with the wrong number of arguments:\n{func} takes {want}, but was given {got}.\n \nExamples:\n upper(\"a\") -> \"A\" # One argument, which is what upper takes;\n upper(\"a\",\"b\") -> nil # ... so two is a mistake in the source;\n key() -> \"\" # key takes none, or one level count;\n neq(1,2,3) -> neq # ... and neq takes one or more exclusions.',
129
+ func_arg: 'This argument does not fit the function\'s signature:\n \n {sig}\n argument {argn} (`{arg}`) was `{got}`.\n \nThe signature is the declared call surface (one line per builtin,\ntest/spec/signature.tsv); an argument slot admits a concrete value\nof its declared kind, `number` admitting every numeric leaf and\n`string` admitting a path.\n \nExamples:\n upper("a") -> "A" # A string fits upper(s: string|number);\n upper(1) -> 1 # ... and so does a number;\n upper(true) -> nil # ... but a boolean fits neither word;\n add([1],2) -> nil # ... and a list is no operand.',
119
130
  elided_value: 'A key or element was written with no value after the colon. An\nelided value is a mistake in the source rather than a null: write\n`null` if that is what was meant, or supply the value.\n \nExamples:\n a:null -> null # An explicit null, which is a value;\n a: -> nil # ... but nothing at all is not;\n a: b:1 -> {..} # A colon chain is not an elision;\n [1,] -> [1] # ... nor is a trailing comma.',
120
- id_name: 'The argument to id() is not an entity name. A name is one or\nmore letters, digits, `_`, `-` or `/`, and NO dots: a dot separates\nan entity name from a path inside that entity, so a dotted name\nwould be ambiguous. A `-` must be quoted, because it is not a\nbare-text character.\n \nExamples:\n id(svc/auth) -> id # Letters, digits and `/` may be bare;\n id("team-pay") -> id # ... a `-` name must be quoted;\n id(svc.auth) -> nil # ... a dot is a path separator, not a name;\n id(1) -> nil # ... and a number is not a name at all.',
121
- id_conflict: 'One value was declared to be two different entities. An id() says\nwhat a value IS, so two names on one node is a contradiction, not a\nmerge — the same kind of failure as unifying 1 with 2. Give the node\none name, or give the two names to two nodes.\n \nExamples:\n id(a) & id(a) & {} -> {..} # One entity, said twice;\n id(a) & {x:1} -> {..} # ... an entity with content;\n id(a) & id(b) & {} -> nil # ... but a node cannot be both.',
122
- id_spread: 'A spread template stamps one id() onto every child. `&: id(x) & …`\nsays that EVERY child of the bag is the entity `x`, and identity\nmerging would then unify all of them into one. Use a\npath-dependent name — `id(key())` — to give each child its own,\nor move the id() to the one child that has it.\n \nExamples:\n {&: id(key()), a:{}, b:{}} -> {..} # A name per child;\n {a: id(x) & {}} -> {..} # ... or one named child;\n {&: id(x), a:{}, b:{}} -> nil # ... but not one name for all.',
123
- refer_address: 'A refer() was given something that is not an entity address. An\naddress is an entity name, optionally followed by a dot-separated path\ninside that entity — and only a STRING can be one.\n \nExamples:\n refer() & "svc/auth" -> "svc/auth" # An entity;\n refer() & "svc/auth.port" -> ... # ... and a node inside it;\n refer() & "svc/auth." -> nil # ... but not a trailing dot;\n refer() & 1 -> nil # ... and not a number.',
124
- refer_unresolved: 'A refer() address names no entity in this evaluation. Within one\nevaluation the document-set is fixed, so a link to nothing is an\nerror rather than something to resolve later: check the spelling, or\nadd the id() that was meant to declare it.\n \nExamples:\n a:id(svc/x)&{} b:refer()&"svc/x" -> "svc/x" # Declared, so it resolves;\n a:id(svc/x)&{p:1} b:refer()&"svc/x.p" -> "svc/x.p" # ... and so does a node inside it;\n b:refer()&"svc/nope" -> nil # ... but nothing declares this.',
131
+ recursion_unexpanded: 'A schema refers to itself here, and no data reached this position\nto expand it against. Guard the recursion -- an optional key\n(next?:) drops when nothing arrives, and a preferred alternative\n(*null | $.Node) generates -- or supply the data.\n \nExamples:\n Node: {v: integer, next?: $.Node}\n t: $.Node & {v: 1} -> {..} # next? drops;\n Node: {v: integer, next: $.Node}\n t: $.Node & {v: 1} -> nil # ... required refuses.',
132
+ recursion_budget: 'A recursive schema expanded past the evaluation depth budget\nwithout meeting concrete data. Expansion is driven by the data --\nfinite data always terminates -- so a chain this deep means two\ndefinitions feeding each other, or data deeper than the budget\n(docs/trust.md raises it deliberately).',
133
+ list_length: 'A literal list alternative in a disjunction admits only a list of\nits own length -- a spread (&:) makes it variadic. Outside a\ndisjunction two statements of one list still merge elementwise.\n \nExamples:\n x: [] | [&: integer]\n x: [1, 2] -> [1,2] # The variadic arm;\n x: [] -> [] # ... or exactly empty;\n y: [a] | [b]\n y: [a, extra] -> nil # ... a literal arm is its length.',
134
+ relation_cycle: 'This relation declared acyclic(), and its edges form a cycle. The\nverdict lands at generation, where every edge is known; the error\npoints at an edge on the cycle and names the nodes it runs\nthrough, closing back on the first.\n \nExamples:\n dependsOn: rel() & acyclic()\n a: {dependsOn: ["$.b"]}\n b: {dependsOn: ["$.a"]} -> nil # $.a -> $.b -> $.a;\n b: {dependsOn: []} -> {..} # ... one edge fewer passes.',
135
+ relation_inverse_missing: 'This relation declared inverse(name), and an edge has no mirroring\nedge under that name: A relates to B, and B does not name A back.\nThe declaration asks for the mirror to be WRITTEN, and never writes\nit for the author -- generation is refused until the document says\nboth directions.\n \nExamples:\n a: {dependsOn: rel() & inverse(dependedOnBy) & [b]}\n b: {dependedOnBy: rel() & [a]} -> {..} # Mirrored;\n b: {dependedOnBy: rel() & []} -> nil # ... and this is not.',
136
+ inverse_name: 'The argument to inverse() is not a relation name. The mirroring\npredicate is a D-1 name -- a letter or `_`, then letters, digits,\n`_` or `-` -- spelled bare or quoted.\n \nExamples:\n inverse(dependedOnBy) -> inverse # A name;\n inverse("dep-on") -> inverse # ... quoted when hyphenated;\n inverse(1) -> nil # ... a number is not a name.',
137
+ rel_address: 'A rel() field holds tree addresses: one path value, a list of path\nvalues, or a map whose leaves are path values. A bare string is never\nan address — `path("...")` is the one conversion — and this value can\nnever be one.\n \nExamples:\n dependsOn: rel() & [path($.ledger)] -> {..} # A list of addresses;\n hostedOn: rel() & path($.bastion) -> {..} # ... or one;\n dependsOn: rel() & ["$.ledger"] -> nil # ... a string is not a path;\n dependsOn: rel() & [7] -> nil # ... and neither is 7.',
138
+ refer_address: 'A refer() was given something that is not a tree address. An address\nis a PATH VALUE — `path($.a.b)` from the document root, `path(.b)`\nfrom the link\'s own sibling scope — and only a path value can be one:\na bare string never is, and `path("...")` is the one conversion.\n \nExamples:\n refer() & path($.services.auth) -> ... # From the root;\n refer() & path(.auth) -> ... # ... or beside the link;\n refer() & "$.services.auth" -> nil # ... a string is not a path;\n refer() & 1 -> nil # ... and neither is a number.',
139
+ path_address: 'This is not a tree address, so it cannot be a path value. An address\nis `$.a.b` from the document root, or `.b` from the sibling scope with\none more leading dot per parent step -- the grammar path() captures.\nString text with no anchor converts as RELATIVE, and a string\nconverts ONLY through the call\'s own argument.\n \nExamples:\n d: path("$.services.auth") -> path($.services.auth) # A converted string;\n d: path("auth") -> path(.auth) # ... anchorless text is relative;\n d: path("a..b") -> nil # ... but this spells nothing;\n d: path("$") -> nil # ... and the root is not addressable.',
140
+ rel_unresolved: 'The address names no node in this evaluation. Every position in the\ndocument is addressable; nothing outside it is.\n \nExamples:\n p: {}\n q: rel() & "$.p" -> {..} # $.p is a node;\n q: rel() & "$.nosuch" -> nil # ... $.nosuch is not.',
141
+ refer_unresolved: 'A refer() address names no node in this evaluation. Within one\nevaluation the document-set is fixed, so a link to nothing is an error\nrather than something to resolve later: check the spelling, or add the\nnode it was meant to reach. A relative address that climbs off the top\nof the tree lands here too.\n \nExamples:\n a:{p:1} b:refer()&"$.a" -> "$.a" # $.a is a node;\n a:{p:1} b:refer()&"$.a.p" -> "$.a.p" # ... and so is a node inside it;\n b:refer()&"$.nope" -> nil # ... but nothing is here.',
142
+ view_relation_unknown: 'The relation named to the view has no edges in this document, so\nthe figure would be empty -- and an empty figure and a misspelled name are\nthe same file on disk. Check the spelling against the relations the\nnote lists, or drop the relation to draw every relation at once.',
143
+ view_kind_unknown: 'The figure kind is not one the verb draws. The kinds are tree, matrix,\ngraph, layer, sets, layers, ladder and poset; the note lists them.',
144
+ view_profile_unknown: 'The figure kind does not render into the profile asked for: there is no\ntext form of a node-link drawing and no Mermaid form of a matrix. The\nnote lists the profiles the kind declares; the first is its default.',
145
+ view_style_profile: 'Each profile has ONE way to carry the meaning of a figure\'s marks:\nSGR escapes for text, CSS classes for svg. Asking for the other one is\na usage error rather than a silent no-op. `none` works everywhere.',
146
+ view_style_unknown: 'The styles are none, ansi and css, plus `auto` at the command line,\nwhich the command resolves before the library runs: whether the\ndestination is a terminal is not something a library can see.',
147
+ view_rows_exceeded: 'The figure has more rows than --max-rows allows. This is a REFUSAL,\nnot a truncation: a view that quietly omits things is the failure the\nverb exists to avoid. Narrow the figure with --at or --relation, or\nraise the limit.',
148
+ view_line_break: 'A label the figure would draw holds a line terminator (U+000A, U+000D,\nU+2028 or U+2029), and a figure line cannot carry one. Label the node\nwith another field, or drop --label / --group-by.',
149
+ view_relation_ambiguous: 'The document has edges under several relations and the matrix (or the\nlayer diagram) draws exactly one. Name it with --relation; the note\nlists the relations with edges.',
150
+ view_sets_shape: 'The set panel reads generated values: --sets must name a map whose\nvalues each hold the --member field as a list of strings, and\n--universe a map or a list of strings. The path in the finding is the\nvalue that has another shape.',
151
+ view_sets_required: 'The set panel needs both --sets (the map whose keys are the sets) and\n--member (the field holding each set\'s members).',
152
+ view_at_required: 'The meet ladder draws the contributions at ONE path, and none was\nnamed. Pass --at with the path, as `aontu why` takes it.',
153
+ view_group_required: 'The layer diagram puts each node in the band its --group-by field\nnames, and no field was named. Pass --group-by with the field that\nholds each node\'s layer.',
154
+ view_document_shape: 'A view document declares each figure as a map of view options --\nthe flag names without the dashes -- and every declaration must name\nits `kind` and the `out` file it draws into. This one names an option\nthat is not one, gives a value of the wrong shape, or leaves out what\nevery declaration needs. `aontu view --help` lists the options.',
125
155
  pack_data: 'The first argument to pack() is not a bag. `pack` makes one child\nper child of its DATA, so the data has to have children: a list of\nnames, or a map whose keys are the names.\n \nExamples:\n pack([a,b], {x:1}) -> {..} # A list of names;\n pack({a:1,b:2}, {x:1}) -> {..} # ... or a map, keyed by its keys;\n pack(1, {x:1}) -> nil # ... but a scalar has no children.',
126
156
  pack_key: 'A list packed by pack() holds something that is not a string. The\nelements of a packed list ARE the generated keys, and only a string\nis a key — an element keyed by its position would churn every\ngenerated child the moment the list was reordered.\n \nExamples:\n pack([a,b], {x:1}) -> {..} # Names;\n pack(["a b"], {x:1}) -> {..} # ... a quoted name is still a name;\n pack([1,2], {x:1}) -> nil # ... but a number is not one.',
127
157
  each_data: 'The first argument to each() is not a bag. `each` makes one list\nelement per child of its DATA, so the data has to have children: a\nlist, or a map whose values become the elements in sorted-key order.\n \nExamples:\n each([1,2]) -> [..] # A list, in source order;\n each({b:2,a:1}) -> [..] # ... a map, in sorted-key order;\n each(1) -> nil # ... but a scalar has no children.',
128
158
  filter_data: 'The first argument to filter() is not a bag. `filter` keeps the\nchildren of its DATA that already satisfy a condition, so the data\nhas to have children: a list, or a map.\n \nExamples:\n filter([1,x], integer) -> [..] # A list;\n filter({a:1,b:x}, integer) -> {..} # ... or a map, keys kept;\n filter(1, integer) -> nil # ... but a scalar has none.',
129
159
  match_none: 'No pattern matched, and there is no default. `match` tries each\npattern in the order written and takes the first the value unifies\nwith; the value {value} unified with none of {tried}. Add a trailing\ndefault — the argument after the last pair — if the rest was meant\nto be allowed.\n \nExamples:\n match(1, integer, ok) -> "ok" # The first pattern matches;\n match(x, integer, ok, other) -> "other" # ... or the default does;\n match(x, integer, ok) -> nil # ... but nothing here does.',
130
160
  place_pair: 'Two placeholders met, and neither has a value to fill the other.\n`_` is a HOLE: it is filled by whatever the call is unified with, so\na call holding one needs a peer that does not. Give one side a\nvalue.\n \nExamples:\n upper(_) & hello -> "HELLO" # The peer fills the hole;\n _ + 2 & 1 -> 3 # ... whatever the call is;\n upper(_) & lower(_) -> nil # ... but two holes fill nothing.',
131
- pipe_target: 'The right-hand side of a `|>` is not a function. A pipe puts the\nvalue on its left in as the FIRST argument of the call on its\nright, so the right side has to be one: a call, or the bare name of\na built-in.\n \nExamples:\n hello |> upper -> "HELLO" # A bare name is the call;\n $.names |> pack({}) -> {..} # ... or a call with more arguments;\n 1 |> 2 -> nil # ... but a value is not a function.',
161
+ module_path: 'A module import is domain-shaped and carries a major, but its\npath cannot be a directory on every platform the toolchain runs on --\nso it is refused before anything is built from it. An element may not\nbe empty, may not begin or end with `.` (which is what forbids `..`),\nand may not be a reserved device name. These are Go\'s module-path\nrules, for Go\'s reason: a module path becomes a real directory.\n \nExamples:\n @"corp.example/s@1" -> {..} # An ordinary path is fine;\n @"corp.example/../s@1" -> nil # ... `..` would escape the store;\n @"corp.example/nul@1" -> nil # ... and Windows has no such file.',
132
162
  module_missing: 'A module import names a module that is not in this project. A\nmodule is resolved from LOCAL stores only -- `aon_vendor/` beside the\nproject\'s mod.aon, then the user cache -- because evaluation never\ntouches the network. Fetching is a separate step, and the message\nnames it.\n \nExamples:\n @"corp.example/s@1" -> nil # Not fetched: run aontu mod get;\n @"./local.aon" -> {..} # ... a local path is not a module;\n @"corp.example/s@1#aon1-…" -> {..} # ... and a pin does not fetch it either.',
133
163
  module_integrity: 'A module resolved locally does not have the MEANING it was pinned\nto. The pin is a canon-hash -- the hash of the module unified\nstandalone -- so it survives comments, formatting and refactoring and\nbreaks on any semantic change in the module\'s transitive closure.\nVerification is always local: the registry\'s annotation is advisory.\n \nExamples:\n @"corp.example/s@1" -> {..} # No pin, no check;\n @"corp.example/s@1#aon1-x" -> nil # ... a pin that disagrees refuses;\n aontu hash <file> # ... and this is what it should be.',
134
164
  module_depth: 'Module verification nested too deep. A pinned module is checked by\nEVALUATING it, and that evaluation resolves the module\'s own imports\n-- so a vendor tree that leads back to itself would recurse until the\nhost ran out of stack. The bound makes that a stated refusal rather\nthan a crash whose verdict depends on the machine.\n \nExamples:\n @"corp.example/s@1" -> {..} # Ordinary nesting is far below it;\n aontu mod vendor # ... rebuild a vendor tree that loops;\n aontu hash <file> # ... and check what it hashes to.',
@@ -181,6 +211,20 @@ const hints = {
181
211
  ' pick([{a:1},{a:2}], a) -> [1,2] # Every child has it;\n' +
182
212
  ' pick([{a:1},{b:2}], a) -> nil # ... the second does not;\n' +
183
213
  ' pick([[9],[8]], 0) -> [9,8] # A list child takes an index.',
214
+ join_member: 'A member of this bag is not text and never will be: `{member}`.\n' +
215
+ '`join` folds with `+` seeded with the empty string, and `+` with a\n' +
216
+ 'string on the left RESIDUATES on a map, a list or a null rather\n' +
217
+ 'than refusing — so folding blindly would report the failure at\n' +
218
+ 'generation, naming the whole call instead of the member. It is\n' +
219
+ 'refused here, where the member can still be named. A member that\n' +
220
+ 'is merely UNRESOLVED is a different thing: the call stays\n' +
221
+ 'residual and generation reports it as ordinary incompleteness.' +
222
+ '\n \nExamples:\n' +
223
+ ' join([1,2], "-") -> "1-2" # Numbers render as digits;\n' +
224
+ ' join([true], ",") -> "true" # ... so do booleans;\n' +
225
+ ' join([{a:1}], ",") -> nil # A map is not text;\n' +
226
+ ' join([null], ",") -> nil # ... and neither is null;\n' +
227
+ ' join(pick($.r, n), ",") -> "a,b" # Project first.',
184
228
  aggregate_data: 'This aggregate needs a BAG to fold: a list or a map. `sum`,\n' +
185
229
  '`least` and `greatest` walk the children of the value they are\n' +
186
230
  'given, so a scalar, a kind or an unresolved reference is not\n' +
@@ -275,8 +319,13 @@ const hints = {
275
319
  'closed': 'Cannot add to closed structure. The map or list is closed and does not accept new keys/elements.',
276
320
  'required_listelem': 'Required list element is missing. A non-optional list element has no value.',
277
321
  // Junction errors (disjunction/conjection)
278
- '|:empty': 'Empty disjunction. The disjunction has no valid alternatives.',
279
- '|:empty-dist': 'Empty disjunction distribution. All alternatives in the disjunction are invalid.',
322
+ 'empty': 'Empty disjunction. The disjunction has no valid alternatives.',
323
+ 'empty-dist': 'Empty disjunction distribution. All alternatives in the disjunction are invalid.',
324
+ // ADR-011 R2: two DEFAULTS of equal rank that cannot agree. The
325
+ // fix is a rank, so the hint names it.
326
+ 'pref_rank_clash': 'Two defaults of the same rank disagree.' +
327
+ ' Rank one of them (`**x`) to say which is the weaker layer,' +
328
+ ' or give them the same value.',
280
329
  'max_depth': 'Input nesting is too deep to process safely.',
281
330
  // Function errors (dynamic patterns)
282
331
  'func': 'Function operation failed. See the specific function name for details.',
@@ -312,6 +361,7 @@ const codeClasses = {
312
361
  parse_bad_src: 'parse',
313
362
  merge_conflict: 'parse',
314
363
  include_denied: 'parse',
364
+ include_extension: 'parse',
315
365
  // G3 -- the subsumption query's report vocabulary (class compat):
316
366
  // the compat_* codes are its findings, the sub_* codes its undecided
317
367
  // reasons. Report-layer codes: no NilVal ever carries one, so they
@@ -334,22 +384,34 @@ const codeClasses = {
334
384
  patch_not_editable: 'reference',
335
385
  patch_ambiguous: 'reference',
336
386
  patch_span_mismatch: 'internal',
337
- // G4 phase 1 -- the identity mark: a name that is not one, and two
338
- // different names on one node. `id_name` is a parse-class refusal
339
- // of the argument; `id_conflict` is a conflict like any other
340
- // failed meet, because that is exactly what it is.
341
- id_name: 'parse',
342
- id_conflict: 'conflict',
343
- // Clearing rule 3: a constant `id()` inside an `&:` template. Class
344
- // `parse`, because what is wrong is the TEXT of the template rather
345
- // than any pair of values it brought together.
346
- id_spread: 'parse',
347
- // G4 phase 2 -- the checked link: a string that is not an entity
387
+ // G4 phase 2 -- the checked link: a string that is not a tree
348
388
  // address (class `parse`, the text is wrong), and an address that
349
389
  // names nothing in this evaluation (class `reference`, the same
350
390
  // class as `no_path`, because it is the same kind of miss).
351
391
  refer_address: 'parse',
392
+ rel_address: 'parse',
352
393
  refer_unresolved: 'reference',
394
+ rel_unresolved: 'reference',
395
+ // The tree view (docs/design/VIEWS.0.md): a relation that draws
396
+ // nothing is refused rather than drawn empty. Class `reference`: a
397
+ // name that does not resolve.
398
+ view_relation_unknown: 'reference',
399
+ view_kind_unknown: 'reference',
400
+ view_profile_unknown: 'reference',
401
+ view_style_profile: 'reference',
402
+ view_style_unknown: 'reference',
403
+ view_rows_exceeded: 'budget',
404
+ view_line_break: 'parse',
405
+ view_relation_ambiguous: 'reference',
406
+ view_sets_shape: 'reference',
407
+ view_sets_required: 'reference',
408
+ view_at_required: 'reference',
409
+ view_group_required: 'reference',
410
+ view_document_shape: 'reference',
411
+ // First-class paths (docs/design/PATHS.0.md): text that is not a
412
+ // tree address, met by path()'s capture or promotion. The same
413
+ // class as refer_address, because it is the same mistake.
414
+ path_address: 'parse',
353
415
  // G8 phase 1 -- the generation combinators. All three are class
354
416
  // `parse`: what is wrong is the CALL as written (data that is not a
355
417
  // bag, a list element that is not a name), not any pair of values a
@@ -368,14 +430,11 @@ const codeClasses = {
368
430
  // and neither could answer for the other, which is what every
369
431
  // conflict is.
370
432
  place_pair: 'conflict',
371
- // G8 phase 4 -- the pipe. Class `parse`: a pipe is sugar resolved
372
- // while reading the source, so a pipe into something that is not a
373
- // call is wrong in the TEXT and no later pass can repair it.
374
- pipe_target: 'parse',
375
433
  // G6 phase 2 -- modules. Both are class `parse`: a module import is
376
434
  // resolved while the source is READ, and neither a module that is
377
435
  // absent nor one whose meaning disagrees with its pin can be
378
436
  // repaired by any later pass.
437
+ module_path: 'parse',
379
438
  module_missing: 'parse',
380
439
  module_integrity: 'parse',
381
440
  module_depth: 'budget',
@@ -385,11 +444,17 @@ const codeClasses = {
385
444
  // and a lattice citizen may not be falsified by more information.
386
445
  relation_cycle: 'conflict',
387
446
  relation_inverse_missing: 'conflict',
388
- relation_target_unmet: 'conflict',
447
+ inverse_name: 'parse',
448
+ list_length: 'conflict',
449
+ recursion_unexpanded: 'incomplete',
450
+ recursion_budget: 'budget',
389
451
  func_arity: 'parse',
390
452
  elided_value: 'parse',
391
453
  unify_no_src: 'parse',
392
454
  incomplete_expression: 'parse',
455
+ pref_implicit_bag: 'parse',
456
+ alias_not_toplevel: 'parse',
457
+ alias_in_path: 'parse',
393
458
  not_number: 'parse',
394
459
  negative: 'parse',
395
460
  decimal_syntax: 'parse',
@@ -410,13 +475,15 @@ const codeClasses = {
410
475
  literal_nil: 'conflict',
411
476
  nil_gen: 'conflict',
412
477
  unite: 'conflict',
413
- '|:empty': 'conflict',
414
- '|:empty-dist': 'conflict',
478
+ 'empty': 'conflict',
479
+ 'empty-dist': 'conflict',
480
+ pref_rank_clash: 'conflict',
415
481
  exact_float_mix: 'conflict',
416
482
  inexact_integer_sum: 'conflict',
417
483
  pick_key: 'conflict',
418
484
  aggregate_data: 'conflict',
419
485
  aggregate_empty: 'conflict',
486
+ join_member: 'conflict',
420
487
  divide_by_zero: 'conflict',
421
488
  inexact_divide: 'conflict',
422
489
  float_overflow: 'conflict',
@@ -424,6 +491,7 @@ const codeClasses = {
424
491
  lossy_integer_literal: 'conflict',
425
492
  arg: 'conflict',
426
493
  'invalid-arg': 'conflict',
494
+ func_arg: 'conflict',
427
495
  no_first_arg: 'conflict',
428
496
  key_level: 'conflict',
429
497
  func: 'conflict',
package/dist/hints.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"hints.js","sourceRoot":"","sources":["../src/hints.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;QAkmBlD,SAAS;AAhmBX;;;;;GAKG;AAEH,MAAM,KAAK,GAA2B;IAEpC,YAAY,EACV,qEAAqE;QACrE,gBAAgB;QAChB,kBAAkB;QAClB,oDAAoD;QACpD,mDAAmD;QACnD,0DAA0D;QAC1D,8DAA8D;IAEhE,WAAW,EACT,wDAAwD;QACxD,kBAAkB;QAClB,oDAAoD;QACpD,iEAAiE;QACjE,8DAA8D;IAEhE,OAAO,EACL,kEAAkE;QAClE,+CAA+C;IAEjD,MAAM,EACJ,qEAAqE;QACrE,oCAAoC;IAEtC,eAAe,EACb,uEAAuE;QACvE,qEAAqE;QACrE,qEAAqE;QACrE,yBAAyB;IAG3B,6DAA6D;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gBAAgB,EAAE,WAAW;IAC7B,gBAAgB,EAAE,WAAW;IAC7B,qBAAqB,EAAE,WAAW;IAElC,6CAA6C;IAC7C,WAAW,EAAE,QAAQ;IACrB,SAAS,EAAE,QAAQ;IACnB,aAAa,EAAE,QAAQ;IAEvB,6DAA6D;IAC7D,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,UAAU;IACxB,UAAU,EAAE,UAAU;CACvB,CAAA;QA4BC,WAAW;AAzBb,uEAAuE;AACvE,sEAAsE;AACtE,oDAAoD;AACpD,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;AAG7D,gEAAgE;AAChE,8DAA8D;AAC9D,2DAA2D;AAC3D,SAAS,SAAS,CAAC,IAAY;IAC7B,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC,CAAA;IAC7B,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC;QAChB,OAAO,GAAG,CAAA;IACZ,CAAC;IACD,KAAK,MAAM,MAAM,IAAI,aAAa,EAAE,CAAC;QACnC,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5B,OAAO,WAAW,CAAC,MAAM,CAAC,CAAA;QAC5B,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAA;AACnB,CAAC,CAAC,iCAAiC"}
@@ -55,6 +55,10 @@ const KIND_TYPE = {
55
55
  Float: 'number',
56
56
  BigDecimal: 'number',
57
57
  Number: 'number',
58
+ // A path value is its address string at the JSON boundary
59
+ // (docs/design/PATHS.0.md), so the projection says `string` -- the
60
+ // same lossy-projection rule the exact numeric leaves follow.
61
+ Path: 'string',
58
62
  };
59
63
  // The JSON value of a concrete scalar, for `const`, `enum` and
60
64
  // `default`. An exact leaf renders through its own digits rather than
@@ -164,7 +168,37 @@ function fromConstraint(ctx, path, c) {
164
168
  // (the marker drops LINES, not branches). Go's twin keeps its `nil ==
165
169
  // v` arm because a missing map key there yields a typed nil rather
166
170
  // than an absent property.
171
+ // DEPRECATION IS AN ANNOTATION, and 2020-12 has one: `deprecated`.
172
+ // The export used to drop the whole record in SILENCE -- no keyword,
173
+ // and no loss line even under --strict -- which is the one thing the
174
+ // verb's own contract says it never does (use-cases/BUGS.md §56).
175
+ //
176
+ // The boolean crosses faithfully. The record's STRINGS (msg, use,
177
+ // since) have no home in 2020-12, so they are reported as a loss
178
+ // rather than invented into `description`: this exporter emits no
179
+ // `description` anywhere, and quietly making it mean "deprecation
180
+ // note" would be a mapping a consumer cannot undo.
167
181
  function fromVal(ctx, path, v) {
182
+ const out = fromValInner(ctx, path, v);
183
+ const dep = v?.deprecation;
184
+ if (null != dep && null != out && 'object' === typeof out) {
185
+ const said = DEPRECATION_TEXT.filter((k) => null != dep[k]);
186
+ if (0 < said.length) {
187
+ lose(ctx, path, 'deprecate', 'JSON Schema 2020-12 has the `deprecated` flag and no field for ' +
188
+ 'what it SAYS, so ' + said.join('/') + ' cannot cross; the ' +
189
+ 'schema marks the property deprecated and a consumer must read ' +
190
+ 'the model for the reason');
191
+ }
192
+ return { ...out, deprecated: true };
193
+ }
194
+ return out;
195
+ }
196
+ // The record's text keys -- the ones with nothing to carry them.
197
+ // `DEPRECATION_KEYS` in DeprecateFuncVal.ts is the authority on what a
198
+ // record may hold; this is that list, and a key added there without a
199
+ // JSON Schema home belongs here too.
200
+ const DEPRECATION_TEXT = ['msg', 'use', 'since'];
201
+ function fromValInner(ctx, path, v) {
168
202
  // A preference is its inner value plus a DEFAULT. JSON Schema's
169
203
  // `default` is annotation rather than constraint -- it does not
170
204
  // validate -- which is exactly what a preference is when something