@hviana/sema 0.8.2 → 0.8.3

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 (86) hide show
  1. package/AGENTS.md +29 -29
  2. package/TRADEMARKS.md +0 -1
  3. package/dist/src/config.d.ts +11 -0
  4. package/dist/src/config.js +2 -0
  5. package/dist/src/geometry.d.ts +21 -0
  6. package/dist/src/geometry.js +21 -0
  7. package/dist/src/meter.d.ts +51 -0
  8. package/dist/src/meter.js +51 -0
  9. package/dist/src/mind/attention.d.ts +4 -0
  10. package/dist/src/mind/attention.js +165 -16
  11. package/dist/src/mind/canonical.d.ts +16 -0
  12. package/dist/src/mind/canonical.js +41 -0
  13. package/dist/src/mind/graph-search.js +33 -14
  14. package/dist/src/mind/match.d.ts +1 -1
  15. package/dist/src/mind/match.js +5 -3
  16. package/dist/src/mind/mechanisms/cast.js +1 -1
  17. package/dist/src/mind/mechanisms/confluence.js +24 -0
  18. package/dist/src/mind/mechanisms/recall.js +32 -4
  19. package/dist/src/mind/mind.d.ts +4 -2
  20. package/dist/src/mind/mind.js +5 -4
  21. package/dist/src/mind/pipeline-mechanism.d.ts +7 -0
  22. package/dist/src/mind/pipeline.js +41 -14
  23. package/dist/src/mind/primitives.js +9 -1
  24. package/dist/src/mind/rationale.d.ts +28 -1
  25. package/dist/src/mind/rationale.js +22 -1
  26. package/dist/src/mind/reasoning.d.ts +21 -3
  27. package/dist/src/mind/reasoning.js +73 -21
  28. package/dist/src/mind/recognition.js +4 -8
  29. package/dist/src/mind/resonance.js +20 -1
  30. package/dist/src/mind/trace.js +1 -0
  31. package/dist/src/mind/traverse.js +6 -2
  32. package/dist/src/mind/types.d.ts +36 -13
  33. package/docs/INVARIANTS.md +2 -2
  34. package/docs/architecture/bounded-reads.md +1 -1
  35. package/docs/architecture/commonality.md +2 -2
  36. package/docs/architecture/cost-model.md +2 -2
  37. package/docs/architecture/determinism.md +7 -7
  38. package/docs/architecture/match-project.md +2 -3
  39. package/docs/architecture/mechanism-market.md +10 -10
  40. package/docs/architecture/meter.md +5 -5
  41. package/docs/architecture/store.md +3 -3
  42. package/docs/failures/tempting-but-wrong.md +3 -4
  43. package/docs/harness/gates.md +2 -2
  44. package/docs/mechanisms/cast.md +2 -2
  45. package/docs/mechanisms/cover.md +2 -3
  46. package/docs/mechanisms/extraction.md +7 -7
  47. package/docs/mechanisms/recall.md +8 -9
  48. package/jsr.json +1 -1
  49. package/package.json +1 -1
  50. package/src/alu/README.md +11 -12
  51. package/src/config.ts +13 -0
  52. package/src/geometry.ts +21 -0
  53. package/src/meter.ts +51 -0
  54. package/src/mind/attention.ts +167 -16
  55. package/src/mind/canonical.ts +43 -0
  56. package/src/mind/graph-search.ts +39 -14
  57. package/src/mind/match.ts +5 -3
  58. package/src/mind/mechanisms/cast.ts +3 -1
  59. package/src/mind/mechanisms/confluence.ts +24 -0
  60. package/src/mind/mechanisms/recall.ts +32 -4
  61. package/src/mind/mind.ts +6 -4
  62. package/src/mind/pipeline-mechanism.ts +7 -0
  63. package/src/mind/pipeline.ts +49 -16
  64. package/src/mind/primitives.ts +9 -1
  65. package/src/mind/rationale.ts +35 -1
  66. package/src/mind/reasoning.ts +92 -15
  67. package/src/mind/recognition.ts +4 -8
  68. package/src/mind/resonance.ts +19 -1
  69. package/src/mind/trace.ts +1 -0
  70. package/src/mind/traverse.ts +7 -5
  71. package/src/mind/types.ts +36 -13
  72. package/test/105-derive-through-reports-its-refusal.test.mjs +24 -0
  73. package/test/118-the-join-reaches-a-key-off-the-cut.test.mjs +74 -0
  74. package/test/119-the-work-does-not-grow-with-the-corpus.test.mjs +122 -0
  75. package/test/120-composition-is-consequence.test.mjs +132 -0
  76. package/test/121-the-extension-does-not-grow-with-the-corpus.test.mjs +128 -0
  77. package/test/122-the-climb-search-does-not-grow-with-the-corpus.test.mjs +117 -0
  78. package/test/123-the-paired-formulas-agree.test.mjs +90 -0
  79. package/test/125-the-post-grounding-branch-publishes-its-operand.test.mjs +51 -0
  80. package/test/126-the-pipeline-does-not-name-mechanisms.test.mjs +42 -0
  81. package/test/128-the-leads-somewhere-pair-agrees.test.mjs +83 -0
  82. package/test/129-the-trace-payload-shape.test.mjs +164 -0
  83. package/test/32-confluence.test.mjs +68 -0
  84. package/test/38-reason-restate-guard.test.mjs +8 -2
  85. package/test/43-cast-analog-seat.test.mjs +10 -0
  86. package/test/55-cost-meter.test.mjs +859 -0
