ProtectedconstructorProtected Static ReadonlyValueThe unique index on (RecordProcessID, ValueKeyHash): a second insert of a key fails on it.
StaticInstanceProtectedAssignSets a new row's key columns (record, feature, pin, input, source) and its key hash.
ProtectedAssignSets a row's value, reasoning, confidence, run links and ComputedAt.
Performs a single batch lookup for multiple key hashes.
Filters out expired entries and increments HitCount on valid hits, unless recordHit is false.
Use ComputeCacheKey.
Computes the deterministic SHA-256 key hash, canonical JSON, and display string. Uses KeyFields when provided, or falls back to the full rendered context / record data. Field names match case-insensitively and text inputs are normalised (FeatureValueKey.NormalizeValue).
ProtectedConcurrentWhether a row another run inserted on the key between this write's read and its insert (two runs over the same scope) already holds this typed value, so the write is satisfied. Read fresh.
ProtectedFindThe row on a store's key, expired or not; null when there is none.
The Global Object Store is a place to store global objects that need to be shared across the application. Depending on the execution environment, this could be the window object in a browser, or the global object in a node environment, or something else in other contexts. The key here is that in some cases static variables are not truly shared because it is possible that a given class might have copies of its code in multiple paths in a deployed application. This approach ensures that no matter how many code copies might exist, there is only one instance of the object in question by using the Global Object Store.
The most recent Source='Pipeline' value of each named feature of a record, by lower-cased feature name (a
feature with none is absent). One batched round trip, each feature's view bounded to its newest row.
The most recent Feature Value of a record and feature from one source, as its typed columns; null when there is none. Read fresh: the human-value guard decides from it whether a field may be overwritten.
ProtectedIsWhether row already holds this output: the same typed value, reasoning and confidence.
ProtectedLoadProtectedLoadEach output feature's latest Source='Pipeline' value for the record, on any key, by lower-cased feature name,
with the key of the row holding it. One batched round trip, one view per feature.
Looks up an existing cache entry. Returns null on miss or when expired.
Automatically increments HitCount and updates LastHitAt on hit, unless recordHit is false.
Upserts one Feature Value per output on its key (record, feature, pipeline version, prompt version hash, primary
model, parameters hash, input hash, source). A key that already holds the same value, reasoning and confidence is
left untouched while it is the feature's latest Pipeline value; when another key holds the latest one (a version
that becomes Active again), its ComputedAt and run links are refreshed so it is the latest again (counted
Unchanged). A historyOnly row is never refreshed. A changed row is updated in place; a new one is inserted.
How many outputs were upserted or unchanged, and each feature's latest pipeline value before the call.
Upserts the record's Human Feature Value for a feature: one per record and feature (the key carries no pin), so a later observation updates the row in place.
Deletes the record's Human Feature Values of a feature (sequentially, in the caller's transaction); returns how many.
ProtectedSaveSaves a row; null when it saved, else the provider's message (a rejected save included).
Stores a computed result on its cache key. An existing row for the key — expired or not — is updated in place, so an expired entry is refreshed rather than duplicated.
ProtectedWriteWrites one output on its key: unchanged, updated in place, or inserted. An unchanged row is saved only when
another key holds the feature's latest value (supersededByAnotherKey), to make it the latest again. An insert
that fails on the key's unique index because a concurrent run stored the same typed value first is Unchanged.
Protected StaticCacheThe SQL filter selecting a cache scope and pin; KeyHash conditions are appended by the caller.
Protected StaticCoerceThe typed value a string answer coerces to under its constraint type; undefined when no coercion applies.
OptionalconstraintType: "boolean" | "enum" | "lookup" | "numeric" | "money" | "date" | "freetext"Protected StaticgetReturns the singleton instance of the class. If the instance does not exist, it is created and stored in the Global Object Store. If className is provided it will be used as part of the key in the Global Object Store, otherwise the actual class name will be used. NOTE: the class name used by default is the lowest level of the object hierarchy, so if you have a class that extends another class, the lowest level class name will be used.
OptionalclassName: stringProtected StaticLatestThe entity, order, columns and freshness every latest-value read shares. "Latest" is the newest ComputedAt, ties
broken by creation time, then ID, so every read picks the same row.
StaticNativeA typed Feature Value as a native value: the column that holds it (JSON parsed); null when every column is empty.
Protected StaticNormalizeA key input as hashed: text normalised by FeatureValueKey.NormalizeValue, anything else as it is.
Protected StaticNormalizeA copy of a record with every value normalised by NormalizeKeyInput.
Protected StaticReadReads a field by name, matching the name case-insensitively when there is no exact match.
Protected StaticRecordThe SQL filter selecting one record's Feature Values of one feature in one pipeline.
Protected StaticSameWhether a row holds exactly this typed value.
Protected StaticSourceThe SQL filter fragment selecting one source's Feature Values.
StaticToA value in the typed column its JavaScript type maps to. A string answer to a numeric/money, boolean or date constraint is coerced into that constraint's column when it parses; otherwise it is stored as typed.
OptionalconstraintType: "boolean" | "enum" | "lookup" | "numeric" | "money" | "date" | "freetext"StaticTyped
Service managing the dedup cache (MJ: Feature Value Caches) and the keyed Feature Value upserts (MJ: Feature Values, one row per Feature Value key; a row's earlier values are in Record Changes).