import type { MindContext } from "./types.js"; import { type ClosureLayer, type DerivationState, type Span } from "./derivation.js"; import type { Precomputed } from "./pipeline-mechanism.js"; /** Extend a grounded answer forward across facts (multi-hop reasoning) — the * WALK, run as one layer of the closure engine ({@link walkLayer}). * Pivots on the longest unconsumed learnt context each answer contains, * then follows the pivot's continuation to the next fact. **The chain ends * when it STOPS, never when a count runs out**: every exit is a refusal (no * pivot, no forward step, no question material carried) and the walk is bounded * by the material and the graph — `consumed` refuses to revisit a node. There * is no hop allowance, so this doc deliberately names no `cfg` capacity: the * cover prices every hop at `STEP` and lets the search decide the depth, and a * second count here would be a second decision about the same thing. * `preConsumed` carries node ids already * spoken for by the grounding stage (cover/extract/CAST). `voiced` carries * the BYTES of the anchors a mechanism declared it voiced (its `used` set), * when it declared one — see the pivot's own containment rule. `pre` is the * response's shared pre-computation — the post-grounding stages read the * same container the mechanisms did. */ export declare function reason(ctx: MindContext, query: Uint8Array, d0: DerivationState, preConsumed: ReadonlySet, pre: Precomputed, voiced?: readonly Uint8Array[]): Promise; /** The multi-hop walk as a {@link ClosureLayer}: it OFFERS a forward absorb or a * pivot, the law admits. Its preamble — the two guards that say the question * was already answered by the query's own position in the graph, and the * pre-consumption of what the grounding spoke for — runs on the FIRST offer, * against the state the engine hands it; a guard that fires makes that first * offer `null`, so the walk ends where it begins and reports nothing more. */ export declare function walkLayer(ctx: MindContext, query: Uint8Array, preConsumed: ReadonlySet, pre: Precomputed, voiced?: readonly Uint8Array[]): ClosureLayer; /** Fuse independent points of attention into one answer (multi-topic). * When the consensus climb finds more than one dominant point, each * independent point grounds its own answer; they are bridged together * by any learnt connector the graph holds between them. */ export declare function fuseAttention(ctx: MindContext, query: Uint8Array, state: DerivationState, pre: Precomputed, unclimbed?: boolean, primarySpans?: ReadonlyArray): Promise; /** Fusion as a {@link ClosureLayer}: ONE transition, offered once — the fused * product of the independent points of attention, or nothing. The law admits * it (`reaches`: the fusion composed structure this derivation had not stood * on); the layer's own structural gates below decide whether there is a * fusion to offer at all. */ export declare function fusionLayer(ctx: MindContext, query: Uint8Array, pre: Precomputed, /** True when `primary` never touched the consensus climb at all — e.g. a * pure ALU computation, which has no anchor of its own. commitVotes * ALWAYS admits the dominant root regardless of its vote (attention.ts: * "roots.length === 0 || …") on the assumption a lone root already IS * primary's own source; that assumption is exactly backwards when * primary is unclimbed. Absent or false preserves the original * behaviour exactly. */ unclimbed?: boolean, /** The query spans `primary`'s own grounding stands on — used ONLY to place * primary in the fused reading order (see below). Resolved by the caller, * which is the layer that knows how a given grounding records its evidence; * fuseAttention just reads a position from it. Empty or absent preserves * the original behaviour exactly. */ primarySpans?: ReadonlyArray): ClosureLayer;