@@ -65,6 +65,7 @@ test("CAST comparison: a nextOf-descendant analog is seated by its own bytes, no
65
65
  const dominant = {
66
66
  anchor: franceId,
67
67
  vote: 100,
68
+ idfVote: 100, // the fixture builds an Attention: the field has to exist
68
69
  ctx: enc("What is the capital of France?"),
69
70
  runs: [{ qs: 0, qe: 30, cs: 0, weight: 1 }],
70
71
  };
@@ -75,6 +76,7 @@ test("CAST comparison: a nextOf-descendant analog is seated by its own bytes, no
75
76
  const spainPoint = {
76
77
  anchor: spainAnalogSrcId,
77
78
  vote: 50,
79
+ idfVote: 50, // the fixture builds an Attention: the field has to exist
78
80
  ctx: enc("some other prompt"),
79
81
  runs: [{ qs: 32, qe: 62, cs: 0, weight: 1 }],
80
82
  };
@@ -85,6 +87,7 @@ test("CAST comparison: a nextOf-descendant analog is seated by its own bytes, no
85
87
  {
86
88
  anchor: franceId,
87
89
  vote: 100,
90
+ idfVote: 100, // the fixture builds an Attention: the field has to exist
88
91
  start: 0,
89
92
  end: 30,
90
93
  breadth: 1,
@@ -95,6 +98,7 @@ test("CAST comparison: a nextOf-descendant analog is seated by its own bytes, no
95
98
  {
96
99
  anchor: franceId,
97
100
  vote: 100,
101
+ idfVote: 100, // the fixture builds an Attention: the field has to exist
98
102
  start: 0,
99
103
  end: 30,
100
104
  breadth: 1,
@@ -103,6 +107,7 @@ test("CAST comparison: a nextOf-descendant analog is seated by its own bytes, no
103
107
  {
104
108
  anchor: spainAnalogSrcId,
105
109
  vote: 50,
110
+ idfVote: 50, // the fixture builds an Attention: the field has to exist
106
111
  start: 32,
107
112
  end: 62,
108
113
  breadth: 0.5,
@@ -174,6 +179,7 @@ test("CAST comparison: a DIRECTLY aligned analog is never re-projected past its
174
179
  const dominant = {
175
180
  anchor: franceId,
176
181
  vote: 100,
182
+ idfVote: 100, // the fixture builds an Attention: the field has to exist
177
183
  ctx: enc("What is the capital of France?"),
178
184
  runs: [{ qs: 0, qe: 30, cs: 0, weight: 1 }],
179
185
  };
@@ -182,6 +188,7 @@ test("CAST comparison: a DIRECTLY aligned analog is never re-projected past its
182
188
  const japanPoint = {
183
189
  anchor: japanId,
184
190
  vote: 50,
191
+ idfVote: 50, // the fixture builds an Attention: the field has to exist
185
192
  ctx: enc("What is the capital of Japan? Tokyo is the capital of Japan."),
186
193
  runs: [{ qs: 32, qe: 62, cs: 0, weight: 1 }],
187
194
  };
@@ -192,6 +199,7 @@ test("CAST comparison: a DIRECTLY aligned analog is never re-projected past its
192
199
  {
193
200
  anchor: franceId,
194
201
  vote: 100,
202
+ idfVote: 100, // the fixture builds an Attention: the field has to exist
195
203
  start: 0,
196
204
  end: 30,
197
205
  breadth: 1,
@@ -202,6 +210,7 @@ test("CAST comparison: a DIRECTLY aligned analog is never re-projected past its
202
210
  {
203
211
  anchor: franceId,
204
212
  vote: 100,
213
+ idfVote: 100, // the fixture builds an Attention: the field has to exist
205
214
  start: 0,
206
215
  end: 30,
207
216
  breadth: 1,
@@ -210,6 +219,7 @@ test("CAST comparison: a DIRECTLY aligned analog is never re-projected past its
210
219
  {
211
220
  anchor: japanId,
212
221
  vote: 50,
222
+ idfVote: 50, // the fixture builds an Attention: the field has to exist
213
223
  start: 32,
214
224
  end: 62,
215
225
  breadth: 0.5,