Namespace Typhon.Engine
Classes
- ArchetypeProjection
Everything one archetype declared: its position, its public fields, its owner fields and the change groups they fall into.
- ArchetypeProjectionBuilder
Declares the wire fields of one archetype: what a client may see of it, under what name, quantized how, and in which change group.
- Archetype<TSelf>
CRTP base class for ECS archetypes. Concrete archetypes inherit from this and declare components as
static readonlyComp<T> fields via Register<T>().
- Archetype<TSelf, TParent>
CRTP base class for archetypes with a parent. Inherited components get lower slot indices (parent-first ordering). Single parent only — no diamond inheritance.
- BackupAbortedException
An online backup was abandoned (BackupAborted). Nothing was published, and no page is forgotten: the next backup covers everything this one would have.
- BackupChainBrokenException
A backup point cannot be restored because a pack of its chain is missing, or the chain's links disagree.
- BackupChainSummary
A chain's head in a store.
- BackupException
Base class of every backup, restore and verify failure.
- BackupFormatUnsupportedException
A store or pack was written in a format this build does not read.
- BackupOperations
Backups without an engine: what
typhon backup …and the Workbench share (D10), the way DatabaseRepair servestyphon repair. Online capture of a running database is the engine's (its backup coordinator); this facade backs up a closed one, and restores, verifies and lists a store.
- BackupPackCorruptException
A backup pack failed one of its checks. A restore of a point that needs it is refused rather than given wrong data.
- BackupPackVerification
One pack, verified.
- BackupPointSummary
One backup point, as its pack's header and footer describe it.
- BackupPointVerification
One point, verified: restorable iff its chain resolves and every pack of it verified without damage.
- BackupRestoreResult
What a restore did.
- BackupStoreListing
What a store holds.
- BackupStoreLockedException
Another writer holds the backup store's lock. Retrying later may succeed.
- BackupStoreMismatchException
The backup store belongs to another database: two databases never interleave in one store.
- BackupStoreStatus
A store's state in one line.
- BackupVerifyFinding
One verify finding, coded
BKP-VER-nn.
- BackupVerifyReport
What a verify found.
- BandBuilder
Declares a Sphere's distance bands (09 § 9): beyond a fraction of the radius, an entity's updates are sent every N ticks instead of every tick.
- BulkLoadCheckpointTimeoutException
Thrown by CompleteBulkLoad() when the synchronous checkpoint did not complete within CheckpointTimeout. The bulk session remains alive — the caller may retry CompleteBulkLoad() (e.g., with a longer timeout) or call Dispose() to discard.
- BulkLoadOptions
Options for opening a BulkLoadSession via
DatabaseEngine.BeginBulkLoad. All settings are optional — the default-constructed instance is valid.
- BulkLoadSession
An opt-in, throughput-first write path that skips per-row WAL and brackets a bulk with a manifest pair. Obtained via
DatabaseEngine.BeginBulkLoad; trades per-row durability for throughput on a strictly opt-in API.
- BulkSessionAlreadyActiveException
Thrown by BeginBulkLoad(BulkLoadOptions) when a bulk session is already open. BulkLoad is exclusive in v1 — only one session per engine. Regular UnitOfWorks continue to run.
- BulkSessionClosedException
Thrown by
BulkLoadSession.{Spawn, Update, Destroy, CompleteBulkLoad}when the session has already been completed (viaCompleteBulkLoad) or disposed.
- CallbackSystem
Proactive system that runs every tick. Used for non-entity work: timers, input draining, global state. Derive from this class, implement Configure(SystemBuilder) and Execute(TickContext).
- CheckConfig
Runtime gate for Typhon's user-facing correctness checks — the "strict mode" (issue #422).
The Release NuGet strips every
Debug.Assert/#if DEBUGcheck, so users get no diagnostics when they misuse the API. The valuable, user-facing checks are converted to run behind this gate:CheckConfig.Require(Enabled, …). Mirroring TelemetryConfig, the gate is astatic readonly boolso the JIT dead-code-eliminates the check path entirely when strict mode is off (the Release default) — zero cost on the hot path.Off by default, everywhere. Enable deliberately when diagnosing, via
Typhon:Checks:Enabledintyphon.telemetry.jsonor theTYPHON__CHECKS__ENABLEDenvironment variable. There is no build-config auto-detection and no runtime setter (a mutable field would defeat the JIT fold — restart to reconfigure).Startup: call EnsureInitialized() once before hot paths JIT (wired in the engine's module initializer, next to EnsureInitialized()). Configuration is read once from the same merged source as TelemetryConfig (
typhon.telemetry.jsonin cwd, then next to the assembly, then env vars).
- ChunkTable<T>
One record per chunk of a parallel dispatch: what chunk
ineeds to know about its work, written by the system's prepare step and read by the chunk that claims indexi. Context, not the data to process — an owner id, a range, a set of cursors.
- ChunkedCallbackSystem
Chunk-parallel CallbackSystem that's invoked N times in parallel across workers, where N is the chunk count declared via ChunkedParallel(int) in Configure(SystemBuilder). Each invocation receives ChunkIndex / ChunkCount so the implementation can compute its own data slice.
Designed for non-entity-iterating chunkable work: SIMD sweeps over flat arrays, parallel reductions, image downsamples, etc. Skips all entity-prep infrastructure that a QuerySystem would set up — no Accessor, no Entities, no per-chunk Transaction.
Typical use in Configure(SystemBuilder):
protected override void Configure(SystemBuilder b) => b .Name("PheroMaxReduce") .Phase(MyPhase) .ReadsResource("PheromoneGrid") .WritesResource("HeatFoodAccum") .ChunkedParallel(chunkCount: 16);Inside Execute(TickContext), compute the per-chunk slice from the TickContext:
protected override void Execute(TickContext ctx) { int start = (int)((long)ctx.ChunkIndex * sourceLen / ctx.ChunkCount); int end = (int)((long)(ctx.ChunkIndex + 1) * sourceLen / ctx.ChunkCount); for (int i = start; i < end; i++) { /* ... */ } }
- ChunkedCallbackSystem<TContext>
Generic ChunkedCallbackSystem layer that exposes typed access to an ambient
TContextpopulated progressively across the DAG. The context is bound at runtime via RegisterContext<TContext>(TContext) after Configure and before Start.Override ShouldRun(TContext) to gate dispatch on a typed flag, or Prepare(TContext) to build a per-tick plan and return a dynamic chunk count (0 = skip, >0 = dispatch with that many chunks).
- ChunkedCallbackSystem<TContext, TChunk>
A ChunkedCallbackSystem<TContext> whose chunks each receive a typed record,
TChunk, written for them by the system's prepare step: the chunk claiming indexiruns with recordi, instead of re-deriving whatimeans from the index.
- ClusterEntityRecordAccessor
Static accessor for cluster entity records stored as raw bytes in the per-archetype RawValueHashMap.
- ClusterLocation
Packed ClusterLocation encoding for B+Tree values and spatial entries. Uses a fixed multiplier of 64 (max cluster size) for uniform encoding across all archetypes.
- ClusterSpatialQueryExtensions
Construction helpers for ClusterSpatialQuery<TArch>. Exposed on DatabaseEngine so callers can write
dbe.ClusterSpatialQuery{TArch}().AABB(...).
- CommandBuilder<T>
Declares a command type: what it is called on the wire, how fast a session may send it, who may send it, and what it must look like to be worth decoding.
- CommandDeclaration
What a CommandBuilder<T> declared.
- CommitDurabilityUncertainException
Thrown when a transaction's records were appended to the WAL and the transaction was published (its changes are visible in memory), but the subsequent Immediate durability wait did not confirm the records reached stable storage (back-pressure timeout or a fatal WAL writer error).
- CommitPublishIncompleteException
Thrown when a transaction's records were appended to the WAL — the point of no return (AP-02) — and something failed before its publish completed: the transaction is committed, but only part of it, or none of it, is visible in memory.
- ComponentSchemaReport
Per-component schema report showing persisted metadata, storage layout, and entity count.
- ComponentTable
Stores all instances of a single component type with MVCC revision tracking.
- CompoundSystem
Groups related sub-systems into a single unit in the parent DAG. Completes when all sub-systems finish. Derive from this class, implement Configure(), and call
Addto register sub-systems.
- ConcurrencyConflictSolver
Provides conflict resolution context when a write-write conflict is detected during Commit(ConcurrencyConflictHandler).
- CorruptionException
Data integrity violation — checksum mismatch, structural corruption, invalid page state. Never transient (inherits default false). Requires human intervention or restore from backup.
- DBComponentDefinition
Compiled description of a single component revision: its name, schema revision, storage layout, fields, and index metadata. Built once from a
[Component]-annotated struct (via CreateFromAccessor<T>()) and thereafter immutable.
- DBComponentDefinition.Field
A single field of a component: its identity, type, byte offset within the component storage, and any index / spatial / foreign-key metadata.
- DBObjectDefinition
A named object grouping a set of component definitions that together describe one logical entity shape.
- Dag
A dependency graph of systems — the third level of the runtime partitioning hierarchy (
Engine → Track → DAG → Phase → System). A DAG belongs to exactly one Track and declares its own ordered phase sequence.
- DagBuilder
Fluent builder for constructing a static system DAG. Validates uniqueness and acyclicity on Build().
- DagScheduler
Production DAG scheduler for the Typhon Runtime. Executes a static system DAG on a pool of worker threads, with any-worker dispatch and inline continuation.
- DatabaseDefinitions
Registry of component definitions for a database. Definitions are keyed by full name (name plus revision) and built either from
[Component]-annotated structs via CreateFromAccessor<T>() or explicitly via the fluent CreateComponentBuilder(string, int). Thread-safe.
- DatabaseEngine
The open of a bundle a restore wrote (plan 1413 §2.9, BKP-05):
restore.jsonnames a new WAL timeline, which the open adopts before the WAL manager starts, then deletes the marker. A marker it cannot trust, one naming another database, or one beside a WAL directory other than the bundle's refuses the open, writing nothing.
- DatabaseEngineExtensions
Convenience extensions for DatabaseEngine.
- DatabaseEngineOptions
Configuration options for DatabaseEngine.
- DatabaseIdentity
Identity of the scanned database, as read from its own bytes.
- DatabaseIntegrityException
Thrown when opening a database whose structural spine does not verify.
- DatabaseLockFile
Owns the on-disk format of a database's cooperative locking protocol:
{name}.typhon/db.lockand its companiondb.lock.request.
- DatabaseLockedException
Thrown when a database file is already locked by another process.
- DatabaseRegistry
The machine-local index of databases any Typhon process has opened —
%LOCALAPPDATA%\Typhon\databases</code> (#622, design D-7).
- DatabaseRegistryEntry
One database this machine has seen — a row of the machine-local registry (#622, design D-7).
- DatabaseRepair
Turns an IntegrityReport into a reviewable RepairPlan, and applies one.
- DatabaseSchema
Static entry point for offline schema inspection and dry-run validation. Opens the database read-only (no user component registration) to extract persisted metadata.
- DatabaseSchemaReport
Top-level report of a database's persisted schema state. Returned by Inspect(string) for operational tooling.
- DeferredCleanupOptions
Configuration options for the deferred cleanup subsystem that manages MVCC revision cleanup when long-running transactions block immediate cleanup.
- DurabilityException
Base class for all durability subsystem exceptions (WAL, checkpoint, recovery).
- EcsMetricsExporter
Exports ECS metrics to OpenTelemetry via Meter: per-archetype EntityMap gauges and per-component transient memory gauges. All metrics are zero-cost reads of existing fields — no new Interlocked overhead on hot paths.
- EcsNavigationQueryBuilder<TSourceArch, TSource, TTarget>
ECS-aware navigation query builder. Handles FK-based joins between archetype entities. Created via NavigateField<TSource, TTarget>(Expression<Func<TSource, long>>).
- EcsView<TArchetype>
Reactive ECS View with incremental refresh via Typhon.Engine.Internals.ViewDeltaRingBuffer. Inherits ViewBase for entity set management, delta tracking, and ring buffer lifecycle. When FieldEvaluators are present (Expression-based WHERE), registers with Typhon.Engine.Internals.ViewRegistry for push-based delta notifications. Otherwise, falls back to pull-model (full re-query on each Refresh).
- EntityAccessor
Base class providing MVCC-correct entity access at a frozen TSN. Holds the minimum state needed for entity reads and SingleVersion/Transient writes: engine reference, epoch scope, component accessor cache, and ChangeSet.
Transaction extends this with spawn/destroy, commit/rollback, and TransactionChain insertion. PointInTimeAccessor wraps per-thread instances of this class for lock-free parallel entity access.
- EntityCommandBuffer
The tick's deferred entity commands, one segment per worker slot (#1099). A parallel system queues a spawn or a destroy through
ctx.Commandswithout a transaction; the engine applies the whole buffer in one fence phase.
- EntityRecordAccessor
Static accessor for entity records stored as raw bytes in the per-archetype RawValueHashMap. Record layout: [EntityRecordHeader (14B)] [Location₀ (4B)] [Location₁ (4B)] ... [Location_{N-1} (4B)]
- EventBuilder<T>
Declares how a system's event queue reaches clients: which sessions hear an event, and what of it travels.
- EventDeclaration
What an EventBuilder<T> declared.
- EventQueueBase
Non-generic base class for typed event queues. Allows the scheduler to reset all queues at tick start without knowing their generic type.
- EventQueue<T>
Typed event queue for inter-system communication. Producer systems push events; consumer systems drain them. Multi-producer / single-consumer: any number of workers may push concurrently, and the DAG guarantees every producer has completed before the consumer runs.
- EvolutionComponentResult
Per-component result of a dry-run evolution validation.
- EvolutionValidationResult
Result of a dry-run schema evolution validation.
- ExporterQueue
Bounded handoff queue between the profiler consumer thread and one exporter. Wraps a BlockingCollection<T> with explicit drop-newest semantics on full, and balances the batch refcount on drop so the pool doesn't leak.
- FenceCostModel
Per-stage cost coefficients used by the fence work-planner to size chunks. Each value scales the corresponding work-hint (migration count, dirty-cluster count, shadow-entry count, spatial-entry count) into a unitless cost figure that the planner bin-packs across workers.
Unit: 1 cost unit ≈ 1 µs of single-worker wall time. Default is calibrated against AntHill traces (migration ≈ 33 µs/entity, AABB recompute ≈ 2.4 µs/cluster). Shadow / Spatial coefficients are placeholders pending measurement. Other workload profiles (shadow-heavy SV writes, sparse spatial) should override these via FenceCostModel; the defaults will load-balance against ratios that don't match your workload, leading to less optimal chunk packing.
- FieldChange
A single field-level difference between the persisted schema and the current one, with its severity.
- FieldSchemaReport
Per-field schema report with FieldId, type, offset, and size information.
- GroupSetBuilder
Declares a group set (
claude/design/Subscriptions/14-phase4-design.md§ 3): a family of groups, each a key that members carry in a field of one of their components, and the selector that decides which keys a session holds.
- GroupSetDeclaration
A declared group set, as Groups(string, Action<GroupSetBuilder>) recorded it.
- HealthCheckResult
Detailed result from a Typhon health check.
- HealthStatusChangedEventArgs
Event arguments for health status changes.
- IndexChange
A single index-level difference between the persisted schema and the current one.
- IndexSchemaReport
Per-index schema report.
- IntegrityConstants
The handful of on-disk layout constants an integrity consumer needs to size buffers and interpret a Locus. Mirrors the engine-internal storage constants so external callers (CLI, Workbench, tests) do not have to hard-code them.
- IntegrityFinding
One thing that is wrong with a database, with everything needed to judge it: what rule it violates, where it is, how confident the scan is, and what repairing it would cost.
- IntegrityOptions
Knobs for a scan. The defaults are the ones an operator should get by typing nothing.
- IntegrityReport
The product of a scan: what was looked at, what is wrong, what a repair would cost, and what could not be seen.
- IntegrityReportJson
Renders an IntegrityReport as JSON for CI gates, scripts and the Workbench.
- IntegrityReportText
Renders an IntegrityReport as human-readable text.
- IntegrityScanner
Answers three questions about a database without changing a byte of it: is it sound, what exactly is wrong, and what would a repair cost.
- InvalidAccessException
Thrown when a system attempts to mutate a component or resource that it did not declare in its access set (RFC 07 — Unit 4). DEBUG builds only; Typhon.Engine.Internals.SystemAccessValidator compiles out in RELEASE.
- LockTimeoutException
A lock acquisition (shared or exclusive) exceeded its deadline. Always transient — the resource is presumably available later.
- LossEstimate
What a repair would cost, in user terms.
- LossManifest
The complete enumeration of what a repair would destroy, kept separate from the plan because it can be enormous.
- MathExtensions
Formatting and small numeric helpers — human-friendly renderings of sizes, counts, durations, and bandwidth, plus a few power-of-two utilities. Formatting uses a fixed
en-usculture so output is stable regardless of the host locale.
- MathHelpers
Minimal power-of-two test helpers.
- MemberBuilder
Names a member archetype's key field (Member<TArchetype>(Action<MemberBuilder>)).
- MemberDeclaration
A group set's member archetype and its key field.
- MetricDeclaration
An application metric and where its value comes from.
- MetricNames
Standard metric names for consistent taxonomy across components.
- MigrationProgressEventArgs
Progress event data raised during schema migration for operational monitoring.
- MotionBuilder
Configures how an archetype's position travels: how wrong a client's extrapolation may get before a new motion segment is sent, what counts as a teleport, and how long a moving entity may go without a refresh.
- MotionProjection
What a MotionBuilder declared, as the compiler and the catalog builder read it back. Zero on a numeric member means "the engine's default".
- NavigationQueryBuilder<TSource, TTarget>
Fluent builder for a navigation (foreign-key join) view: tracks
TSourceentities whose FK-referencedTTargetsatisfies the accumulated predicates. Call Where(Expression<Func<TSource, TTarget, bool>>) one or more times, then ToView(int, string, int, string) to materialize a live NavigationView<TSource, TTarget>.
- NavigationView<TSource, TTarget>
Navigation join view: tracks source entities whose FK-referenced target satisfies predicates. Registered in both source and target ViewRegistries for incremental refresh.
- NodeSnapshot
Snapshot of a single resource node's metrics at a point in time.
- OTelMetricNameBuilder
Converts Typhon resource paths and metric kinds to OpenTelemetry metric names.
- ObservabilityBridgeExtensions
Extension methods for registering Typhon Observability Bridge services with dependency injection.
- ObservabilityBridgeOptions
Configuration options for the Observability Bridge that exports Resource System metrics to OpenTelemetry format.
- ObserverBuilder
Declares one observer: what region it covers and which archetypes it reaches through.
- ObserverDeclaration
What an ObserverBuilder declared, as the runtime reads it back at
Start.
- OfflineBundlePageSource
Reads a
.typhonbundle directly as bytes: noDatabaseEngine, no page cache, no lock acquisition, no WAL replay. The page source the checker uses when it matters most — when the database will not open.
- OverloadOptions
Configuration for the overload detection and response system.
- OwnerBuilder
Declares the fields of an archetype that only the session controlling the entity may see.
- PackChainPageSource
The image of a backup point, page by page, without materialising it (plan 1413 §2.10, 04 §3): the IPageSource through which IntegrityScanner checks a point. A page no pack of the chain holds is a hole and reads as zeros, as it would in the restored file.
- PackPageSource
One pack on its own (an incremental, say) as a sparse IPageSource: a page the pack does not hold is absent (TryReadPage(int, Span<byte>) returns
false), the sparse case IPageSource documents.
- PackSourceOptions
Options of PackChainPageSource and PackPageSource.
- PageCacheBackpressureTimeoutException
Page cache allocation timed out: no slot became evictable within the back-pressure timeout. The counts say what held them — pages owed a write (the checkpoint behind the writers), pages under dirty marks (write sets still in flight), pages only an epoch pin keeps — and the message names the dominant one. Transient: it clears once that holder lets go, but it also means the work exceeded what the cache and the disk could absorb in time.
- PageCorruptionException
CRC32C checksum mismatch on a data page — the page is torn or corrupted. Thrown when on-load (OnLoad) verification detects a mismatch outside recovery — there is no repair (FPI was retired; recovery heals torn pages via the rebuild net).
- PagedMMFOptions
Configuration for a Typhon.Engine.Internals.PagedMMF / Typhon.Engine.Internals.ManagedPagedMMF store: which database (name + directory), how large the page cache is, and a couple of diagnostics. A Typhon database is a single on-disk bundle directory (BundleDirectory); these options locate and size it.
- PipelineSystem
Reactive system with multi-stage gather/process/scatter pipeline. Execution model deferred to Patate design. Derive from this class and implement Configure(SystemBuilder).
- PointInTimeAccessor
Thread-safe, lightweight snapshot accessor for parallel entity access. Constructed once (empty), then Attach(DatabaseEngine, int)ed before each parallel system dispatch to obtain a fresh TSN. Per-worker EntityAccessor instances are stored in a flat array indexed by worker ID — zero per-entity dictionary overhead.
Supports reading all storage modes (Versioned via MVCC chain walk, SingleVersion/Transient direct). Supports writing SingleVersion and Transient components. Throws on Versioned writes. Does not support Spawn, Destroy, Commit, or Rollback.
Reuse pattern: A single PTA is constructed once and reused across all non-Versioned parallel systems within a tick and across ticks. Call Attach(DatabaseEngine, int) before each system dispatch — it allocates a fresh TSN and resets per-worker EntityAccessors while preserving ChunkAccessor page caches (zero allocation after first-tick warmup).
- PositionProjection
How an archetype's position reaches a client: as motion segments it extrapolates, or as one value in the enter record.
- ProfileBuilder
Declares a named set of observers — "player", "god", "spectator" — that a session is bound to as a whole.
- ProfileDeclaration
A named profile and the observers it holds.
- ProfilerLaunchConfig
Parsed profiler launch options for a host application (AntHill, IOProfileRunner, MonitoringDemo, …). Resolved from CLI args and/or environment variables, then handed to ProfilerLauncher to produce the exporter list and (optionally) flip the telemetry gate before Typhon.Engine.TyphonProfiler.Start(Typhon.Engine.IResource,Typhon.Engine.ProfilerSessionMetadata,Typhon.Engine.ProfilerOptions,System.Action).
- ProfilerLauncher
Host-side helpers that turn a parsed ProfilerLaunchConfig into the side effects the host needs: flipping the telemetry gate before TelemetryConfig is first read, building the exporter list, and printing a diagnostic banner.
- ProfilerOptions
Tunable parameters for
TyphonProfiler.Start. All defaults are tuned for typical Typhon workloads (~30 producer threads, ~3 exporters).
- ProfilerSessionMetadata
Static description of the profiling session, passed to each exporter once via Initialize(ProfilerSessionMetadata). Holds everything the exporter needs to write the header + metadata tables.
- ProjectedField
One field of an archetype's wire projection, as it was declared.
- QuerySystem
Reactive system that processes entities from a View. Auto-skips when no filtered components were written and event queues are empty. Supports optional Parallel() mode for automatic chunking across workers. Derive from this class, implement Configure(SystemBuilder) and Execute(TickContext).
- RealmConfig
A realm's configuration: its spatial grid (its identity — bounds, cell size, depth) and its policy when unobserved. Every load-bearing value is required and explicit; nothing is derived from another realm or from a workload.
- RealmObserver
An application pin on a realm (Observe(RealmId)): while held, the realm is Active from the next tick on — what a headless server, a benchmark or a test uses where no session observes. Dispose releases it; disposing twice releases once.
- RealmRegistry
The engine's realms: how many it can host and which are registered. Reached through Realms.
- RealmReplicationConfig
How a realm is replicated (12-realms § 2.1): the kind its sessions' profile variants are chosen by, its replication cell, its position width and an opaque tag its clients pick a scene by. Application policy, not persisted identity: the grid is the identity (D-1).
- RegionBuilder
Names a region archetype's key and extent fields (Region<TRegion>(Action<RegionBuilder>)).
- RegionDeclaration
A group set's region archetype and its key and extent fields.
- RepairOutcome
The result of applying a plan: what was attempted, what worked, and what it really cost.
- RepairPlan
A reviewable, ordered description of what a repair will do — produced by a read-only pass and consumed by the only mutating one.
- RepairStep
One ordered step of a repair.
- ResourceAlert
An alert generated when a resource crosses health thresholds.
- ResourceAlertGenerator
Generates alerts for resources that cross health thresholds.
- ResourceExhaustedException
Exception thrown when a bounded resource has reached its capacity limit.
- ResourceExtensions
Extension methods for tree navigation on IResource instances.
- ResourceGraph
Default implementation of IResourceGraph.
- ResourceHealthChecker
Health checker that evaluates resource utilization against configured thresholds.
- ResourceMetricsExporter
Exports Typhon resource metrics to OpenTelemetry via Meter.
- ResourceMetricsService
Background service that periodically updates resource snapshots and raises alerts.
- ResourceNode
Default IResource implementation: a concrete tree node backed by a thread-safe child collection. Subclass to override Count or DisposeWithParent, or to add metrics via IMetricSource.
- ResourceOptions
Runtime knobs for the database engine's resource subsystems (transaction chain, WAL ring buffer, checkpoint cadence, page-CRC policy). Set at startup via Resources, immutable thereafter.
- ResourceRegistry
Default implementation of IResourceRegistry. Builds a hierarchical tree with eight subsystem nodes under Root, created once at construction.
- ResourceRegistryOptions
Configuration options for ResourceRegistry.
- ResourceSnapshot
Immutable snapshot of all resource metrics at a point in time.
- RestoreRefusedException
A restore refused to write its target. Nothing was written.
- RetentionPolicy
How much disk a database's profiling captures may occupy, stored with the data as
{name}.typhon/profilings/retention.json(#616, design D-6).
- RuntimeOptions
Configuration options for the DAG scheduler and runtime tick loop.
- RuntimeSchedule
Fluent builder for constructing a runtime schedule — the public API game developers use to declare the
Track → DAG → Phase → Systemhierarchy and build a DagScheduler.
- RuntimeStatsSnapshot
A point-in-time read of the numbers an operator watches: tick percentiles, overruns, the durability wait, per-system cost, entities per archetype, and the session figures when replication is running. Produced by ReadStats(int).
- ScanLimits
The statement of what a scan could not have detected. Present on every report, including a fully green one, and deliberately not suppressible.
- ScanTotals
Aggregate counters describing what the scan actually looked at.
- SchemaDiff
The full set of differences between a persisted component schema and the current one, with an overall CompatibilityLevel.
- SchemaDowngradeException
Thrown when the database contains component data written by a newer application version. The persisted schema revision is higher than the runtime revision — a downgrade is not supported. The engine must not open the database to prevent data corruption.
- SchemaMigrationException
Thrown when one or more entities fail during schema migration. Old segments remain untouched — the user can fix the migration function and re-run.
- SchemaValidationException
Thrown when a component's runtime struct definition is incompatible with the persisted schema. Contains the full SchemaDiff for programmatic inspection of all detected changes.
- ServiceCollectionExtensions
Dependency-injection registration for the Typhon engine and its subsystems. AddTyphon(IServiceCollection, Action<TyphonOptions>) is the one-line entry point most hosts want — it composes the whole service graph and leaves a ready-to-use DatabaseEngine. The individual
Add*methods, each offered in Singleton / Scoped / Transient lifetime variants, compose that graph piece by piece for callers who need finer control over lifetimes or want to substitute a subsystem.
- SessionEvents
The tick's session lifecycle: everything that happened to sessions since the last tick, as one batch.
- SessionLimits
The per-session ceilings an application's admission hook hands back with a role. Every value left at zero means "use the operator's SubscriptionsOptions value", so a limit is stated in exactly one place unless a session genuinely needs a different one — except BytesPerSecond, where zero is no budget.
- SnapshotExpiredException
Thrown when a read is attempted at a snapshot whose revisions have already been reclaimed by cleanup.
- SpatialFieldTypeExtensions
Dimensionality and precision predicates over SpatialFieldType.
- SpatialObserverExtensions
Entry point for the trigger volumes layered on the spatial index.
- SpatialOptions
Tuning for the spatial layer's per-cell broadphase — the structure a cell uses to answer "which clusters overlap this box".
- StatisticsOptions
Configuration for the background statistics rebuild subsystem. Controls when and how HyperLogLog, MostCommonValues, and Histogram statistics are rebuilt for indexed fields.
- StorageException
A storage-layer failure (I/O error, page fault, segment corruption).
- StorageHealthChangedEventArgs
A change of StorageHealth, raised by StorageHealthChanged.
- StorageIntegrityReport
Whole-engine integrity audit produced by RunStorageIntegrityCheck(). IsHealthy is the only assertion callers should care about — every individual issue is reported with enough context to localise the cause without re-running the audit.
- StringExtensions
Helpers for reading and writing null-terminated UTF-8 strings in unmanaged memory.
- SubscriptionsCommands
What an application system reads commands through, and answers them with.
- SubscriptionsOptions
Operator configuration for engine-owned replication. It governs how much memory replication state may occupy, not how clients connect — the transport carries its own options.
- SubscriptionsRegistry
The declaration surface for engine-owned replication: the projections clients may see, the profiles that decide what each session watches, the commands clients may send, the events they hear and the metrics they are told about.
- SubscriptionsSessions
Session kinds, admission and the tick-visible session lifecycle.
- SystemAccessDescriptor
Accumulator for a system's declared read/write access (RFC 07 — System Access Declarations + Auto-DAG). Populated by SystemBuilder declaration methods, copied into Dag.SystemRegistration, then onto Access at Build(IResource, ILogger) time.
- SystemBuilder
Configuration builder for class-based system definitions. Used by CallbackSystem, QuerySystem, and PipelineSystem in their Configure method.
- SystemBuilder<TContext>
Typed fluent builder for systems deriving from ChunkedCallbackSystem<TContext>. Wraps a non-generic SystemBuilder and exposes typed ShouldRun(Func<TContext, bool>) / Prepare(Func<TContext, int>) overloads that receive the ambient TContext. All other methods forward to the inner builder unchanged.
- SystemDefinition
Immutable definition of a system node in the system DAG. Created by DagBuilder and consumed by DagScheduler.
- TcpSubscriptionOptions
What the built-in TCP transport listens on, and the few socket settings a real deployment has to be able to move.
- TcpSubscriptionTransport
The engine's own listener: an asynchronous Socket, the
TYP3preamble,u32 lenframing, and no ASP.NET Core anywhere.
- TelemetryConfig
Global telemetry configuration for Typhon Engine.
This class provides
static readonlyfields that allow the JIT compiler to eliminate disabled telemetry code paths entirely. When a readonly field isfalse, the JIT can treatif (TelemetryConfig.ProfilerActive)as dead code and remove it completely in Tier 1 compilation.Source of truth: every gate flag (the
*Active/*Enabledfields) and the static constructor that resolves them are GENERATED fromObservability/telemetry-flags.jsoncbyTyphon.Generators.Telemetry.TelemetryConfigGenerator(see the generated partial inTelemetryConfig.g.cs). This file holds only the non-gate fields, the config-reading helpers, and the diagnostics. Add or change a flag by editing the catalog, not this file.IMPORTANT: Call EnsureInitialized() once at application startup, BEFORE any hot paths are JIT compiled. This ensures the static constructor runs early and the JIT sees the final values when compiling performance-critical methods.
Configuration precedence (highest to lowest):
- Environment variables (TYPHON__PROFILER__ENABLED, etc.)
- typhon.telemetry.json in current directory
- typhon.telemetry.json next to the assembly
- Built-in defaults (all disabled)
- TelemetryFlagCatalog
The generated, in-memory catalog of every telemetry flag (source of truth: telemetry-flags.jsonc).
- TelemetryPercentile
The engine's one definition of a percentile over telemetry samples: nearest-rank, no interpolation.
- TelemetryServiceExtensions
Extension methods for registering Typhon profiler services with dependency injection.
- ThroughputRates
Throughput rates (ops/sec) computed from two consecutive snapshots.
- TickTelemetryRing
Pre-allocated circular buffer for tick telemetry. Zero allocation on Record(in TickTelemetry, ReadOnlySpan<SystemTelemetry>). Single writer (tick driver thread), multiple readers (diagnostics, metrics).
- TierExtensions
Extension helpers for SimTier.
- TimeoutOptions
Configuration options for lock acquisition timeouts across all engine subsystems.
- TraceLocation
Knows where a database's profiling captures live:
{name}.typhon/profilings/(#616, design D-1).
- TraceRecordBatch
A pooled, refcounted batch of raw trace records passed from the consumer drain loop to one or more exporters. Replaces the Phase 1/2
TraceEventBatch(which held a fixedTraceEvent[]) with a variable-size byte payload plus an offsets index for record walking.
- Track
An ordered, tagged container of Dags — the top level of the runtime partitioning hierarchy (
Engine → Track → DAG → Phase → System).
- Transaction
A single MVCC snapshot-isolated transaction: the unit of ECS reads and mutations (Spawn / Open / Destroy, component reads and writes) executed against the snapshot fixed at its TSN. Obtained from a UnitOfWork (or the convenience CreateQuickTransaction(DatabaseEngine, DurabilityMode, CommitDiscipline)) and finished with Commit(ConcurrencyConflictHandler) or Rollback().
- TransactionExceedsPageCacheException
A commit needs more of the page cache than the cache has: the pages it holds itself — its own dirty marks, and the pages its own epoch pin keeps — fill every slot a wait could get back, so no amount of waiting can serve it. Thrown before the commit's WAL append; the transaction is rolled back. Not transient: the same commit fails the same way. Commit in smaller batches, or enlarge the page cache.
- TransactionSequenceExhaustedException
The engine's transaction sequence numbers are exhausted (#1208): a TSN is stored in 48 bits, and no transaction starts once the counter reaches 2^47 minus a fixed margin. Not transient — no retry, eviction or reopen brings the counter down: the database must be migrated to a fresh one.
- TransactionTimeoutException
A transaction exceeded its overall deadline. Tier 1 class — throw sites activated in Tier 2 when Execution Context is implemented.
- TyphonActivitySource
Provides the centralized ActivitySource for Typhon distributed tracing.
- TyphonException
Base class for all Typhon engine exceptions. Provides structured error information: numeric code and transience hint.
- TyphonOptions
Fluent configuration for the one-line Typhon setup surface — AddTyphon(IServiceCollection, Action<TyphonOptions>) and Open(string, Action<TyphonOptions>, ILoggerFactory).
- TyphonProfiler
Static lifecycle façade for the Tracy-style profiler. Manages the consumer drain thread, the per-exporter consume threads, and the exporter list.
- TyphonRuntime
Top-level runtime for Typhon game servers. Wraps DatabaseEngine and DagScheduler, managing the per-tick UoW/Transaction lifecycle so game developers never handle commits manually.
- TyphonSpanAttributes
Centralized attribute name constants for distributed tracing spans.
- TyphonTimeoutException
Base for all timeout-related exceptions. Enables
catch (TyphonTimeoutException)to handle any timeout uniformly. Does NOT inherit from TimeoutException (would break single-inheritance chain).
- UniqueConstraintViolationException
Thrown when an insert or update would create a duplicate key in a unique index.
- UnitOfWork
The durability boundary for user operations. Batches multiple transactions for efficient persistence while maintaining atomicity guarantees on crash recovery. Each UoW is assigned a UoW ID that stamps all revisions created within its scope.
- ViewBase
Non-generic base class for EcsView<TArchetype> and NavigationView<TSource, TTarget>. Contains entity set management, delta tracking, disposal, and process-unique ViewId generation.
- WalBackPressureTimeoutException
A WAL commit buffer claim timed out waiting for buffer space (back-pressure). Always transient — the buffer will drain and space will become available.
- WalClaimTooLargeException
A single WAL claim exceeds the entire buffer capacity. Not transient — the claim can never succeed without reconfiguring the buffer.
- WalSegmentException
A WAL segment file operation failed (creation, rotation, or header validation).
- WalWriteException
A fatal WAL write I/O failure occurred. The engine cannot accept durable commits after this error (fail-fast per ADR-020). Not transient — requires engine restart.
- WalWriterOptions
Configuration options for the WAL Writer thread.
Structs
- AabbClusterEnumerator
Zero-allocation AABB query enumerator over the per-cell cluster spatial index of a single archetype (issue #230 Phase 3). Shared between the game-facing generic entry point AABB<TBox>(in TBox, uint) and the engine-facing non-generic entry point QueryAabb(SpatialGrid, double, double, double, double, double, double, uint). Handles all four cluster storage tiers — 2D and 3D, f32 and f64 — through a single state machine: the 3D overlap test is a strict superset of the 2D test, and 2D archetypes are queried with an infinite Z range that trivially passes the Z component of the overlap check.
- Admission
The answer an application's admission hook gives: a role and limits, or a refusal carrying the close code the client is told.
- AdmissionRequest
What a connecting client presented, as the application's admission hook sees it.
- ArchetypeAccessor<TArch>
Fast-path entity accessor pre-bound to a specific archetype. Bypasses epoch checks, archetype lookup, and null guards that are redundant for PTA workers.
Created via For<TArch>(). Must be disposed after use.
- ArchetypeMask256
Compact archetype bitset covering up to 256 archetypes using 4 inline ulongs (32 bytes). Used for Tier 1 query evaluation: a single AND instruction per entity to test archetype membership.
- ArchetypeMaskLarge
Large archetype bitset for >256 archetypes, backed by a
ulong[]array. Same API as ArchetypeMask256 but supports up to 4096 archetypes.
- ArchetypeR1
Persisted archetype schema. One entity per registered archetype. Enables load-time validation: mismatch between persisted and runtime archetype definitions → hard error.
- ArchetypeStat
One archetype's live entity count.
- AssemblyR1
Persisted identity of a .NET assembly that declares one or more components/archetypes stored in this database — the self-describing schema manifest. One entity per assembly. Stores identity (simple name + version + public-key-token), never a filename/path: the Workbench resolves the assembly by simple name at open time. The core engine assembly (Typhon.Engine) is intentionally excluded — it is always loaded — so it never gets a row.
- BulkLoadProgress
Snapshot of bulk-session progress passed to ProgressReporter.
- CapacityMetrics
Tracks utilization of a bounded slot-based structure.
- ClientCommand<T>
One command as a system reads it: who sent it, which of that client's it is, the client frame it belongs to, and its value.
- ClusterBroadphaseHit
One cluster a spatial query's broadphase admitted, reported without reading a single entity inside it.
- ClusterEnumerator<TArch>
Iterates active clusters for an archetype. Owns a Typhon.Engine.Internals.ChunkAccessor<TStore> — must be disposed.
- ClusterRef<TArch>
Per-cluster accessor providing typed, zero-copy access to component SoA arrays. Created by ClusterEnumerator<TArch>. Must not outlive the enumerator.
- ClusterSpatialAabb
Per-cluster tight AABB plus category mask, used by the per-cell cluster spatial index (issue #230). One instance per spatially-active cluster, indexed by clusterChunkId. Stored in-memory only on Typhon.Engine.Internals.ArchetypeClusterState and rebuilt at startup via
RebuildClusterAabbsfrom entity positions (Q2/Q6 transient-state decision).
- ClusterSpatialQueryResult
Result of a cluster spatial query match. Holds the matched EntityId, its location inside the cluster storage (chunk id and slot index), the entity's tight bounds as read by the narrowphase, and — for Radius queries — the squared distance from the query center to the closest point on the entity's AABB. For AABB queries, DistanceSq is
0and should be ignored.
- ClusterSpatialQuery<TArch>
Zero-allocation per-cell cluster AABB query for a single archetype (issue #230). The query expands the requested AABB into the overlapping grid cells, iterates each cell's Typhon.Engine.Internals.CellSpatialIndex as a linear broadphase, and for each broadphase-hit cluster performs a narrowphase scan over its occupied entity slots.
- ClusterWorldAabb
A cluster's tight bounds in world coordinates, f64 — what SpatialBounds hands back (#914).
- Codec
A wire codec, as an application names it in a projection, an event or a command. One value of the closed set of CodecKind, plus the parameters that kind reads.
- CommandBatch<T>
This tick's commands of one type, in per-session arrival order.
- Comp<T>
Typed component handle — identifies a component type within the ECS system. Stored as
static readonlyfields on archetype classes to declare schema.
- ComponentCollectionAccessor<T>
Mutable accessor for a collection-typed component field — the variable-sized element list backing a ComponentCollection<T> value. Appends and replacements reach the owning field by
ref, transparently performing copy-on-write when the buffer is shared across MVCC revisions. Must be disposed; disposal commits the pending buffer writes.
- ComponentR1
Persisted schema descriptor for a registered component (revision-1 layout). One row per component; makes the database self-describing and enables load-time schema validation against the runtime component definitions.
- ComponentValue
128-byte self-contained component value used during entity spawning. Carries component type ID, data size, and up to 112 bytes of inline component data.
- DatabaseLockFile.ClaimRequest
A claim in flight on a yieldable database.
- DatabaseLockFile.LockInfo
Who holds a database, and whether they are willing to step aside.
- Deadline
A monotonic absolute deadline for timeout enforcement. Convert a relative TimeSpan to Deadline once at the operation entry point, then share the deadline through all nested calls — eliminating timeout accumulation.
- DeltaView
A zero-allocation, filtered read-only view over a View's internal delta dictionary. Provides O(1) Count and Contains(long) lookups.
Lifetime: This struct shares the same lifetime as its parent ViewDelta. It becomes invalid after
ClearDelta()is called on the owning View.
- DiskIOMetrics
Tracks read/write operations to persistent storage.
- DistanceBand
One distance band: beyond Beyond of the radius, updates every Every ticks (09 § 9).
- DurationMetric
A named duration metric tracking time cost of discrete operations.
- EcsQuery<TArchetype>
ECS query builder with three-tier evaluation: T1 (ArchetypeMask), T2 (EnabledBits), T3 (WHERE — future). Supports polymorphic queries (archetype + descendants) and exact queries (single archetype).
- EcsQuery<TArchetype>.EcsQueryEnumerator
Iterates pre-collected query results, yielding read-only EntityRefs; their component reads return copies. To write, open the entity with OpenMut(EntityId) or TryOpenMut(EntityId, out EntityRefMut).
- EcsView<TArchetype>.EntityIdEnumerator
Enumerator that wraps HashMap<long>.Enumerator and yields EntityId. Ref struct (HashMap enumerator is ref struct).
- EntityBudget
Per-system entity budget for overload Level 2 scope reduction. When the budget is exceeded, remaining entities are deferred to subsequent ticks.
- EntityCommands
A parallel system's handle on its own worker slot of the tick's entity-command buffer (#1099). Queue a spawn or a destroy from inside a parallel chunk, without a transaction; the engine applies the buffer in one fence phase.
- EntityId
64-bit entity identifier: 48-bit monotonic EntityKey (upper) + 16-bit per-DB archetype routing id (lower). Routes to the correct per-archetype LinearHash and uniquely identifies an entity within the engine.
- EntityLink<T>
Typed entity reference — an 8-byte wrapper around EntityId that provides compile-time archetype safety. An EntityLink<T> accepts Building, House, or any descendant archetype.
- EntityRecordHeader
Header of an entity record stored in the per-archetype LinearHash. 14 bytes: BornTSN (6B) + DiedTSN (6B) + EnabledBits (2B). Component locations (4B × N) follow immediately after in raw byte storage.
- EntityRef
Read-only entity handle. A ref struct that copies the EntityRecord from the per-archetype LinearHash and provides typed component reads via cached Location ChunkIds. Reads return copies, so the handle stays valid for its whole transaction (#1199).
- EntityRefMut
Writable entity handle: everything EntityRef reads, plus Set<T>(Comp<T>, in T), Enable<T>(Comp<T>) and Disable<T>(Comp<T>). Returned by
OpenMut/TryOpenMuton every accessor;Open/TryOpenreturn the read-only EntityRef, which has no write member at all — writing through a read-only open does not compile (#997).
- EventWriter<T>
A producer's handle on one worker slot of an EventQueue<T> (#861). Resolve it once per system body, then push through it.
- ExecutionPlan
Describes the primary scan stream and selectivity-ordered filter chain for a query. Built by Typhon.Engine.Internals.PlanBuilder, consumed by Typhon.Engine.Internals.PipelineExecutor.
- FieldEvaluator
A single scalar field predicate: compares one indexed field against a constant threshold. Packed to 16 bytes for cache-dense storage in an execution plan's filter chain.
- FieldR1
Persisted schema descriptor for a single field of a component (revision-1 layout). Stored inside the owning component's Fields collection to make the database self-describing.
- FrameSkipCounts
Frames the engine denied a session since the process started, one count per cause. Cumulative.
- GroupDecision
The application's verdict on a GroupRequest.
- GroupInterest
A profile observer's interest in a group set: the set, and for a region set the reach its extents are met at.
- GroupRequest
A client's request for one key of an explicit group set, as the application's verdict sees it (14 § 4, P13).
- HealthThresholds
Thresholds for determining health status based on utilization.
- IndexRef
Opaque, reusable reference to a component index (primary key or secondary). Resolved once (cold path via GetPKIndexRef<T>() or GetIndexRef<T, TKey>(Expression<Func<T, TKey>>)), reused many times at zero cost (hot path). Captures a layout version for O(1) staleness detection.
- LinkInfo
What a transport knows about a peer before the peer has said anything.
- Locus
Where a finding is, in every addressing scheme that applies to it.
- MemoryMetrics
Tracks byte allocations owned by a resource node.
- MigrationFailure
Records a single entity that failed during migration, including its primary key, a hex dump of the old data, and the exception.
- OpenSessionView
Every open session, as a
foreachan application can write without the table being public.
- OpenSessionView.Enumerator
The cursor over the open sessions.
- PackPageDamage
A page that failed its check in a pack page source.
- PageAccessor
Lightweight, zero-overhead typed accessor for an 8KB page in the memory-mapped cache. Provides type-safe access to the three page regions: Header (64B), Metadata (128B), RawData (8000B).
- PageBaseHeader
The fixed 16-byte header at the start of every storage page: role flags, block type, format/change revisions, a CRC32C checksum, and a seqlock-style modification counter for torn-page detection. Laid out sequentially with 4-byte packing and kept at exactly 16 bytes so page-layout offsets stay stable.
- Phase
A phase token in the system scheduler. Phases form a DAG-local total order (see RFC 07 / Q3), and every system belongs to a phase of its DAG. The order binds through declared access only: a system in phase N+1 starts after a system in phase N when their declarations conflict (rule ED-05), and may run alongside it otherwise. A read the system does not declare — including one made through a spatial query — is ordered by nothing.
- PointSelector
Which backup point an operation targets: the newest one, or one by its id. (Restore-to-LSN and restore-to-time come with #1418.)
- PooledEntityList
ArrayPool<T>-backed read-only entity collection used by Entities. Avoids per-tick allocations after warm-up. The backing array is rented from the shared pool at system dispatch and returned via Typhon.Engine.PooledEntityList.Return after the system completes.
- PooledEntityList.Enumerator
Stack-allocated enumerator over the entity array segment.
- PooledEntitySlice
Zero-copy window into a PooledEntityList's backing array. Used by parallel QuerySystem dispatch to give each chunk its entity slice without copying.
- PooledEntitySlice.Enumerator
Stack-allocated enumerator over the entity array slice.
- RealmId
Identifies a realm: one of the strictly isolated worlds a DatabaseEngine hosts (a planet, a space sector, a building interior, a dungeon instance). An entity is in exactly one realm at a time; every spatial structure, query and replication view is scoped to one realm.
- RealmR1
One entry of the persisted realm catalog (Realms decision D-1): the IDENTITY of a named realm — the fields that decide which cell a position files into — so a later open can rebuild the realm's spatial layer before the application has said anything, and refuse a registration that would re-map every entity of it.
- RealmStat
One realm: what it is, what it is doing, and the replication work its sessions have been served.
- RealmStateCounts
Registered realms per run state this tick (Counts).
- RealmsAccessor
What a system reads of the realm policy this tick (Realms): each realm's state, rate divisor and the delta time a cluster of it integrates over.
- RepairStepResult
The receipt for one applied step.
- ResourceMutationEventArgs
Event args for NodeMutated. Raised on Add/Remove; carries the minimal identification needed to invalidate subscribers' caches without forcing a full graph copy.
- Result<TValue, TStatus>
A zero-allocation result type for hot-path methods.
TValueis the data;TStatusis a per-subsystem byte enum. Convention: status value 0 = Success in all enums.
- SchemaHistoryR1
Audit trail entry for schema changes. One entity is created for each component schema change (add/remove/widen fields, migration function execution, etc.).
- SessionCloseCounts
Sessions closed since the process started, one count per close reason. Cumulative.
- SessionEvent
One thing that happened to one session, as an application system reads it in the tick.
- SessionId
One connected client's identity: a 16-bit table slot and a 16-bit generation packed into a 32-bit value.
- SessionRequest
Steers one session from inside a system: its profile, its observers, what it controls, its budget, and whether it stays.
- SpanStream
A forward-only cursor over a Span<T> of bytes: each
Popreads a value (or sub-span) from the front and advances past it. A ref struct, so it lives on the stack and cannot outlive the span it wraps. No bounds checking — the caller must not read past the end.
- SpatialFieldInfo
Describes the spatial index field on a component: its layout within the component data, the type of spatial bounds, and the index parameters (margin, cell size). Stored in SpatialIndexState and set at component registration time.
- SpatialGridAccessor
Game-facing read/write accessor for the engine's Typhon.Engine.Internals.SpatialGrid (issue #232). Exposed on SpatialGrid so system callbacks can assign cell tiers, query cell coordinates, and use multi-observer helpers (SetCellTierMin(int, int, int, SimTier), ResetAllTiers(SimTier), SetTierInAABB(double, double, double, double, double, double, SimTier)).
- SpatialGridConfig
Immutable configuration for the engine-wide spatial grid. Set once via ConfigureSpatialGrid(SpatialGridConfig) before archetypes are initialized.
- SpatialGridOccupancy
A snapshot of the sparse spatial grid's occupancy and memory (#872 step 8). Obtained from GetSpatialGridOccupancy(); all-zero when no grid is configured.
- SpatialMigrationTelemetry
A snapshot of one archetype's spatial-partitioning counters, or of the whole engine's when obtained from GetSpatialTelemetryTotal(). Obtained from GetSpatialTelemetry(int).
- SpatialRegionHandle
Opaque handle to a registered trigger region. Validated via generation counter to detect use-after-destroy.
- SpatialTriggerResult
Zero-allocation result of a trigger region evaluation. Contains EntityIds of entities that entered, left, or stayed. Spans point into system-internal buffers and are valid only until the next
EvaluateRegioncall.
- SpatialTriggerVolumes
Trigger volumes for one spatial component type: define regions, then ask each which entities entered, left, or stayed since the last evaluation.
- StorageIntegrityIssue
One concrete consistency violation found by RunStorageIntegrityCheck(). The combination (Kind, SegmentRootPageIndex) localises the bug; Detail carries the human-readable summary; the integer fields give the exact counts so the caller can produce structured assertions.
- StorageSegmentDescriptor
Read-only description of one logical segment's on-disk footprint — its kind, the file pages it owns, and (for chunk-based segments) the chunk-layout constants the Database File Map's L3/L4 decoders need. Produced by EnumerateStorageSegments() for the Database File Map (Module 15).
- SystemStat
One system's mean cost over the window, and the rate it runs at.
- SystemTelemetry
Per-system-per-tick telemetry metrics. Recorded at the end of each tick by the scheduler.
- TelemetryFlagDescriptor
One node of the telemetry flag catalog — its config key, C# gate field, default and tree position.
- ThroughputMetric
A named throughput counter tracking monotonically increasing operations.
- TickContext
Context passed to CallbackSystem and QuerySystem delegates during tick execution. Provides a valid Transaction for entity operations and a factory for side-transactions.
- TickOutcome
Outcome of the most recently completed tick, exposed by LastTickOutcome and passed to OnTickAborted.
- TickTelemetry
Per-tick telemetry snapshot. Recorded at the end of each tick into the TickTelemetryRing.
- TierBudgetMetrics
Per-tier cost and entity count metrics from the previous tick (issue #234). Exposed on TierBudgetMetrics so game code (typically the
TierAssignmentCallbackSystem) can adaptively adjust tier boundaries based on actual tick cost vs. budget.
- Transaction.IndexEntityEnumerator<T, TKey>
MVCC-correct streaming enumerator over the per-archetype index B+Trees backing one component. Use CurrentComponent for zero-copy ref access into page memory, or Current for a convenience copy. Supports both unique and AllowMultiple indexes.
- Transaction.ReadOnlyCollectionEnumerator<T>
Zero-copy, read-only
foreachenumerator over the elements of a component collection buffer.
- UnitOfWorkContext
A 24-byte execution context that flows through all operations inside a Unit of Work (or standalone transaction). Embeds a WaitContext (deadline + cancellation) and adds UoW identity and holdoff state. Lock sites can use
ref ctx.WaitContextdirectly — zero construction cost.
- Vector3D
A three-component double-precision point, used for the spatial grid's world frame — its bounds, its cell size and the cell origins derived from them (#914).
- ViewDelta
A zero-allocation view into the delta state of a ViewBase (e.g. EcsView<TArchetype> or NavigationView<TSource, TTarget>).
Lifetime: This struct references the View's internal delta storage directly — no copies are made. The data is only valid until the next call to ClearDelta(). After
ClearDelta(), all collections will appear empty. Do not cache this struct across refresh cycles.Typical usage:
view.Refresh(tx); var delta = view.GetDelta(); // Process delta.Added, delta.Removed, delta.Modified view.ClearDelta(); // delta is now invalid — all collections report empty
- WaitContext
A 16-byte immutable value type that bundles a monotonic deadline with cooperative cancellation, passed by reference to all blocking synchronization primitives.
- WalRecoveryResult
Result of a WAL crash recovery operation.
- WalSegmentRef
One WAL segment file found beside the data file, described without being parsed.
Interfaces
- DatabaseDefinitions.IDBComponentDefinitionBuilder
Fluent builder for a component definition.
- DatabaseDefinitions.IDbComponentFieldDefinitionBuilder
Field-scoped extension of DatabaseDefinitions.IDBComponentDefinitionBuilder for configuring the most recently added field.
- IArchetypeMask<TSelf>
Generic interface for archetype bitsets. Enables JIT specialization via constrained generics:
where TMask : struct, IArchetypeMask<TMask>compiles to direct calls with zero virtual dispatch. Same pattern as Typhon.Engine.Internals.IPageStore (PersistentStore/TransientStore).
- IBackupService
Online backup of a running database (Backup): a consistent point taken while the engine keeps committing, one at a time, on the engine's backup thread. Scheduling and retention are the application's until the engine's scheduler arrives (#1416).
- IDebugPropertiesProvider
Implemented by resources that can provide detailed debug properties for diagnostic drill-down.
- IMetricSource
Implemented by resources that expose measurable metrics.
- IMetricWriter
Writer interface for zero-allocation metric collection during snapshot operations.
- IPageSource
A read-only, random-access source of 8 KiB storage pages. The seam every integrity check reads through, so the same catalogue can run against an offline bundle, a live engine, a backup file, or a synthetic in-memory image.
- IProfilerExporter
Sink for batches of trace records drained by the profiler consumer thread. Implementations receive batches on their own dedicated thread (one OS thread per attached exporter, owned by
TyphonProfiler) and write them to a file, TCP socket, OTLP collector, in-memory list, etc.
- IRadiusBatchSink
Receives a batched radius query's hits (ForEachInRadius<TSink>(ReadOnlySpan<BSphere2F>, ref TSink, uint)): one call per (member, hit), each member's hits in the order its own query's
MoveNextyields them.
- IReplicatedArchetype
An archetype replicated by attributes (design/Subscriptions/11 § 5). Implemented by the Typhon source generator on every
[Replicated]archetype, never by hand: DeclareReplication(ArchetypeProjectionBuilder) is the builder calls its attributes compile to, and Archetype<TArchetype>() is what applies them.
- IResource
A node in Typhon's runtime resource graph: a named, typed element of the engine tree that owns child resources and participates in lifecycle (disposal) and diagnostic snapshotting. Nodes with measurable state additionally implement IMetricSource.
- IResourceGraph
Entry point for the resource graph. Provides tree traversal and snapshot collection.
- IResourceRegistry
Central registry for all managed resources in Typhon. Provides a hierarchical tree structure for lifecycle management and observability.
- ISchemaRegistrar
Allows callers to register component types and migrations for dry-run validation.
- ISubscriptionAcceptor
The engine's side of the transport seam: it turns a link into a connection that speaks the protocol.
- ISubscriptionConnection
One connection as the transport drives it: inbound messages, and the end of the link.
- ISubscriptionLink
One connection's bytes, as the engine uses them: a reliable ordered message channel, an optional unreliable one, and a close.
- ISubscriptionTransport
A listener that turns connections into links: the built-in TCP transport, the ASP.NET Core adapter, or a test fake.
- ISystem
Common shape for class-based systems registered with RuntimeSchedule. Implemented by QuerySystem, CallbackSystem, and PipelineSystem.
- ITyphonHealthCheck
Interface for Typhon health checks, independent of ASP.NET Core.
- IView
Consumer-facing handle to a registered view. Concrete views derive from ViewBase; consumers usually hold the derived type, but the registry / framework code that doesn't need to know the specific generics holds an IView reference instead.
Enums
- AlertSeverity
Alert severity levels.
- BTreeLookupStatus
Status codes for B+Tree key lookups.
- BackupAbortReason
Why an online backup (CreateAsync(string, BackupRequestKind, CancellationToken)) was abandoned.
- BackupFindingSeverity
Whether a finding costs a restore.
- BackupHealth
A store's health, from its packs alone (the engine's status file and scheduler health come with #1416).
- BackupPackStatus
A pack's state after a verify.
- BackupPointKind
The kind of a backup point.
- BackupRequestKind
What CreateAsync(string, BackupRequestKind, CancellationToken) is asked for.
- BackupVerifyLevel
How deep a verify reads.
- BackupVerifyVerdict
A verify's overall answer;
typhon backup verifymaps it to exit 0, 1, 2, 3.
- ClusterSleepState
Per-cluster dormancy state (issue #233). Clusters transition through Active → Sleeping → WakePending → Active. Sleeping clusters are skipped during dispatch at zero cost; WakePending clusters become Active at the start of the next tick so woken clusters appear in the per-tier lists before any system runs.
- CommandCoalesce
How a command type's arrivals are delivered into a tick.
- CompareOp
Comparison operator applied between a field value and a predicate threshold.
- CompatibilityLevel
Severity of a schema change, ordered from harmless to Breaking.
- ComponentTableFlags
Bit flags describing optional storage features enabled on a ComponentTable.
- DeferralMode
Strategy for selecting which entities to process when a system's entity budget is exceeded. Remaining entities are deferred to subsequent ticks.
- DurabilityHealth
Health of the durability subsystem (checkpoint cycle + WAL), surfaced for introspection and used by the checkpoint failure classification (CK-06).
- DurabilityMode
Controls when WAL records become crash-safe. Specified per Unit of Work at creation time.
- EventRouting
How an event finds the sessions that should hear it.
- ExhaustionPolicy
Defines how a component responds when a bounded resource reaches its limit.
- FieldChangeKind
Kind of change detected on a field or its index between the persisted schema and the current one.
- GroupSelector
What decides which keys of a group set a session holds (14 § 3.1, P1).
- HealthStatus
Health status enumeration compatible with standard health check conventions.
- IntegrityConfidence
Whether a finding was observed on a source that could not have been mutating underneath the scan.
- IntegritySeverity
How bad a finding is. Ordered most-severe first so a numeric comparison ranks findings.
- IntegrityVerdict
The one-word answer to "is my database sound?". A single grep-able token, because an operator scanning a fleet needs exactly that.
- KeyType
Scalar type of an indexed field, used to reinterpret its raw bytes when evaluating a predicate.
- LossKind
The unit in which a repair would lose something.
- MetricKind
What a metric measures.
- MigrationPhase
Describes the current phase of an in-progress schema migration.
- ObserverKind
The shape of one region of interest.
- OpenVerification
How much of a database to verify while opening it.
- OverloadLevel
Current overload response level. Each level adds more aggressive degradation measures on top of the previous.
- PackDamageMode
What a pack page source does with a page that fails its check.
- PageBlockFlags
Bit flags stamped in the first byte of a page's PageBaseHeader, describing the page's role in a logical segment.
- PageBlockType
Coarse structural category of a page, stored in Type.
- PageChecksumVerification
Controls when page CRC verification occurs.
- PushDetection
Who tells the push path that an entity changed (
design/Subscriptions/research/push-model.md).
- RealmRate
How a QuerySystem runs over a realm simulated at a divisor (UnobservedTickDivisor).
- RealmRunState
What a realm is doing this tick, as its policy decided at tick start (RLM-03).
- RealmUnobserved
What a realm does while no session observes it and no application pins it.
- RepairAction
The kinds of repair this build can actually perform.
- RepairClass
What a repair step is allowed to do, which is the safety boundary of the whole feature.
- Repairability
What, if anything, can be done about a finding from within the database.
- ResourceMutationKind
Kind of mutation applied to the resource graph. Emitted by NodeMutated.
- ResourceSubsystem
Subsystem categories for grouping resources in the registry tree.
- ResourceType
Classification of a resource-graph node, used for filtering (e.g. by FindByType(ResourceType)) and for display. Values are grouped by engine layer (structural, service, transaction, storage, persistence, metadata, synchronization, durability).
- RestoreRefusalReason
Why a restore refused to write its target.
- RevisionReadStatus
Status codes for revision chain reads (MVCC-aware).
- ScanDepth
How much work a scan does, and therefore what it can conclude.
- ScanMode
How the scan reached its pages, which bounds what its conclusions are worth.
- SchemaChangeKind
Describes the kind of schema change recorded in the audit trail.
- SchemaObjectKind
What kind of schema object a SchemaHistoryR1 row refers to.
- SchemaValidationMode
Controls how schema mismatches are handled during component registration.
- SessionCloseReason
Why a session ended.
- SessionEventKind
What happened to a session.
- SessionRole
What a session is allowed to do, decided by the application's admission hook and carried on the session for the rest of its life. A command type names the roles it accepts; a session outside that set never reaches the system that applies it.
- SimTier
Simulation tier for tier-filtered system dispatch (issue #231). A spatial cell's tier determines which game systems process the clusters attached to that cell — Tier 0 cells run every system every tick, Tier 3 cells may only be touched by aggregate models.
- SkipReason
Reason a system was skipped during tick execution.
- SpatialFieldType
Compact discriminator for the spatial field type on a component. Maps to the Schema.Definition FieldType values but is a lightweight internal representation.
- SpatialVariant
Identifies the spatial index variant: dimensionality (2D/3D) and precision (f32/f64). Determines node layout, capacity, and coordinate handling.
- StepOutcome
What happened to one step when the plan was applied.
- StorageHealthState
How the page cache keeps up with the work given to it (#1382). The engine does not fail the work for being slow: an allocation that waits on back-pressure goes on waiting while pages are being served, and the state says so — so a workload too large for the cache and the disk it was given is seen, not silently slowed. Reported in the log on every change, in the profiler's gauges and in the resource tree, and readable from StorageHealth.
- StorageIntegrityIssueKind
Class of consistency violation surfaced by RunStorageIntegrityCheck(). Every value names an invariant that must hold across a healthy engine — a non-zero issue list is a hard durability / structural bug, not a warning.
- StoragePageType
Semantic classification of a single file page, used by the Workbench Database File Map (Module 15). Unlike PageBlockType — which only distinguishes
None/OccupancyMap— this enum captures the role a page plays in the engine's storage graph.
- StorageSegmentKind
Runtime role of a logical segment, as reported by EnumerateStorageSegments().
- SystemExceptionPolicy
Controls what an unhandled exception thrown by a system means for the rest of the tick. Set via SystemExceptionPolicy; the default is Isolate, which is the behaviour Typhon has always had.
- SystemPriority
Priority level for system scheduling under overload conditions. Defined here for DAG construction; enforcement deferred to overload management (#201).
- SystemType
Defines the execution model of a system in the system DAG.
- TelemetryFlagKind
Kind of a telemetry flag — how its gate is resolved. See the catalog design (#522).
- TickOutcomeReason
Why a tick ended the way it did. Carried by Reason.
- Transaction.TransactionState
Lifecycle state of a Transaction. Transitions are one-way (see State).
- TyphonErrorCode
Numeric error codes organized by subsystem range. Only implemented codes are defined; reserved ranges are filled as later tiers are built out. Codes within a range are assigned sequentially as needed; gaps are intentional to allow insertion without renumbering.
- UnitOfWorkState
State machine for UoW lifecycle. Transitions are one-way.
Delegates
- AdmitHandler
The application's admission hook: it is handed everything a connecting client said about itself and answers with a role and limits, or a refusal.
- ByteMigrationFunc
Byte-level migration function for scenarios where the old struct type is no longer available in code. Receives raw bytes of the old component and must produce raw bytes of the new component.
- ChunkExecute<TChunk>
One chunk of a chunked system, handed the record its dispatch's prepare wrote for it — by
ref, so no member call on it copies it.
- ChunkPrepare<TChunk>
The prepare step of a lambda-declared chunked system (ChunkedSystem<TChunk>(string, ChunkPrepare<TChunk>, ChunkExecute<TChunk>, string, string[], SystemPriority, Func<bool>, int, int, int, bool)): sizes
planwith Reset(int), fills one record per chunk, and returns the chunk count — 0 skips the system this tick, -1 keeps one chunk. Runs on one thread, before any chunk is claimed.
- CommandPrecheck<T>
A stateless, syntactic check run on the transport thread before a command ever reaches the tick.
- GroupRequestHandler
Decides a client's request for a key of an explicit group set (Explicit(GroupRequestHandler)).
- MetricValuesSource
Fills a labelled metric's values, one per label in the declared order (09 § 15, D5).
- MigrationFunc<TOld, TNew>
Strongly-typed migration function that transforms a component from one revision to another. Both types must be unmanaged structs with [Component] attributes sharing the same Name but different Revisions.
- SideTransactionFactory
Factory for side-transactions created from a TickContext. The
disciplineselects the commit discipline for SingleVersion-layout writes (TickFence default, or Commit for zero-loss, atomic, commit-scoped writes).