The Kynetra Lexicon

The language you write and read KynetraDB with — 100 terms, each mapped to what it really does.

APPEND

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
REPLAY

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

Write

The log-write verbs. Every mutation is an append; history is never rewritten.

APPEND write live

Write a new record to the tail of the log — the atomic unit of durability.

maps to INSERT

PUT write live

Create or replace an entity by id.

maps to UPSERT

PATCH write live

Merge fields into an existing entity without rewriting the whole record.

maps to UPDATE

DROP write live

Retire an entity by writing a tombstone — the log records the deletion, never erases it.

maps to DELETE

SEAL write live

Force pending writes to durable storage.

maps to COMMIT / fsync

BATCH write live

Group writes so they apply atomically or not at all.

maps to TRANSACTION

EMBED write live

Attach a vector embedding to an entity at write time.

maps to vector column write

TAG write live

Label a record with a kind for routing and isolation.

maps to set type / label

STAMP concept live

The monotonic sequence and timestamp the log assigns each record.

maps to LSN + ts

MINT write live

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.

FETCH read live

Read a single entity by id.

maps to SELECT by PK

SCAN read live

Read a range or page of entities in log order.

maps to SELECT … LIMIT/OFFSET

FILTER read live

Return entities matching a predicate.

maps to WHERE

COUNT read live

Number of entities matching a query.

maps to COUNT(*)

PROJECT read live

Return only a chosen subset of fields.

maps to SELECT columns

EXPAND read live

Resolve related entities inline in one read.

maps to JOIN / embed

TAIL read live

Follow the log forward from an offset — the streaming read primitive.

maps to CDC / change feed

REPLAY concept live

Rebuild in-memory state by re-reading the log from the start.

maps to WAL replay

SNAPSHOT read live

A consistent point-in-time view of the state.

maps to snapshot read

PEEK 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.

SEARCH read live

Full-text BM25 query over indexed text.

maps to full-text search

NEAR read live

Vector nearest-neighbour search by cosine similarity.

maps to ANN / vector search

FUSE read live

Combine text and vector results with reciprocal rank fusion.

maps to hybrid search

RANK read live

The relevance ordering applied to results.

maps to ORDER BY score

SCORE concept live

The numeric relevance of a single hit.

maps to rank score

RECALL concept

Fraction of true neighbours an approximate search returns.

maps to recall@k

FOLD concept live

Case and accent normalization applied before indexing.

maps to text normalization

TOKEN concept live

The unit of indexed text.

maps to term

TOPK read live

The number of results a query asks for.

maps to k / LIMIT

INDEX concept live

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.

WARM concept live

Preload a query result into the edge cache before it is asked for.

maps to cache warm

PIN concept

Keep an entry resident, exempt from eviction.

maps to pin

EVICT concept

Remove an entry to reclaim space.

maps to evict

PURGE both live

Invalidate cached entries by tag — fired automatically on mutation.

maps to invalidate

STALE concept live

An entry past its freshness window.

maps to stale

FRESH concept live

An entry still within its TTL.

maps to fresh

HIT read live

A request served from cache.

maps to cache hit

MISS read live

A request that fell through to origin.

maps to cache miss

TTL concept live

How long an entry stays fresh before revalidation.

maps to ttl

REVALIDATE concept live

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.

FAN-OUT concept live

One primary log read by many replicas.

maps to replication

PRIMARY concept live

The single node that assigns sequence and accepts writes.

maps to leader

REPLICA concept live

A read-only node tailing the primary log.

maps to read replica

LAG concept live

How many records a replica trails the primary by.

maps to replication lag

PROMOTE concept

Turn a replica into the primary.

maps to failover promote

PROXY write live

A replica forwarding a write to the primary.

maps to write forwarding

TOPOLOGY read live

The live map of primary and replicas.

maps to cluster topology

HEARTBEAT concept live

The periodic liveness signal between nodes.

maps to heartbeat

DRIFT concept

Divergence between a replica state and the primary.

maps to divergence

REGION read live

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.

LOG concept live

The append-only sequence that is the one source of truth.

