Glossary
Canonical terms used across the @pleach/* runtime and its sibling packages.
When the docs disagree with a published package README, the README
wins — these definitions are aligned with the public state of each
@pleach/* package as of the most recent cut. The six clusters
below orient you to the substrate; the A-Z reference further down
is the lookup table. Where a term means less here than the bare word
implies, the entry says so and links to the page carrying the full
limit.
Concept clusters
Lifecycle
The four-stage path a turn walks from intent to terminal message.
- Stage lattice — The four-stage agent graph topology —
anchor-plan | tool-loop | synthesize | post-turn. See full entry. - Anchor-plan — The first stage — intent detection, plan generation, anchor messages. See full entry.
- Tool-loop — The second stage — iterative LLM-decision and tool-execution that may self-loop until the plan resolves. See full entry.
- Synthesize — The user-facing final-answer call class, capped at one per turn by default. See full entry.
- SessionRuntime — Per-session entry point owning the compiled graph, the channels, and the lifecycle. See full entry.
Routing
How a call class binds to a model family at session start and stays bound.
- CallClass — One of
utility,reasoning,converse, orsynthesize— discriminates internal calls from user-facing answer composition. See full entry. - Family — Semantic provider origin locking tokenizer, prompt-cache key, tool-call dialect, and refusal pattern at session start. See full entry.
- Family-strict cascade — Provider fallback policy walking in-family rungs only; cross-family widening is consumer-initiated. See full entry.
- Matrix — The
(ProviderFamily × CallClass)resolution table — authoritative for what model fires for what call class. See full entry. - ProviderSeam — Per-
CallClassseam contract for LLM invocation, exactly one per call class per runtime. See full entry. - Seam — Boundary between subsystems with a typed contract; the stream-observer contract lives at the seam boundary. See full entry.
- Native — A provider transport that calls the provider's official SDK directly. See full entry.
State
The typed reactive slots and persistence backends carrying turn state.
- Channel — Typed reactive state slot inside the compiled graph with per-kind concurrent-write semantics. See full entry.
- Checkpointer — Swappable backend persisting graph state snapshots so the runtime can time-travel via
checkpoint()/restore(). See full entry. - Adapter — Concrete implementation of an interface for a specific vendor — storage adapters, checkpoint savers, and provider transports. See full entry.
- Fork — A new
SessionRuntimesharing its parent's event log up to a cutoff and running independently after. See full entry. - Event-granular fork — Forking a session at any specific event, not only at checkpoint boundaries. See full entry.
Audit & determinism
The append-only record and the contract that lets it replay without drift.
- Event log — Append-only record of observable events in a session — messages, tool calls, interrupts, exports. See full entry.
- Determinism — A recorded session replayed against the same package version and input re-serves its recorded fingerprint stream; drift raises
ReplayDivergenceError. See full entry. - Replay — Re-running a recorded turn against the same package version and input;
@pleach/replayships strict mode. See full entry. - Strict mode —
@pleach/replay's mode that fails on any divergence between recorded and replayed events. See full entry. - Hash chain — A previous-row hash and a row hash on each event log row; verification reports the first index where the chain breaks. See full entry.
- Attestation — Signable manifest of a Pleach run's metadata — models, prompts, tools, event-chain hash; signed through the key store you provide (KMS/Vault). See full entry.
- Verification — Running chain and determinism verifiers over a recorded session. See full entry.
Extension
The consumer contracts for adding tier nodes, observers, contributors, and redaction.
- HarnessPlugin — Consumer extension contract — registers tier nodes, stream observers, prompt contributors, and redaction gates without rewriting the lattice. See full entry.
- Stream observer — Per-chunk dispatch on the inbound provider stream returning
continue,amend,emit, orhalt. See full entry. - Redaction gate — Contract for transforming or dropping data before provider calls, per-message granularity. See full entry.
- Scrubber — Redaction-gating step at the
EventLogWriterwrite site declaring an event-type allowlist. See full entry. - KeyedRegex — Parameterized regex scrubber consumers extend for custom regulated identifiers like MRN or EIN. See full entry.
- Facet — Named accessor grouping related runtime methods —
runtime.tenant.idreplacesruntime.getTenantId(). See full entry.
Observability
The spans, OTEL hook, and tenant attribute the substrate emits for trace queries.
- OTEL — OpenTelemetry — Pleach exposes an OTEL adapter hook so spans cover session boundaries and per-call seams. See full entry.
- OTel span types — The four core spans emitted —
session.turn,llm.invocation,graph.stage,tool.execution— plusllm.attemptandsubagent.run. See full entry. pleach.tenant_id— OTel attribute set on every emitted span whenruntime.tenantis configured. See full entry.- Tenant — Scoping unit carried as
organizationIdon every event and every audit row for single-predicate ledger queries. See full entry.
A
Adapter — A concrete implementation of an interface for a specific vendor. Storage adapters, checkpoint savers, and provider transports are all examples. Adapters live in the package that owns their interface.
Anchor-plan — The first stage of the four-stage lattice. The turn boots here: intent detection, plan generation, anchor messages.
Attestation — A signable manifest of a Pleach run's metadata
(models used, prompts, tools, event-chain hash). Issued by
@pleach/compliance; signing uses the key store you provide
(KMS/Vault). @pleach/core performs no signature verification, and
no revocation check happens. The issue timestamp is asserted by the
signer's own clock, so an operator holding the key can set any time.
The manifest reports what was wired, never what is reachable. See
Attestation.
Audit ledger — The append-only record of every provider decision
in a session: the call class, the family and model resolved, the
outcome, and token usage. Written by a ProviderDecisionLedger
implementation. The shipped default writes nowhere, so an unwired
runtime records nothing, and the TamperEvidence and GDPRSoftDelete
plug-points ship as reference-only no-ops. It is not a message
archive. See Audit ledger.
B
BYOK — Bring Your Own Key. Provider credentials supplied by
the consumer rather than by Pleach. Available transports include
byok-native and byok-openrouter.
C
Cache backend — Runtime-side memoization of prepared LLM inputs
via the CacheBackend contract. Default is memoryCacheBackend
(1000 entries / 64 MB) since substrate adopted it as always-on.
Distinct from provider-side prompt caching. See Cache.
Cache key — The composite key used to look up cached LLM and
tool responses. Includes the family, model, call class, and content
hashes of the prompt and tool arguments. The fingerprint module
(computeFingerprint) is the deterministic, platform-uniform
hasher that produces the content-hash component — identical inputs
on Node and Browser runtimes produce identical
fingerprints, which is what lets a recorded turn replay against a
different runtime and still hit the same cache entries.
CallClass — One of utility, reasoning, converse, or
synthesize. Discriminates internal classification calls from
user-facing answer composition. The literal is restricted by lint
to seam factories, so it can't be passed around as a runtime string.
Channel — A typed reactive state slot inside the compiled graph
(LastValue, BinaryOperatorAggregate, Topic, EphemeralValue,
NamedBarrier, DataChannel). Nodes fire when a subscribed channel
advances; concurrent-write semantics are defined per channel kind.
Checkpointer — A swappable backend that persists graph state
snapshots so the runtime can time-travel via checkpoint() /
restore(). Memory, IndexedDB, and Supabase implementations ship in
@pleach/core. A restore returns state; it is not a deterministic
replay of channel writes, and the saver persists an argument hash and
a result size rather than raw payloads. See
Checkpointing.
Content-hash cache — A cache keyed on the hash of the prompt plus tool arguments, so identical inputs hit identical entries across runs and across streaming / non-streaming invocations.
Content delta — content.delta event type — one chunk of
streaming model output. messageProjection folds these into the
terminal message at end-of-turn. See Event log
projections and Stream
events.
D
Determinism — The property that a recorded Pleach session,
replayed against the same package version + the same input, re-serves
its recorded fingerprint stream, and any drift raises
ReplayDivergenceError. Byte-identical output from a live model is
not promised. The contract behind @pleach/eval and @pleach/replay.
The property is a deterministic fold over an ordered log, and it holds
only in the default serial regime. It does not extend across
providers, across runtimes, or to latency. See what determinism
doesn't give you.
E
Erasure (crypto-shredding) — Destroying a subject's key so the ciphertext in the live table can no longer be read. It is not proof of erasure: it cannot reach backups or anything below SQL, and the substrate offers no way to prove a shred happened. See erasure limits.
Eval — Deterministic replay plus diff over recorded turns, shipped
as @pleach/eval for agent regression tests. It grades agent output,
not the correctness of the system around it, and it does not import
@pleach/replay. Two cache options declared on EvalSuiteOptions are
not read by the suite. See @pleach/eval.
Event log — The append-only record of observable events in a session: messages sent, tool calls dispatched and completed, interrupts raised and resolved, exports queued. Distinct from the audit ledger — the event log captures what happened, the ledger captures every decision.
Event-granular fork — Forking a session at any specific event, not only at checkpoint boundaries. Enables targeted replay against historical runs.
F
Facet — A named accessor that groups related runtime methods.
runtime.tenant.id replaces runtime.getTenantId().
Facets are the canonical accessor pattern; flat methods stay
shipped with @deprecated JSDoc. See Facets.
Family — Semantic provider origin. One of anthropic, openai,
google, deepseek, moonshot, mistral, qwen, thinkingmachines,
or xai. Locks tokenizer, prompt-cache key, tool-call dialect, and
refusal pattern at session start.
Family-strict cascade — The provider fallback policy: when a
primary model fails, the cascade walks in-family rungs only. Cross-
family widening is explicit and consumer-initiated — never silent.
One documented exception exists for a host-initiated call, and a call
whose family can't be attributed is recorded as unresolved rather
than counted. See Family-locked routing.
Fingerprint — The cache-equivalence key over a call's inputs. It names an equivalence class, not a single call: identity fields are deliberately excluded from the key, and floats are not a reliable component of one. See Fingerprint.
Fork — A new SessionRuntime that shares its parent's event log
up to a specified cutoff and runs independently after.
FSL-1.1-Apache-2.0 — The Functional Source License (1.1) with
Apache 2.0 as the future license — the current license posture for
every @pleach/* package. Source-available, usable in
production, free of charge during the FSL window; the only
restriction is on competing offerings. Auto-transitions to
permissive Apache 2.0 two years after each release. See
Pricing for commercial-use guidance and
Versioning for the per-SKU license lock.
Apache-2.0 — The OSI-approved permissive license that
each @pleach/* release converts to two years after it ships, under the FSL future-license clause. Permits commercial
use, modification, and redistribution with attribution. See the
FSL-1.1-Apache-2.0 entry above for the current license
posture.
G
GraphProjection — The fold contract over the event log: an
initial state, a reducer (state, row) → state, and an optional
selector. runtime.events.fold(projection, opts) runs it to
completion. See Event log
projections.
H
Hash chain — A previous-row hash and a row hash on each
event log row. Each row stores the previous row's
hash; verification reports the first index where the chain
breaks. The chain is tamper-evident, not tamper-proof: it detects
an edit after the fact, and someone with write access can mutate a row
and recompute every hash after it. A structural ok is not a
cryptographic verification. See Hash chain for
what is and isn't claimed. The TamperEvidence plug-point in @pleach/core/audit
ships a no-op default; the live verifier ships in
@pleach/core/eventLog as verifyChainForChat + generateProof.
The writer-side stamping lives in @pleach/core/eventLog
(chainStep, computeRowHash) behind an EventLogWriter option
that is on by default. See Hash chain.
Harness — A generic agent runtime that runs the turn loop.
@pleach/core is a harness — it executes turns but doesn't dictate
the topology of your application around it.
HarnessPlugin — The consumer extension contract. A plugin can register tier nodes, stream observers, prompt contributors, and redaction gates; it cannot rewrite the lattice or bypass the synthesize seam.
I
Interrupt — A pause in the agent loop where the user must
approve or modify a pending action. Per-tool granularity, recorded
in the event log. The interrupt envelope follows the
LangGraph-shape contract documented under
Interrupts, so a host that already speaks the
LangGraph approval shape can wire an existing approval UI against
the same payload. The ledger records the resolution as an
interruptDecision row carrying the human's verdict, joinable
back to the turnId that triggered the pause.
K
KeyedRegex — One of the four bundled scrubbers in
@pleach/compliance. A parameterized regex scrubber consumers
extend for custom regulated identifiers (MRN, EIN, etc.). See
Scrubbers and Compliance.
L
Lattice — See Stage lattice.
M
Matrix — The (ProviderFamily × CallClass) model resolution
table. Authoritative for what model fires for what call class in
what family. Locked at session start, never silently widened.
MCP — Model Context Protocol. The Anthropic-driven standard for
tool integration. @pleach/mcp ships an MCP client and server.
N
Native — A provider transport that calls the provider's
official SDK directly (e.g. @anthropic-ai/sdk). Contrasts with the
OpenRouter transport.
O
OpenRouter — A multi-provider routing service. Available as a Pleach transport, including in a BYOK variant.
OTEL — OpenTelemetry. Pleach exposes an OTEL adapter hook so spans cover session boundaries and per-call seams without re- implementing observability in every consumer.
OTel span types — The four core spans the substrate emits:
session.turn, llm.invocation, graph.stage, tool.execution.
A retried model call adds an llm.attempt child per dispatch, and
each sub-agent run adds a subagent.run span. Spans nest by parent
id per turn. runtime.spans.snapshot() reads
them in-process. See OTel observability.
P
Pleach — The harness's name. Pleaching is a centuries-old
horticultural technique: weave the living branches of adjacent
trees together so they grow into a single, structurally coherent
hedge. That's the metaphor for the runtime — each LLM call, tool
execution, plugin contribution, and channel write is a branch; the
lattice + audit ledger + family lock + singleton synthesize seam
are how those branches are pleached into a structure that carries
weight a single streamText call cannot.
pleach.tenant_id — OTel attribute set on every emitted span
when runtime.tenant is configured (or withTenantHeader wraps
outbound HTTP). The load-bearing field for per-tenant trace
queries. See OTel observability and
Tenant facet.
Projection — Synonym for GraphProjection<T>. See
GraphProjection.
ProviderFamily — See Family.
ProviderSeam — The per-CallClass seam contract for LLM
invocation. Exactly one seam per call class per runtime.
Published — Documented behaviour tracks the package source, not a
registry release. No @pleach/* package is on npm yet: some names are
reserved with 0.0.1 placeholders, and several transports are marked
private. A page documenting a surface is not a statement that you
can install it today. See Install.
R
Redaction gate — The contract for transforming or dropping data before provider calls. Per-message granularity. Distinct from stream observers, which act per-chunk on the response.
Replay — Re-running a recorded turn against the same package
version + the same input. @pleach/replay ships a strict mode that
fails on any divergence between recorded and replayed events.
A replay re-serves the recorded response; it does not re-run the
provider. Bit-for-bit re-execution against a hosted model provider is
not achievable, and the strict gate checks determinism rather than
fidelity to the record. See Replay for both limits.
RLS — Row-Level Security. The Postgres feature Pleach's Supabase storage adapter relies on for tenant isolation.
runtime.tenant — The facet exposing the read-only id and
subId properties. Read tenant scope through the facet rather
than constructor config. See Tenant facet.
S
Sandbox — A code-execution boundary. The SandboxProvider
interface lives in @pleach/coding-agent; adapters cover hosted
sandboxes (E2B, Daytona) and Vercel's sandboxing surface.
Isolation is a property of the backend you wire, not of the contract,
and it holds only for a backend that passed its own self-test. The
substrate does not sandbox tool execution on its own. See
Sandbox and Security.
Scrubber — A redaction-gating step at the EventLogWriter
write site. Declares an event-type allowlist; redacts matched
patterns before persistence. Four ship in @pleach/compliance.
Hosts register more via contributeScrubbers. See
Scrubbers.
Seam — A boundary between subsystems with a typed contract.
ProviderSeam is the canonical example. The stream-observer
contract lives at the seam boundary.
SessionRuntime — The per-session entry point — owns the compiled graph, the channels, the seam-bound provider calls, and the lifecycle.
Singleton synthesize-seam invariant — Exactly one
ProviderSeam<"synthesize"> per SessionRuntime, structurally
enforced. The reason: if two synthesize calls fired and the runtime
showed one, the audit ledger and the rendered UI would disagree on
what the model said.
SKU — A separately-installable npm package in the @pleach/*
namespace. The current matrix is documented on the
Packages page.
Stage lattice — The four-stage agent graph topology:
anchor-plan | tool-loop | synthesize | post-turn. Out-of-lattice
edges fail CI. See Architecture for the deep
dive.
Stream observer — A per-chunk dispatch on the inbound provider
stream. Observer factories register through HarnessPlugin. Each
onChunk(chunk, ctx) returns a verdict: continue, amend,
emit, or halt. Sync-only — replay determinism armor.
Strict mode — @pleach/replay's mode that fails on any
divergence between recorded and replayed events. Throws
ReplayDivergenceError.
subTenantId — The secondary scoping field on
SessionRuntimeConfig (nested isolation: tenant → team, or org
→ sub-account). Flows through alongside tenantId to every
downstream write site. See Tenant facet.
Synthesize — One of the four call classes — the user-facing final-answer LLM call. Capped at one per turn by default.
T
Tenant — A scoping unit for multi-tenant deployments. Carried
as organizationId on the runtime config and as a required field
on every event and every AuditableCall row, so a tenant-scoped
query against the ledger or event log is a single WHERE
predicate on an indexed organization column rather
than a join through a session table. The RLS template shipped
with the schema bundle parameterizes on the same column for
row-level isolation at the Postgres layer.
Tool-loop — The second stage of the four-stage lattice. The iterative LLM-decision and tool-execution loop. May self-loop until the plan resolves.
Typed record — One of the five typed, stage-correlated
audit-record slots: InterruptDecisionRecord,
TokenCostRecord, ToolSelectionTrace, PlanGenerationRecord,
SynthesisQualityRecord. Narrow on the named slot's presence
(correlated with stageId). See Typed
records.
V
Verification — Running chain and determinism verifiers over a
recorded session. Confirms hash-chain integrity and replay
determinism. Shipped by @pleach/compliance and @pleach/replay.
W
withTenantHeader — Adapter that wraps a fetch client and
stamps a tenant header on outbound HTTP. For hosts behind an
upstream gateway that routes by tenant header. See Tenant
facet.
WORM — An opt-in Postgres tier whose triggers refuse UPDATE,
DELETE and TRUNCATE on the event log and the call-row table for
every application role. It binds application roles only: a table owner
or superuser can still disable the triggers, so we don't grade it as
the non-rewriteable storage format that SEC recordkeeping rules
describe. Postgres only, and not part of the default apply. See WORM
tier.
Z
Zod — The TypeScript schema validation library. Pleach uses Zod for tool input/output schemas; JSON Schema is available as an escape hatch.