import type { MindContext, Recognition, Segment } from "./types.js"; /** Decompose a byte stream into every stored form that leads somewhere * (has a continuation edge or a halo). Two complementary readings: * * • structural — walk the query's own perceived tree, naming each subtree * by findLeaf at the leaves and findBranch above. Catches every form * aligned to the query's segmentation. * * • canonical — re-derive the store's segmentation directly: at each byte, * the longest known leaf, chained into flat branches. Names forms the * query's own cut cannot, and records sub-leaf boundaries as `splits`. * * Both O(n · maxGroup) bounded O(1) probes — never a scan of the corpus. * * ONE READING PER BYTE STREAM, deliberately: there is no "cheap mode" that * skips * the edge-trim fallbacks. A `trimmed` variant was tried and REFUTED twice * over. Its premise — "the trims only recover misaligned FRAGMENTS, so a * consumer whose gate rejects fragments loses nothing" — is false: the * left/right trim loops below exist precisely to find WHOLE trained forms * embedded at an offset the query's own fold did not cut, and such a form has * no structural parents or containers, so it passes the pivot's fragment gate * and is exactly the candidate a multi-hop chain steps through. Skipping them * narrows the pivot's evidence silently. And a per-caller variant has to key * the memo by the variant, which breaks the "computed at most once" property * (memoization.md): the pipeline recognises a grounded answer untrimmed for * `preConsumed`, and the pivot then recognises the same bytes again — the * saving inverts into a doubling on the path it was measured for. */ export declare function recognise(ctx: MindContext, bytes: Uint8Array): Recognition; /** Segment bytes using the geometry's own groupings — leaf-parent * nodes from the perceived tree, with consecutive bare leaves merged * into one segment. Each segment's gist is perceived from its bytes * IN ISOLATION, so the same content has the same gist regardless of * where it appears. */ export declare function segment(ctx: MindContext, bytes: Uint8Array): Segment[];