Metakit / API

@doeixd/metakit/graph

Static dependency graph, SSR live-frontier pruning, and dependent-query readiness (@doeixd/metakit/graph).

Browser code that only needs path matching should import @doeixd/metakit/graph/match (which imports only path.ts and never loads ops/residualize or sqlLowering).

Functions

addressesOverlapTrue when two PathAddresses live in the same namespace and overlap by prefix.
affectedTagsGiven a record of transition footprints { [Tag]: { writes } } and a reader's reads (Option.none() when unknown), return the tags whose writes can affect…
analyzeThin call over Graph.build for a Machine and a record of named view Expr bindings.
buildBuild the indexed DependencyGraph once from writers, readers, and optional row -> model bridge links.
formatAddressFormat a PathAddress for diagnostics and explanations.
knownEdgeConvenience constructor for a known PathEdge.
minimizePathsDeduplicate and minimize a list of paths: ['account'] subsumes ['account', 'balance'], and ['todos', '*'] subsumes ['todos', '0', 'title']. A concrete…
modelPathThe PathAddress of the Model path (Path.forSchema(Model).todos).
pathsOverlapTrue when a and b overlap in either direction (a is a prefix of b or b of a).
pruneStaticPartially evaluate every binding against a known staticSlice (e.g. feature flags, tenant config, or server-only constants), separating fully folded…
rowPathThe PathAddress of path, a field path of the row set entity.
unknownEdgeConvenience constructor for an unbounded 'unknown' edge.
writesOverlapReadsWhether a transition's writes can affect a reader with reads.

Interfaces

DependencyGraph
GraphAnalysis
PathEdgeA single read or write edge. path: Option.none() with knowledge: 'unknown' is unbounded.
PrunedBindings
ReaderNode
RowToModelLinkBridge edge where a Remote read projects stored-row fields into a Model path (so a write to row transitively affects readers under model).
WriterNode

Types

EdgeKnowledgeHow a read or write edge was obtained. 'unknown' is never treated as empty.
OverlapReason
PathAddressUnified address for both Model paths and stored-row fields.
ReaderKind
WriterKind