maps to WAL

SEQ concept live

The monotonic position of a record in the log.

maps to LSN / offset

OFFSET concept live

A cursor position within the log.

maps to offset

SEGMENT concept

A contiguous chunk of the log on disk.

maps to WAL segment

CHECKPOINT concept live

A periodic durable snapshot that bounds replay time.

maps to checkpoint

COMPACT concept

Reclaim space by dropping superseded records.

maps to compaction

TOMBSTONE concept live

The log marker for a deleted entity.

maps to tombstone

TRUNCATE write live

Cut the log back to a sequence.

maps to truncate

BACKEND concept live

Where the log physically lives — file, Postgres, or D1.

maps to storage engine

DURABLE concept live

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.

KIND concept live

The type that partitions entities and enforces isolation.

maps to table / type

ENTITY concept live

One record: id, attrs, and an optional embedding.

maps to row / document

ATTRS concept live

The JSON payload of an entity.

maps to columns / fields

FIELD concept live

A typed attribute within a collection schema.

maps to column

COLLECTION concept live

A named, schema-bound set of entities.

maps to table

SHAPE concept live

A collection schema — fields, types, and rules.

maps to schema

RULE concept live

An access predicate on a collection.

maps to RLS policy

RELATION concept live

A link from one entity to another.

maps to foreign key

GEO concept live

A latitude/longitude point field.

maps to geo point

MIGRATE write live

Evolve a collection shape over time.

maps to migration

Identity & Access

Service keys bypass rules; user JWTs and anon keys respect them transparently.

TOKEN concept live

A bearer credential that authorizes a caller.

maps to API key

GRANT write live

Give a role a capability.

maps to GRANT

SCOPE concept live

The boundary a token or role may act within.

maps to scope

ROLE concept live

A named permission set — User, Admin, SuperAdmin.

maps to role

CLAIM concept live

An assertion inside a JWT — sub, role, exp.

maps to JWT claim

ROTATE both live

Replace a key while briefly accepting the old one.

maps to key rotation

REVOKE write live

Invalidate a token or grant.

maps to revoke

ANON concept live

An unauthenticated identity with restricted rights.

maps to anonymous

UID concept live

The authenticated subject id rules evaluate against.

maps to auth.uid()

GATE concept live

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.

PROBE read live

A health check that proves a node can actually serve.

maps to health probe

BREAKER concept live

A circuit breaker that fails fast on a downed dependency.

maps to circuit breaker

AUDIT read live

The tamper-evident hash-chained record of every admin mutation.

maps to audit log

CHAIN concept live

The hash links that make the audit tamper-evident.

maps to hash chain

PERCENTILE read live

p50 / p95 / p99 request latency.

maps to latency percentile

RING concept live

The bounded buffer of recent latency samples.

maps to ring buffer

THROTTLE concept live

Rate-limit a caller at the edge.

maps to rate limit

WAF concept live

The edge guard filtering IPs, user-agents, and headers.

maps to WAF

READY concept live

The state where a node can accept traffic.

maps to readiness

DEGRADED concept live

Serving, but with a failing check.

maps to degraded

Connect & Edge

One engine, many ways in — SDK, REST, MCP, CLI, and serverless edge bridges.

BRIDGE concept live

A serverless worker that speaks the API over a Cloudflare store.

maps to edge adapter

EDGE concept live

The Cloudflare POP layer in front of the origin.

maps to edge / CDN

SDK both live

The typed client — @kynetra/client.

maps to client library

MCP both live

The JSON-RPC tool surface agents connect through.

maps to MCP server

WIRE both live

The CLI remote protocol to a node.

maps to remote CLI

HOOK concept live

An outbound webhook fired when a mutation lands.

maps to webhook

SIGN concept live

HMAC-sign a webhook payload so the receiver can verify it.

maps to payload signing

ORIGIN concept live

The node the edge forwards a request to.

maps to origin server

ROUTE concept live

The rule mapping a hostname or path to a worker.

maps to route

SINK write live

An outbound destination the log streams to.

maps to CDC sink