Readonly[ReadonlychangedFires whenever local registry contents change (add, remove, or clear).
ReadonlyidStable per-instance identifier. Used to key process-local resources (e.g. memoized reactive atoms) to a specific registry instance, analogous to Database.spaceId.
ReadonlylocalAll locally-stored entities. Does not include upstream entities — use list for that.
Run an ECHO query against the registry's entities (implements Database.Queryable).
Matching happens in-memory over list. Scope (from) clauses are unwrapped and
ignored — a direct registry query always targets the registry's own entities. The primary
way to query registry contents is still through the database (db.query(...).from(Scope.registry())),
which fans the database and registry together; this method is for querying a registry directly.
Only locally-evaluable AST nodes are supported: select, filter, limit, from, options,
and boolean combinators, plus full-text filters as case-insensitive all-terms containment.
Server-side concerns (order, traversal, vector search, timestamp filters) throw or match nothing.
Get an entity by one of its addressing URIs — a type entity by its typename DXN (or, when
persisted, its identifier EID), a keyed entity by its dxn:<key>[:<version>]. Accepts legacy
DXN forms (normalized internally). Searches the local registry first, then falls back to the
upstream registry. Narrow the result with Type.isType when a type entity is required.
Composable, in-memory registry of keyed ECHO entities.
Entities are stored by id and queried via the standard ECHO Query API. A registry may delegate to an optional upstream registry: results from the local registry take precedence and upstream results fill in anything not found locally.
Intended use cases include caches of schemas, operations, skills, routines, plugins, etc., sourced from 3rd-party plugins, local code, or local space objects.
Types (schema-definition entities produced by
Type.makeObject/Type.makeRelation) are stored the same way as any other entity — viaadd(). Uselist().filter(Type.isType)to retrieve them.Scope: a Registry is independent of any ECHO space or Hypergraph — it is a process-local, in-memory cache. Wire one per space (e.g. as a Layer scoped to the space's Effect runtime) or share a single instance across spaces depending on the use case.
The concrete implementation (and the
makeRegistry/registryLayerfactories) lives in@dxos/echo-client; this module declares only the interface so that the@dxos/echoAPI surface stays free of query-matching dependencies.