@hviana/sema 0.4.2 → 0.4.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 (133) hide show
  1. package/dist/example/demo.d.ts +1 -0
  2. package/dist/example/demo.js +39 -0
  3. package/dist/example/train_base.d.ts +87 -0
  4. package/dist/example/train_base.js +2252 -0
  5. package/dist/src/alphabet.d.ts +7 -0
  6. package/dist/src/alphabet.js +33 -0
  7. package/dist/src/alu/src/alu.d.ts +185 -0
  8. package/dist/src/alu/src/alu.js +440 -0
  9. package/dist/src/alu/src/expr.d.ts +61 -0
  10. package/dist/src/alu/src/expr.js +318 -0
  11. package/dist/src/alu/src/index.d.ts +11 -0
  12. package/dist/src/alu/src/index.js +19 -0
  13. package/dist/src/alu/src/kernel-arith.d.ts +16 -0
  14. package/dist/src/alu/src/kernel-arith.js +264 -0
  15. package/dist/src/alu/src/kernel-bits.d.ts +19 -0
  16. package/dist/src/alu/src/kernel-bits.js +152 -0
  17. package/dist/src/alu/src/kernel-logic.d.ts +4 -0
  18. package/dist/src/alu/src/kernel-logic.js +60 -0
  19. package/dist/src/alu/src/kernel-nd.d.ts +3 -0
  20. package/dist/src/alu/src/kernel-nd.js +208 -0
  21. package/dist/src/alu/src/kernel-numeric.d.ts +54 -0
  22. package/dist/src/alu/src/kernel-numeric.js +366 -0
  23. package/dist/src/alu/src/operation.d.ts +168 -0
  24. package/dist/src/alu/src/operation.js +189 -0
  25. package/dist/src/alu/src/parser.d.ts +221 -0
  26. package/dist/src/alu/src/parser.js +577 -0
  27. package/dist/src/alu/src/resonance.d.ts +55 -0
  28. package/dist/src/alu/src/resonance.js +126 -0
  29. package/dist/src/alu/src/text.d.ts +31 -0
  30. package/dist/src/alu/src/text.js +73 -0
  31. package/dist/src/alu/src/value.d.ts +109 -0
  32. package/dist/src/alu/src/value.js +300 -0
  33. package/dist/src/alu/test/alu.test.d.ts +1 -0
  34. package/dist/src/alu/test/alu.test.js +764 -0
  35. package/dist/src/bytes.d.ts +14 -0
  36. package/dist/src/bytes.js +59 -0
  37. package/dist/src/canon.d.ts +26 -0
  38. package/dist/src/canon.js +57 -0
  39. package/dist/src/config.d.ts +111 -0
  40. package/dist/src/config.js +91 -0
  41. package/dist/src/derive/src/deduction.d.ts +136 -0
  42. package/dist/src/derive/src/deduction.js +159 -0
  43. package/dist/src/derive/src/index.d.ts +8 -0
  44. package/dist/src/derive/src/index.js +11 -0
  45. package/dist/src/derive/src/priority-queue.d.ts +20 -0
  46. package/dist/src/derive/src/priority-queue.js +73 -0
  47. package/dist/src/derive/src/rewrite.d.ts +56 -0
  48. package/dist/src/derive/src/rewrite.js +100 -0
  49. package/dist/src/derive/src/trie.d.ts +90 -0
  50. package/dist/src/derive/src/trie.js +217 -0
  51. package/dist/src/derive/test/derive.test.d.ts +1 -0
  52. package/dist/src/derive/test/derive.test.js +122 -0
  53. package/dist/src/extension.d.ts +37 -0
  54. package/dist/src/extension.js +7 -0
  55. package/dist/src/geometry.d.ts +175 -0
  56. package/dist/src/geometry.js +823 -0
  57. package/dist/src/index.d.ts +17 -0
  58. package/dist/src/index.js +19 -0
  59. package/dist/src/ingest-cache.d.ts +41 -0
  60. package/dist/src/ingest-cache.js +165 -0
  61. package/dist/src/meter.d.ts +176 -0
  62. package/dist/src/meter.js +274 -0
  63. package/dist/src/mind/articulation.d.ts +6 -0
  64. package/dist/src/mind/articulation.js +99 -0
  65. package/dist/src/mind/attention.d.ts +414 -0
  66. package/dist/src/mind/attention.js +2082 -0
  67. package/dist/src/mind/bridge.d.ts +39 -0
  68. package/dist/src/mind/bridge.js +947 -0
  69. package/dist/src/mind/canonical.d.ts +34 -0
  70. package/dist/src/mind/canonical.js +93 -0
  71. package/dist/src/mind/graph-search.d.ts +294 -0
  72. package/dist/src/mind/graph-search.js +996 -0
  73. package/dist/src/mind/index.d.ts +9 -0
  74. package/dist/src/mind/index.js +5 -0
  75. package/dist/src/mind/junction.d.ts +137 -0
  76. package/dist/src/mind/junction.js +342 -0
  77. package/dist/src/mind/learning.d.ts +75 -0
  78. package/dist/src/mind/learning.js +270 -0
  79. package/dist/src/mind/match.d.ts +181 -0
  80. package/dist/src/mind/match.js +655 -0
  81. package/dist/src/mind/mechanisms/alu.d.ts +4 -0
  82. package/dist/src/mind/mechanisms/alu.js +36 -0
  83. package/dist/src/mind/mechanisms/cast.d.ts +89 -0
  84. package/dist/src/mind/mechanisms/cast.js +784 -0
  85. package/dist/src/mind/mechanisms/confluence.d.ts +24 -0
  86. package/dist/src/mind/mechanisms/confluence.js +255 -0
  87. package/dist/src/mind/mechanisms/cover.d.ts +6 -0
  88. package/dist/src/mind/mechanisms/cover.js +227 -0
  89. package/dist/src/mind/mechanisms/extraction.d.ts +33 -0
  90. package/dist/src/mind/mechanisms/extraction.js +300 -0
  91. package/dist/src/mind/mechanisms/recall.d.ts +16 -0
  92. package/dist/src/mind/mechanisms/recall.js +364 -0
  93. package/dist/src/mind/mind.d.ts +337 -0
  94. package/dist/src/mind/mind.js +617 -0
  95. package/dist/src/mind/pipeline-mechanism.d.ts +172 -0
  96. package/dist/src/mind/pipeline-mechanism.js +465 -0
  97. package/dist/src/mind/pipeline.d.ts +49 -0
  98. package/dist/src/mind/pipeline.js +275 -0
  99. package/dist/src/mind/primitives.d.ts +66 -0
  100. package/dist/src/mind/primitives.js +306 -0
  101. package/dist/src/mind/rationale.d.ts +139 -0
  102. package/dist/src/mind/rationale.js +163 -0
  103. package/dist/src/mind/reasoning.d.ts +40 -0
  104. package/dist/src/mind/reasoning.js +280 -0
  105. package/dist/src/mind/recognition.d.ts +20 -0
  106. package/dist/src/mind/recognition.js +504 -0
  107. package/dist/src/mind/resonance.d.ts +23 -0
  108. package/dist/src/mind/resonance.js +0 -0
  109. package/dist/src/mind/trace.d.ts +15 -0
  110. package/dist/src/mind/trace.js +73 -0
  111. package/dist/src/mind/traverse.d.ts +126 -0
  112. package/dist/src/mind/traverse.js +650 -0
  113. package/dist/src/mind/types.d.ts +333 -0
  114. package/dist/src/mind/types.js +130 -0
  115. package/dist/src/rabitq-ivf/src/database.d.ts +113 -0
  116. package/dist/src/rabitq-ivf/src/database.js +201 -0
  117. package/dist/src/rabitq-ivf/src/index.d.ts +7 -0
  118. package/dist/src/rabitq-ivf/src/index.js +4 -0
  119. package/dist/src/rabitq-ivf/src/ivf.d.ts +200 -0
  120. package/dist/src/rabitq-ivf/src/ivf.js +1165 -0
  121. package/dist/src/rabitq-ivf/src/prng.d.ts +19 -0
  122. package/dist/src/rabitq-ivf/src/prng.js +36 -0
  123. package/dist/src/rabitq-ivf/src/rabitq.d.ts +95 -0
  124. package/dist/src/rabitq-ivf/src/rabitq.js +283 -0
  125. package/dist/src/sema.d.ts +31 -0
  126. package/dist/src/sema.js +63 -0
  127. package/dist/src/store-sqlite.d.ts +184 -0
  128. package/dist/src/store-sqlite.js +942 -0
  129. package/dist/src/store.d.ts +678 -0
  130. package/dist/src/store.js +1703 -0
  131. package/dist/src/vec.d.ts +31 -0
  132. package/dist/src/vec.js +109 -0
  133. package/package.json +1 -1
