/** * Capsule declaration locking {@link addressDocumentGraph} — the DocumentGraph * addressing kernel — as a standing `pureTransform` contract. Where * `graph-patch-identity.ts` proves the structural differ inverts itself, this * pins the addressing kernel's THREE standing laws: determinism (same graph → * same address), format (the `fnv1a:` brand), and — the regression guard for the * `localeCompare → code-unit` fix (CUT B1) — locale-INDEPENDENCE: the address is * a function of the graph's content MULTISET, never the authoring/insertion order * of its nodes. Shuffling the seed's inputs must not fork identity. * * WHY `pureTransform`: `sealGraph` is a pure function of its payload — canonical * CBOR over sorted node ids + sorted edges, then fnv1a. No receipt byte law, no * mutate channel; the determinism law is exactly the pure-transform fit. * * WHY THE INPUT IS SEED MATERIAL (mirroring graph-patch-identity): a * `DocumentGraph` is content-addressed — its node `id`s and graph `id`/`digest` * are minted ONLY through `sealNode`/`sealGraph`, which a schema-arbitrary cannot * produce. So the input schema generates a small, fully-supported SEED domain * (axis-name lists + acyclic edge index pairs) and `run` SEALS it into a real, * valid graph through the one kernel. The invariants then assert over that REAL * sealed graph's address, never a weakened stand-in. * * @module */ import { Schema } from 'effect'; import type { DocumentGraph, SignalNode } from '../document-graph.js'; /** * Seed material the schema-arbitrary CAN produce (String/Array/Tuple/Number are * fully-supported AST nodes): a graph described by its signal-axis name list plus * acyclic edge index pairs. `run` seals this into a real graph. */ declare const GraphAddressSeed: Schema.Struct<{ /** Signal-axis names → one sealed `SignalNode` per DISTINCT name. */ readonly inputs: Schema.$Array; /** `[i, j]` index pairs → a `from`→`to` edge between sealed nodes (normalized acyclic). */ readonly edges: Schema.$Array>; }>; type GraphAddressSeedValue = Schema.Schema.Type; /** Seal a minimal Signal node keyed by its input axis (its id is minted from the payload). */ declare function signalNode(input: string): SignalNode; /** * Build a real, sealed, structurally-VALID graph from a seed. Distinct inputs * dedup to distinct nodes; edge index pairs are normalized to `min → max` over * the node list (so every endpoint exists and the graph stays acyclic, never a * self-loop), keeping the seal honest without weakening it. */ declare function buildGraph(seed: GraphAddressSeedValue): DocumentGraph; /** * A DETERMINISTIC AUTHORING-ORDER perturbation of an ALREADY-SEALED graph: * reverse the `nodes` and `edges` arrays and re-seal. This preserves the content * MULTISET exactly — the same sealed node identities, the same directed edges * between the same identities — and changes ONLY the authoring/insertion order of * the arrays. That is precisely the axis the code-unit sort (CUT B1) must be * invariant to. (Perturbing the SEED instead would re-index edges and could flip * a directed endpoint, genuinely forking the graph — so we perturb post-seal.) * Pure (no RNG) so the property test never flakes. */ declare function reorderGraph(graph: DocumentGraph): DocumentGraph; /** * Declared capsule for the DocumentGraph addressing kernel. Registered in the * module-level catalog at import time; walked by the factory compiler. The * generated property test feeds schema-seeds, `run` seals a real graph and reads * its address, and the invariants assert determinism / format / order-independence * over the REAL sealed address. The bench measures real addressing latency * (O(nodes) — scales with the arbitrary's graph sizes). */ export declare const documentGraphAddressCapsule: import("../assembly.js").CapsuleDef<"pureTransform", { readonly edges: readonly (readonly [number, number])[]; readonly inputs: readonly string[]; }, unknown, unknown>; /** Internal helpers exported for direct unit assertions over the seed→graph builder. */ export declare const _documentGraphAddressInternals: { readonly buildGraph: typeof buildGraph; readonly reorderGraph: typeof reorderGraph; readonly signalNode: typeof signalNode; }; export {}; //# sourceMappingURL=document-graph-address.d.ts.map