The Kynetra Lexicon
The language you write and read KynetraDB with — 100 terms, each mapped to what it really does.
Two primitives
Every write is an append to one log. Nothing is ever updated in place.
// One log. Every write lands at the tail.
APPEND products {
id: "sku-1024",
attrs: { title: "Trail Runner", price: 129 },
EMBED: [0.02, -0.91, ...] // vector attached at write time
}
SEAL // fsync — durable past crash Every read is served from state rebuilt by replaying that same log.
// Read shapes all resolve against one replayed state. FETCH products "sku-1024" // by id SEARCH products "trail running" // BM25 full-text NEAR products EMBED(query) TOPK 10 // vector cosine FUSE products "trail" + EMBED(query) // hybrid, rank-fused TAIL products FROM seq:48213 // follow the log
The lexicon
Write
The log-write verbs. Every mutation is an append; history is never rewritten.
Write a new record to the tail of the log — the atomic unit of durability.
maps to INSERT
Create or replace an entity by id.
maps to UPSERT
Merge fields into an existing entity without rewriting the whole record.
maps to UPDATE
Retire an entity by writing a tombstone — the log records the deletion, never erases it.
maps to DELETE
Force pending writes to durable storage.
maps to COMMIT / fsync
Group writes so they apply atomically or not at all.
maps to TRANSACTION
Attach a vector embedding to an entity at write time.
maps to vector column write
Label a record with a kind for routing and isolation.
maps to set type / label
The monotonic sequence and timestamp the log assigns each record.
maps to LSN + ts
Issue a new unique id for an entity.
maps to generate primary key
Read
The retrieval verbs. All of them resolve against state replayed from the log.
Read a single entity by id.
maps to SELECT by PK
Read a range or page of entities in log order.
maps to SELECT … LIMIT/OFFSET
Return entities matching a predicate.
maps to WHERE
Number of entities matching a query.
maps to COUNT(*)
Return only a chosen subset of fields.
maps to SELECT columns
Resolve related entities inline in one read.
maps to JOIN / embed
Follow the log forward from an offset — the streaming read primitive.
maps to CDC / change feed
Rebuild in-memory state by re-reading the log from the start.
maps to WAL replay
A consistent point-in-time view of the state.
maps to snapshot read
Read without advancing a cursor or causing side effects.
maps to non-consuming read
Search & Rank
Relevance, in-process. Full-text and vector share one ingest — no second service.
Full-text BM25 query over indexed text.
maps to full-text search
Vector nearest-neighbour search by cosine similarity.
maps to ANN / vector search
Combine text and vector results with reciprocal rank fusion.
maps to hybrid search
The relevance ordering applied to results.
maps to ORDER BY score
The numeric relevance of a single hit.
maps to rank score
Fraction of true neighbours an approximate search returns.
maps to recall@k
Case and accent normalization applied before indexing.
maps to text normalization
The unit of indexed text.
maps to term
The number of results a query asks for.
maps to k / LIMIT
The derived structure that makes a query shape fast (BM25, HNSW).
maps to index
Cache
Read-shaped requests warmed at the edge, invalidated the instant a write lands.
Preload a query result into the edge cache before it is asked for.
maps to cache warm
Keep an entry resident, exempt from eviction.
maps to pin
Remove an entry to reclaim space.
maps to evict
Invalidate cached entries by tag — fired automatically on mutation.
maps to invalidate
An entry past its freshness window.
maps to stale
An entry still within its TTL.
maps to fresh
A request served from cache.
maps to cache hit
A request that fell through to origin.
maps to cache miss
How long an entry stays fresh before revalidation.
maps to ttl
Refresh a stale entry in the background while still serving it.
maps to stale-while-revalidate
Replicate & Cluster
One primary assigns sequence; many replicas tail the same log and serve reads.
One primary log read by many replicas.
maps to replication
The single node that assigns sequence and accepts writes.
maps to leader
A read-only node tailing the primary log.
maps to read replica
How many records a replica trails the primary by.
maps to replication lag
Turn a replica into the primary.
maps to failover promote
A replica forwarding a write to the primary.
maps to write forwarding
The live map of primary and replicas.
maps to cluster topology
The periodic liveness signal between nodes.
maps to heartbeat
Divergence between a replica state and the primary.
maps to divergence
The geographic pool a read is routed to at the edge.
maps to regional routing
Log & Storage
The append-only log is the single source of truth. Everything else is derived.
The append-only sequence that is the one source of truth.
maps to WAL
The monotonic position of a record in the log.
maps to LSN / offset
A cursor position within the log.
maps to offset
A contiguous chunk of the log on disk.
maps to WAL segment
A periodic durable snapshot that bounds replay time.
maps to checkpoint
Reclaim space by dropping superseded records.
maps to compaction
The log marker for a deleted entity.
maps to tombstone
Cut the log back to a sequence.
maps to truncate
Where the log physically lives — file, Postgres, or D1.
maps to storage engine
Written past the point of loss on crash.
maps to fsynced
Shape & Schema
Entities are kind-prefixed, so cross-tenant reads are impossible by construction.
The type that partitions entities and enforces isolation.
maps to table / type
One record: id, attrs, and an optional embedding.
maps to row / document
The JSON payload of an entity.
maps to columns / fields
A typed attribute within a collection schema.
maps to column
A named, schema-bound set of entities.
maps to table
A collection schema — fields, types, and rules.
maps to schema
An access predicate on a collection.
maps to RLS policy
A link from one entity to another.
maps to foreign key
A latitude/longitude point field.
maps to geo point
Evolve a collection shape over time.
maps to migration
Identity & Access
Service keys bypass rules; user JWTs and anon keys respect them transparently.
A bearer credential that authorizes a caller.
maps to API key
Give a role a capability.
maps to GRANT
The boundary a token or role may act within.
maps to scope
A named permission set — User, Admin, SuperAdmin.
maps to role
An assertion inside a JWT — sub, role, exp.
maps to JWT claim
Replace a key while briefly accepting the old one.
maps to key rotation
Invalidate a token or grant.
maps to revoke
An unauthenticated identity with restricted rights.
maps to anonymous
The authenticated subject id rules evaluate against.
maps to auth.uid()
The auth check a request must pass before it runs.
maps to auth middleware
Operations & Health
A node proves it can serve, not just that the process is up.
A health check that proves a node can actually serve.
maps to health probe
A circuit breaker that fails fast on a downed dependency.
maps to circuit breaker
The tamper-evident hash-chained record of every admin mutation.
maps to audit log
The hash links that make the audit tamper-evident.
maps to hash chain
p50 / p95 / p99 request latency.
maps to latency percentile
The bounded buffer of recent latency samples.
maps to ring buffer
Rate-limit a caller at the edge.
maps to rate limit
The edge guard filtering IPs, user-agents, and headers.
maps to WAF
The state where a node can accept traffic.
maps to readiness
Serving, but with a failing check.
maps to degraded
Connect & Edge
One engine, many ways in — SDK, REST, MCP, CLI, and serverless edge bridges.
A serverless worker that speaks the API over a Cloudflare store.
maps to edge adapter
The Cloudflare POP layer in front of the origin.
maps to edge / CDN
The typed client — @kynetra/client.
maps to client library
The JSON-RPC tool surface agents connect through.
maps to MCP server
The CLI remote protocol to a node.
maps to remote CLI
An outbound webhook fired when a mutation lands.
maps to webhook
HMAC-sign a webhook payload so the receiver can verify it.
maps to payload signing
The node the edge forwards a request to.
maps to origin server
The rule mapping a hostname or path to a worker.
maps to route
An outbound destination the log streams to.
maps to CDC sink