Skip to main content

Module graph

Module graph 

Source
Expand description

Graph data structures for the spatial browser.

Core structures:

  • Graph: Main graph container backed by petgraph::StableGraph
  • Node: Webpage node with a transient projected position and metadata
  • EdgePayload: Edge semantics and traversal events between nodes

This module is WASM-clean: it must compile to wasm32-unknown-unknown.

Re-exports§

pub use cross_graph::ComponentCopy;
pub use pending_links::PendingLinkRetention;
pub use pending_links::PendingLinkRetry;
pub use pending_links::PendingLinkState;
pub use frozen_selection::FrozenSelection;
pub use frozen_selection::OpenedFrozenSelection;
pub use frozen_link::FrozenLinkEndpoint;
pub use frozen_link::FrozenLinkSource;
pub use frozen_link::FrozenSourceBinding;
pub use frozen_link::FrozenSourceRevision;
pub use coverage::CoverageLayer;
pub use coverage::CoverageLimit;
pub use coverage::CoverageNote;
pub use identity::EdgeKey;
pub use identity::GraphDirection;
pub use identity::GraphIndex;
pub use identity::GraphViewId;
pub use identity::NodeKey;
pub use identity::RelationKey;
pub use identity::ResourceEdgeKey;
pub use identity::SurfaceNodeKey;
pub use edge_ops::Retraction;
pub use node::Node;
pub use node::SurfaceNode;
pub use node_facets::NodeFacetStore;
pub use node_facets::VisitHistoryFacet;
pub use predicate_declarations::PredicateDeclaration;
pub use predicate_declarations::PredicateDeclarationError;
pub use predicate_declarations::PredicateDeclarations;
pub use predicate_registry::GraphStratum;
pub use predicate_registry::built_in_predicate_stratum;
pub use predicate_registry::built_in_relation_stratum;
pub use predicate_registry::default_predicate_stratum;
pub use resource::ResourceNode;
pub use history::NodeHistoryBranchAlternative;
pub use history::NodeHistoryBranchProjection;
pub use history::NodeHistoryBranchVisit;
pub use history::NodeHistoryOwner;
pub use history::NodeHistoryProjection;
pub use history::NodeHistorySemanticSummary;
pub use history::SharedNavigationMemory;
pub use capture::CapturedDelta;
pub use capture::DeltaRecorder;
pub use capture::GraphTableStats;
pub use capture::Malformed;
pub use capture::Replay;
pub use capture::ReplayRefused;
pub use capture::Unwritable;
pub use capture::replay_captured_deltas;
pub use capture::replay_captured_deltas_as_onto;
pub use capture::replay_captured_deltas_onto;
pub use capture::replay_captured_deltas_onto_checked;
pub use capture::set_captured_delta_hook;
pub use capture::with_isolated_capture;
pub use journal::AttributedDelta;
pub use journal::Author;
pub use journal::AuthorKind;
pub use journal::GraphJournal;
pub use journal::USER_AUTHOR;
pub use journal::journal_capture_hook;
pub use merge::import_edits;
pub use revert::Part;
pub use revert::Revert;
pub use revert::Touched;
pub use revert::part_edits;
pub use revert::part_node;
pub use revert::part_of;
pub use revert::part_value;
pub use revert::recreate_node_edits;
pub use revert::revert_change;
pub use source_time::SourceExtent;
pub use source_time::SourceTime;
pub use edge_data::ArrangementData;
pub use edge_data::AssertionData;
pub use edge_data::ContainmentData;
pub use edge_data::EdgeMetrics;
pub use edge_data::ImportedData;
pub use edge_data::ProvenanceData;
pub use edge_data::REL_VOCAB;
pub use edge_data::RelationAssertion;
pub use edge_data::RelationAssertionSpec;
pub use edge_data::SemanticData;
pub use edge_data::SemanticStatement;
pub use edge_data::SemanticStatementSpec;
pub use edge_data::StatementAssert;
pub use edge_data::Traversal;
pub use edge_data::TraversalData;
pub use edge_data::all_semantic_sub_kinds;
pub use edge_data::predicate_iri;
pub use edge_data::sub_kind_from_iri;
pub use edge_payload::EdgePayload;
pub use edge_taxonomy::ArrangementSubKind;
pub use edge_taxonomy::ContainmentSubKind;
pub use edge_taxonomy::EdgeAssertion;
pub use edge_taxonomy::EdgeFamily;
pub use edge_taxonomy::ImportedSubKind;
pub use edge_taxonomy::NavigationTrigger;
pub use edge_taxonomy::ProvenanceSubKind;
pub use edge_taxonomy::RelationDurability;
pub use edge_taxonomy::RelationKind;
pub use edge_taxonomy::RelationSelector;
pub use edge_taxonomy::SemanticSubKind;

Modules§

