omgbase-surface
The omgbase surface, Rust implementation of spec/surface:
what a client sees of an omgbase repository.
- The query binding (
context,query): anoqxDataContextoveromgbase_store::Store— thedocs/blocks/nodes/edgesroots,$repo, the per-target intrinsics, reach-through and relations, the property rule (spec/properties), the row functions (text,under,within,has_edge,semantic, …) — and the §1.4 runner:{ id, path }injection,distinctby projection, top-levellimit/offset, keyset paging with the base64url cursor,values, the consumer scalars, error normalization tofilter_invalid. Every query runs on the in-memory engine (the pushdown planner is a follow-up; a planner must be invisible). - Reads (
read):resolve_ref,docs_read(_many),docs_read_at,nodes_get(_many)at the five resolutions, thedocs_outlinewire format,docs_list/docs_treepaging. - History (
history):history_node, block-graindiff, the positionaldiff_unified,docs_history;changes_sinceis the store's. - The tool catalog (
catalog):Surface— every tool of the §4 table with its JSON-schema input, repo scoping by slug, server-side ref and heading resolution, CAS pinning, the{ error, message, data?, retriable }envelope,origin.actor = "agent:mcp", a post-mutation hook that dry runs never fire. Transport-agnostic: theomgbasebinary serves it over MCP stdio.
use Store;
use Surface;
use json;
let mut store = open_in_memory?;
let repo = store.create_repo?;
let mut surface = new;
surface.call;
let res = surface.call;
assert_eq!;
# Ok::
Conformance
tests/spec.rs runs every fixture under spec/surface/cases: the
corpus-backed query suites (the reference's alchemy repository observed with
the fixture minter), reads.json (observation scripts whose read steps
call the catalog in-process) and cursor.json. While the port runs behind
the fixtures, tests/spec-passing.txt names the cases that must pass;
SURFACE_SPEC_UPDATE=1 cargo test -p omgbase-surface --test spec rewrites
it. SPEC_VERSION tracks spec/surface/VERSION.
License
MIT.