@@ -0,0 +1,300 @@
1
+ // extraction.ts — Extraction (Skill) — Section 4 of the mind.
2
+ //
3
+ // Given a query and its consensus-ranked anchors, find the first span-shaped
4
+ // skill exemplar among the ranked anchors and read the analogous span of the
5
+ // query. A skill exemplar is a learnt fact whose context and answer together
6
+ // form a span-in-context pattern: the answer is a subsequence of the context
7
+ // (or one of its pieces is), and the context is the smallest spanning frame
8
+ // that contains it.
9
+ import { locate } from "../match.js";
10
+ import { concatBytes, indexOf } from "../../bytes.js";
11
+ import { decodeText, unexplainedLabel } from "../rationale.js";
12
+ import { CONCEPT, STEP } from "../graph-search.js";
13
+ import { rItem, rNode, traceFail } from "../trace.js";
14
+ // ── Extraction ────────────────────────────────────────────────────────────
15
+ /** Find the first span-shaped skill exemplar among the ranked anchors from
16
+ * climbAttentionAll and read the analogous span from the query. Returns
17
+ * the extracted bytes PLUS the query spans the skill ACCOUNTED FOR — the
18
+ * located frames AND any read span BOUNDED by located frames on both
19
+ * sides, the elementary evidence think's grounding decider weighs. A
20
+ * bounded read is explained: the skill located both its borders in the
21
+ * query and emitted exactly what sits between them. An OPEN-ENDED read
22
+ * (the exemplar's answer reaches the context's end, so the query is read
23
+ * to its own end with no located right border) remains a guess about where
24
+ * the span stops — it stays unaccounted, priced by exclusion like the
25
+ * cover's bridged bytes. (Accounting frames only — the earlier convention
26
+ * — let a CAST juxtaposition that merely echoed the query's exact site
27
+ * outweigh a correct bounded extraction: the same span counted as
28
+ * explained for one mechanism and not the other, and the asymmetry, not
29
+ * the answers' merits, decided the grounding.) Null when no skill
30
+ * applies. */
31
+ export async function extractBySkill(ctx, query, pre) {
32
+ const t = ctx.trace?.enter("extractBySkill", [
33
+ rItem(query, "query"),
34
+ ]);
35
+ const fail = traceFail(t);
36
+ // Use climbAttentionAll to get the FULL ranked list, not just the
37
+ // roots that cleared commitVotes' significance floor. The floor
38
+ // gates further points of attention for fusion, but extraction only
39
+ // needs ONE anchor that IS a span-shaped skill exemplar — and on
40
+ // some seeds the top-voted anchor is not one (e.g. a concept-merge
41
+ // nickname outvotes the painting exemplars on shared substrings,
42
+ // while the exemplars' votes fall below the floor). Iterating the
43
+ // ranked list instead of just the roots lets extraction reach the
44
+ // first painting-exemplar anchor regardless of its floor status.
45
+ //
46
+ const { ranked } = await pre.attention();
47
+ if (ranked.length === 0) {
48
+ return fail("no consensus anchor — no skill to apply");
49
+ }
50
+ // Try ranked anchors IN ORDER until one yields a USABLE extraction — not
51
+ // merely a span-shaped exemplar, but one whose extracted span clears the
52
+ // same one-river-fold quantum (W) cover.ts's restatedSpan gate already
53
+ // treats as the floor below which byte overlap is chance, not evidence.
54
+ // isSpanShaped (spanShapedOf) is a deliberately permissive sparse-
55
+ // subsequence check — see the section note below — so it accepts exemplars
56
+ // whose relation to the query is coincidental gap-matching, not genuine
57
+ // structure. Stopping at the FIRST such exemplar let a coincidental match
58
+ // early in the ranked list win outright and read out a sub-quantum
59
+ // fragment (observed: a 3-byte "Hel" pulled from an unrelated exemplar,
60
+ // while a later ranked anchor would have read the query's own "Hello…"
61
+ // correctly). Trying further anchors when one produces nothing usable is
62
+ // the same idiom this loop already uses for non-exemplars — extended to
63
+ // cover a bad extraction, not just a structural non-match.
64
+ //
65
+ // The retry is bounded at pre.k — the SAME evidence-breadth constant every
66
+ // other consumer of a ranked list already self-limits to (resonance, the
67
+ // weave, the climb itself; see Precomputed.k's own doc comment) — not the
68
+ // full ranked list. locate()'s frame match has an EXACT-byte tier with no
69
+ // significance correction of its own (short W-byte frames are cheap to
70
+ // match by pure chance), so trying every ranked anchor turns that per-
71
+ // anchor chance into a near-certainty over enough attempts: on a pure-
72
+ // gibberish query, 170 anchors deep found an unrelated Zulu exemplar whose
73
+ // short frame happened to byte-match, producing "xyzzy pl" — a coincidence
74
+ // no different in kind from the "RaBitQ estimate overshot the reach bar
75
+ // and grounded pure gibberish" failure recall.ts's own significance
76
+ // correction exists to prevent (see recallByResonance's reach-threshold
77
+ // comment). Bounding the search to the ranked list's own top-k restores
78
+ // the "genuinely relevant but not root-significant" exemplars this loop
79
+ // was built for, without the unbounded tail's chance collisions.
80
+ const W = ctx.space.maxGroup;
81
+ const searched = ranked.slice(0, pre.k);
82
+ let shapeMisses = 0;
83
+ let subQuantum = 0;
84
+ for (const cand of searched) {
85
+ const exemplar = await pre.spanShapedOf(cand.anchor);
86
+ if (!exemplar) {
87
+ shapeMisses++;
88
+ continue;
89
+ }
90
+ const built = buildFromExemplar(ctx, query, pre, exemplar);
91
+ if (built === null || built.bytes.length < W) {
92
+ subQuantum++;
93
+ continue;
94
+ }
95
+ if (shapeMisses > 0 || subQuantum > 0) {
96
+ ctx.trace?.step("trySkillAnchors", [
97
+ rItem(query.subarray(0, 0), `skipped ${shapeMisses + subQuantum}`),
98
+ rNode(ctx, cand.anchor, "chosen"),
99
+ ], [], `skipped ${shapeMisses} non-exemplar and ${subQuantum} sub-quantum ` +
100
+ `anchor(s) before one yielded a usable extraction`);
101
+ }
102
+ t?.done([rItem(built.bytes, "extracted")], built.pieces === 1
103
+ ? `apply a learnt extraction skill — read the analogous span of the query` +
104
+ ` framed like "${decodeText(exemplar.answerBytes)}" sits in its exemplar`
105
+ : `apply a learnt MULTI-PIECE skill — read ${built.pieces} analogous` +
106
+ ` pieces of the query and synthesize them like "${decodeText(exemplar.answerBytes)}"`);
107
+ return {
108
+ bytes: built.bytes,
109
+ accounted: built.accounted,
110
+ unexplained: unexplainedLabel(query, built.accounted),
111
+ };
112
+ }
113
+ if (shapeMisses === searched.length) {
114
+ ctx.trace?.step("trySkillAnchors", [], [], `none of the top ${searched.length} ranked anchor(s) (of ${ranked.length} total) ` +
115
+ `is a span-shaped skill exemplar`);
116
+ return fail("no consensus root is a span-shaped skill exemplar");
117
+ }
118
+ return fail("no ranked anchor yielded an extraction at or above the quantum floor");
119
+ }
120
+ /** Build the extracted bytes for ONE already-accepted span-shaped exemplar —
121
+ * factored out of {@link extractBySkill} so its anchor loop can try
122
+ * successive ranked candidates instead of committing to the first
123
+ * structural match. Null when the exemplar's answer does not decompose
124
+ * against its context, or no piece's frame locates in the query. */
125
+ function buildFromExemplar(ctx, query, pre, exemplar) {
126
+ const { contextBytes, answerBytes } = exemplar;
127
+ const ansCtxRuns = answerRunsInContext(ctx, contextBytes, answerBytes);
128
+ if (ansCtxRuns === null || ansCtxRuns.length === 0) {
129
+ return null;
130
+ }
131
+ if (ansCtxRuns.length > 1) {
132
+ ctx.trace?.step("decomposeAnswer", [rItem(answerBytes, "multi-piece-answer")], ansCtxRuns.map((r) => rItem(contextBytes.subarray(r.start, r.end), "piece", undefined, [
133
+ r.start,
134
+ r.end,
135
+ ])), `answer splits into ${ansCtxRuns.length} piece(s) within the exemplar context`);
136
+ }
137
+ const pieces = [];
138
+ const accounted = [];
139
+ for (let ri = 0; ri < ansCtxRuns.length; ri++) {
140
+ const run = ansCtxRuns[ri];
141
+ const isLast = ri === ansCtxRuns.length - 1;
142
+ const framePreLen = Math.min(run.start, ctx.space.maxGroup);
143
+ const framePre = run.start > 0
144
+ ? contextBytes.subarray(run.start - framePreLen, run.start)
145
+ : null;
146
+ const frames = [];
147
+ let start = 0;
148
+ if (framePre) {
149
+ const prePos = locate(ctx, query, framePre, 0, pre.rec.sites);
150
+ if (prePos < 0)
151
+ continue;
152
+ start = prePos + framePre.length;
153
+ frames.push([prePos, start]); // the located frame IS matched evidence
154
+ }
155
+ let end;
156
+ if (isLast) {
157
+ if (run.end < contextBytes.length) {
158
+ const framePostLen = Math.min(contextBytes.length - run.end, ctx.space.maxGroup);
159
+ const framePost = contextBytes.subarray(run.end, run.end + framePostLen);
160
+ const postPos = locate(ctx, query.subarray(start), framePost, 0, pre.rec.sites);
161
+ if (postPos < 0)
162
+ continue;
163
+ end = start + postPos;
164
+ frames.push([end, end + framePost.length]); // matched post-frame
165
+ }
166
+ else {
167
+ end = query.length;
168
+ }
169
+ }
170
+ else {
171
+ const nextRun = ansCtxRuns[ri + 1];
172
+ const nextPreLen = Math.min(nextRun.start, ctx.space.maxGroup);
173
+ const nextPre = contextBytes.subarray(nextRun.start - nextPreLen, nextRun.start);
174
+ const nextPos = locate(ctx, query.subarray(start), nextPre, 0, pre.rec.sites);
175
+ if (nextPos < 0) {
176
+ end = start + run.ansLen;
177
+ }
178
+ else {
179
+ end = start + nextPos;
180
+ frames.push([end, end + nextPre.length]); // matched next-frame
181
+ }
182
+ }
183
+ if (start >= end)
184
+ continue;
185
+ pieces.push(query.subarray(start, end));
186
+ accounted.push(...frames);
187
+ // Bounded on both sides ⇒ the read span itself is explained (see doc).
188
+ // frames carries the pre-border (when the answer is not at the context's
189
+ // start) and the located right border (post-frame or next piece's
190
+ // pre-frame); only when BOTH borders were located is the read bounded.
191
+ const preBounded = run.start === 0 || frames.some(([, e]) => e === start);
192
+ const postBounded = frames.some(([b]) => b === end);
193
+ if (preBounded && postBounded)
194
+ accounted.push([start, end]);
195
+ }
196
+ if (pieces.length === 0) {
197
+ return null;
198
+ }
199
+ const out = pieces.length === 1 ? pieces[0] : concatBytes(pieces);
200
+ return { bytes: out, accounted, pieces: pieces.length };
201
+ }
202
+ // ── The two span-shape readings: OPEN acceptance vs. STRONG decomposition ──
203
+ //
204
+ // isSpanShaped and answerRunsInContext read the SAME relation ("the answer is
205
+ // drawn from the context") at two deliberately different strengths, and they
206
+ // are NOT interchangeable:
207
+ //
208
+ // • isSpanShaped — the OPEN reading: any in-order embedding (a sparse
209
+ // subsequence, arbitrary gaps). O(|context|) byte scan. Used to ACCEPT
210
+ // an exemplar candidate.
211
+ // • answerRunsInContext — the STRONG reading: a greedy longest-run
212
+ // DECOMPOSITION into contiguous pieces. Greedy-longest is strictly
213
+ // stronger than subsequence (a long late match can consume context an
214
+ // earlier shorter choice needed), so an ACCEPTED exemplar can still fail
215
+ // to decompose — extractBySkill then fails with "answer is not a
216
+ // subsequence of the context" and think falls through to recall. That
217
+ // fall-through is BEHAVIOUR, pinned by the extraction suites: do not
218
+ // "unify" the two into one machine — replacing the open reading with the
219
+ // strong one silently rejects exemplars extraction today accepts, and
220
+ // replacing the strong one with a backtracking embedding changes which
221
+ // pieces are read out of the query.
222
+ /** Decompose an answer into substrings of its surrounding context, in order —
223
+ * the STRONG span-shape reading (see the section note above). Returns null
224
+ * when no greedy longest-run decomposition exists. Adjacent runs that
225
+ * connect contiguously are merged. */
226
+ export function answerRunsInContext(_ctx, context, answer) {
227
+ const pos = indexOf(context, answer, 0);
228
+ if (pos >= 0) {
229
+ return [{ start: pos, end: pos + answer.length, ansLen: answer.length }];
230
+ }
231
+ const runs = [];
232
+ let ai = 0;
233
+ let ci = 0;
234
+ while (ai < answer.length) {
235
+ // Longest match of the remaining answer at any position of the remaining
236
+ // context: one direct extend per context position — O(|ctx|·match) per
237
+ // run, replacing the previous longest-first indexOf countdown whose
238
+ // repeated scans were cubic on long sparse-subsequence answers.
239
+ let bestLen = 0;
240
+ let bestPos = -1;
241
+ for (let p = ci; p < context.length; p++) {
242
+ let l = 0;
243
+ const maxL = Math.min(context.length - p, answer.length - ai);
244
+ if (maxL <= bestLen)
245
+ break; // no later position can beat the best
246
+ while (l < maxL && context[p + l] === answer[ai + l])
247
+ l++;
248
+ if (l > bestLen) {
249
+ bestLen = l;
250
+ bestPos = p;
251
+ if (ai + l === answer.length)
252
+ break; // the whole remainder matched
253
+ }
254
+ }
255
+ if (bestLen === 0)
256
+ return null;
257
+ runs.push({ start: bestPos, end: bestPos + bestLen, ansLen: bestLen });
258
+ ai += bestLen;
259
+ ci = bestPos + bestLen;
260
+ }
261
+ const merged = [];
262
+ for (const r of runs) {
263
+ const last = merged[merged.length - 1];
264
+ if (last && r.start === last.end) {
265
+ last.end = r.end;
266
+ last.ansLen += r.ansLen;
267
+ }
268
+ else {
269
+ merged.push({ ...r });
270
+ }
271
+ }
272
+ return merged.length > 0 ? merged : null;
273
+ }
274
+ // ── Pipeline mechanism ──────────────────────────────────────────────────────
275
+ export const extractionMechanism = {
276
+ name: "extraction",
277
+ provenance: "extract",
278
+ async floor(_ctx, _query, pre, worthRunning) {
279
+ // Extraction's floor is always exactly CONCEPT+STEP when it exists —
280
+ // same investment discipline as CAST's (see cast.ts): when the bound
281
+ // already cannot beat the incumbent, return it UNINVESTED (never
282
+ // first-touch the climb just to be pruned).
283
+ if (!worthRunning(CONCEPT + STEP))
284
+ return CONCEPT + STEP;
285
+ if ((await pre.attention()).ranked.length === 0)
286
+ return null;
287
+ return CONCEPT + STEP;
288
+ },
289
+ async run(ctx, query, pre) {
290
+ const ex = await extractBySkill(ctx, query, pre);
291
+ if (!ex)
292
+ return [];
293
+ return [{
294
+ bytes: ex.bytes,
295
+ accounted: ex.accounted,
296
+ moves: CONCEPT + STEP * ex.accounted.length,
297
+ unexplained: ex.unexplained,
298
+ }];
299
+ },
300
+ };
@@ -0,0 +1,16 @@
1
+ import type { MindContext } from "../types.js";
2
+ import type { PipelineMechanism, Precomputed } from "../pipeline-mechanism.js";
3
+ /** A recall result. */
4
+ export interface RecallResult {
5
+ bytes: Uint8Array;
6
+ echoed: boolean;
7
+ accounted: Array<[number, number]>;
8
+ moves: number;
9
+ unexplained: string;
10
+ /** See {@link import("../pipeline-mechanism.js").MechanismResult.complete}
11
+ * — set by the IDENTITY-bridge tier alone. */
12
+ complete?: boolean;
13
+ }
14
+ /** Recall the answer by resonating the whole query against the content index. */
15
+ export declare function recallByResonance(ctx: MindContext, query: Uint8Array, pre: Precomputed): Promise<RecallResult | null>;
16
+ export declare const recallMechanism: PipelineMechanism;