apply
assertion_handles
The one rule for assertion handles over persisted edge rows: a handle names one assertion on one row, across both strata. A repeat is refused whether or not the copy is identical. Checked load and both freezes ask here; none of them decides legality on its own.
capture
Stable-id graph-delta capture/replay helpers.
coverage
Known limits of the supplied graph, not a claim of world completeness.
cross_graph
Cross-graph node copy (tear-out fork): mints a node in this graph from a donor node in another graph, recording cross-graph derivation provenance. Cross-graph node copy — the kernel half of the tear-out “fork” / cross-graph composability gesture (tear-out brief §7.5; tearout-composability plan C4).
display
A human-meaningful display label for a node.
edge_data
Per-family edge runtime data structs and semantic IRI mapping. Extracted from edge_taxonomy.rs per the 600-LOC ceiling.
edge_ops
Edge operations — assert, replay, dissolve, retract, traversal recording.
edge_payload
One assertion list per directed bucket, plus the traversal event rollup.
edge_taxonomy
Edge taxonomy types — families, kinds, and sub-kinds.
facet_projection
PMEST facet projection — computes a queryable facet map from a node + graph context.
filter
Faceted filter expression engine.
frozen_link
Immutable, source-qualified link readings borne by Resources.
frozen_selection
Immutable selections owned by Resources, independent of local appearances.
history
Navigation history: the browse trail, in one shared visit space for the whole graph.
identity
Graph identity types and rkyv archive helpers.
import_records
Import-record operations.
journal
The edit spine: mere’s captured-delta stream as a muniment journal, replayed into the graph (the substrate’s append-only-log primitive over mere’s own edit vocabulary). See graph/journal.rs. The edit spine: mere’s captured-delta stream over the substrate log.
legacy_content_migration
Historical content placement alongside the legacy relation adapter.
legacy_resource_migration
Explicit legacy replay. Ordinary replay keeps its recorded stores. The caller must establish a legacy placement profile before using this adapter.
merge
Importing one graph into another as edits: what a codicil import writes into a session’s journal.
node
A browsing surface around chartulary’s neutral Container.
node_facets
Typed projections over the graph’s atomic per-node facet store.
node_props
Node-property setters and per-node query accessors.
pending_links
Rebuildable extraction inputs, separate from graph truth and replay.
predicate_declarations
Per-mere predicate nature, recorded as ordinary resource metadata.
predicate_registry
Fixed placement catalog. Effective custom placement must also consult the mere’s durable declarations; these defaults do not resolve those declarations.
query
Graph query + traversal — node / edge lookups, neighbor iteration, BFS / shortest-path / connected-components / SCC, and the derived-edge views (semantic / arrangement / containment).
resource
Resource identity beneath browsing surfaces.
resource_classifications
Complete classification variants, retained origins and exact review edits.
resource_content
Typed, recorded content on shared resources. Unknown facets remain untouched.
resource_properties
Shared literal assertions with exact handles and per-asserter deduplication.
resource_tags
Identity-scoped tag concepts and separately attributable tagging assertions.
revert
Reverting one change: undo’s edits and the parts it keeps (reservoir plan V2). Reverting one change: the edits that put back what a change altered, leaving alone whatever changed after it.
snapshot
Graph snapshot serialization.
source_time
Source-time selection, distinct from projected-scene delivery revisions.

Structs§

ArchivedDissolvedTraversalRecord
An archived DissolvedTraversalRecord
ArrangementEdgeView
ContainmentEdgeView
ContentHash
The stable address of a node’s out-of-line representation. A blake3 content hash. Stable: the same bytes always hash the same, on every platform.
Coupling
One coupling rule: identity + target field + selector + response + strength.
CouplingId
Stable identity for a coupling rule.
DissolvedTraversalRecord
Traversal archive payload emitted when dissolving a node.
DissolvedTraversalRecordResolver
The resolver for an archived DissolvedTraversalRecord
EdgePathRule
Per edge-kind path-generation rule.
Field
A field as kernel truth: identity + portable definition + extent + lifecycle.
FieldId
Stable, federatable field identity. UUID-backed and canonical for graph truth.
Graph
Main graph structure backed by petgraph::StableGraph
GraphInputKey
LogId
A stable identity for a log. Caller-chosen (a name, a URN, a hash you already hold), so identity is deterministic and needs no randomness source.
NavigationIndexError
An index in the navigation snapshot that names no row of its column.
RelationView
Canonical read-side relation view. One row per (from, to, RelationKind) — a multi-relation node pair yields multiple rows. Replaces the EdgeType-flavoured EdgeView removed in stage 4 of the 2026-05-11 relation-taxonomy plan.
SemanticEdgeView
Seq
The position of an entry in a Journal. Zero-based: the first appended entry is Seq(0).
SurfaceNodeLifetime
One live surface membership. Cloning a graph preserves it; removing and recreating a member creates a new witness, even with the same UUID/key. Snapshot materialization starts new runtime lives. There is no numeric or serialization API: durable identity remains the member UUID.

Enums§

CouplingResponse
How a node responds to a field at its position.
EdgePath
How an edge’s path is generated between its two endpoints.
Falloff
Falloff shape for spatially-bounded scalar kernels (e.g. ScalarField::Disk).
FieldDefinition
A field’s portable definition: scalar- or vector-valued. The AST is data; numen evaluates it.
FieldExtent
Where a field applies. (Region is an axis-aligned world-space box, kept as four scalars to stay rkyv-friendly at the DTO layer without a Box2D archive helper.)
FieldLifecycle
Field lifecycle state. Mirrors the spirit of NodeLifecycle: a field is authored (Active) and can be retired without losing its definition for history/federation. Richer states (Warm/Cold equivalents) are deferred.
NodeHistoryTransitionKind
How an owner moved to a visit: navigation vocabulary.
NodeSelector
Selects which nodes a coupling applies to. Tag and kind names are opaque here — they resolve against the node’s tags / classifications.
ScalarField
A scalar field expression. Recursive cases use Box to keep the enum sized.
StatementWriteError
VectorField
A vector field expression.

Constants§

COUPLING_VOCAB
Base IRI for Mere’s coupling-response vocabulary (the statements-over-schema substrate applied to responses). The recognized force core maps to {COUPLING_VOCAB}{slug} via CouplingResponse::recognized_iri; the families beyond force name themselves under sub-namespaces, e.g. …/coupling#visual/highlight, nav/focus, selection/member, semantic/assert, trigger/fire. Provisional base; mirrors [crate::graph::edge_taxonomy]’s REL_VOCAB.