@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.
- package/AGENTS.md +29 -29
- package/TRADEMARKS.md +0 -1
- package/dist/src/config.d.ts +11 -0
- package/dist/src/config.js +2 -0
- package/dist/src/geometry.d.ts +21 -0
- package/dist/src/geometry.js +21 -0
- package/dist/src/meter.d.ts +51 -0
- package/dist/src/meter.js +51 -0
- package/dist/src/mind/attention.d.ts +4 -0
- package/dist/src/mind/attention.js +165 -16
- package/dist/src/mind/canonical.d.ts +16 -0
- package/dist/src/mind/canonical.js +41 -0
- package/dist/src/mind/graph-search.js +33 -14
- package/dist/src/mind/match.d.ts +1 -1
- package/dist/src/mind/match.js +5 -3
- package/dist/src/mind/mechanisms/cast.js +1 -1
- package/dist/src/mind/mechanisms/confluence.js +24 -0
- package/dist/src/mind/mechanisms/recall.js +32 -4
- package/dist/src/mind/mind.d.ts +4 -2
- package/dist/src/mind/mind.js +5 -4
- package/dist/src/mind/pipeline-mechanism.d.ts +7 -0
- package/dist/src/mind/pipeline.js +41 -14
- package/dist/src/mind/primitives.js +9 -1
- package/dist/src/mind/rationale.d.ts +28 -1
- package/dist/src/mind/rationale.js +22 -1
- package/dist/src/mind/reasoning.d.ts +21 -3
- package/dist/src/mind/reasoning.js +73 -21
- package/dist/src/mind/recognition.js +4 -8
- package/dist/src/mind/resonance.js +20 -1
- package/dist/src/mind/trace.js +1 -0
- package/dist/src/mind/traverse.js +6 -2
- package/dist/src/mind/types.d.ts +36 -13
- package/docs/INVARIANTS.md +2 -2
- package/docs/architecture/bounded-reads.md +1 -1
- package/docs/architecture/commonality.md +2 -2
- package/docs/architecture/cost-model.md +2 -2
- package/docs/architecture/determinism.md +7 -7
- package/docs/architecture/match-project.md +2 -3
- package/docs/architecture/mechanism-market.md +10 -10
- package/docs/architecture/meter.md +5 -5
- package/docs/architecture/store.md +3 -3
- package/docs/failures/tempting-but-wrong.md +3 -4
- package/docs/harness/gates.md +2 -2
- package/docs/mechanisms/cast.md +2 -2
- package/docs/mechanisms/cover.md +2 -3
- package/docs/mechanisms/extraction.md +7 -7
- package/docs/mechanisms/recall.md +8 -9
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/alu/README.md +11 -12
- package/src/config.ts +13 -0
- package/src/geometry.ts +21 -0
- package/src/meter.ts +51 -0
- package/src/mind/attention.ts +167 -16
- package/src/mind/canonical.ts +43 -0
- package/src/mind/graph-search.ts +39 -14
- package/src/mind/match.ts +5 -3
- package/src/mind/mechanisms/cast.ts +3 -1
- package/src/mind/mechanisms/confluence.ts +24 -0
- package/src/mind/mechanisms/recall.ts +32 -4
- package/src/mind/mind.ts +6 -4
- package/src/mind/pipeline-mechanism.ts +7 -0
- package/src/mind/pipeline.ts +49 -16
- package/src/mind/primitives.ts +9 -1
- package/src/mind/rationale.ts +35 -1
- package/src/mind/reasoning.ts +92 -15
- package/src/mind/recognition.ts +4 -8
- package/src/mind/resonance.ts +19 -1
- package/src/mind/trace.ts +1 -0
- package/src/mind/traverse.ts +7 -5
- package/src/mind/types.ts +36 -13
- package/test/105-derive-through-reports-its-refusal.test.mjs +24 -0
- package/test/118-the-join-reaches-a-key-off-the-cut.test.mjs +74 -0
- package/test/119-the-work-does-not-grow-with-the-corpus.test.mjs +122 -0
- package/test/120-composition-is-consequence.test.mjs +132 -0
- package/test/121-the-extension-does-not-grow-with-the-corpus.test.mjs +128 -0
- package/test/122-the-climb-search-does-not-grow-with-the-corpus.test.mjs +117 -0
- package/test/123-the-paired-formulas-agree.test.mjs +90 -0
- package/test/125-the-post-grounding-branch-publishes-its-operand.test.mjs +51 -0
- package/test/126-the-pipeline-does-not-name-mechanisms.test.mjs +42 -0
- package/test/128-the-leads-somewhere-pair-agrees.test.mjs +83 -0
- package/test/129-the-trace-payload-shape.test.mjs +164 -0
- package/test/32-confluence.test.mjs +68 -0
- package/test/38-reason-restate-guard.test.mjs +8 -2
- package/test/43-cast-analog-seat.test.mjs +10 -0
- 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,
|