ContractSpec runtime kernel
The existing root owns the unchanged EventRegistry class. Legacy /events
imports forward the same constructor and keep all event model and factory exports on their canonical Core owner. Registration, duplicate errors, version lookup and inherited filter/group behavior remain unchanged.
This canonical owner reuses the existing engine and supplied ports. No Forms/domain semantics, selected platform backend, host environment bridge, runtime authority or provider implementation enters this Foundation leaf. Legacy factory/function identity and native/browser storage conditions are preserved. Clean producer and consumer qualification remain pending.
Production declaration builds select tsconfig.build.json, preserving
rootDir: src while excluding tests and the private engine test helper. Source typechecking retains these fixtures through the unchanged
tsconfig.json; production-reachable portable helpers remain included.
Rich-reference registry and rich-content privacy
The existing root also owns the canonical reference-kind registry and subject, kind-policy, preference and audit port declarations. Registration remains explicit; duplicate registration and unknown-kind lookup retain their existing errors. Compatibility imports resolve the same registry and function bindings.
The existing @lssm-tech/lib.contracts-runtime-kernel/redaction root also exports the rich-content models and redactRichSegments, redactRichCodeBlock,
redactRichDiffBlock and richSegmentsToText. Redacted references retain their existing placeholders and explanations while dropping values, links and metadata. Authentication, policy decisions and durable audit persistence remain supplied ports and do not become grants of action authority.
createDenialTokenSigner and createSessionSalt use the existing CryptoUtils HMAC implementation and Web Crypto randomness through the kernel root. Caller keys, per-request salt requirements and fail-closed verification remain unchanged. Crypto-free DENIAL_TOKEN_PREFIX and looksLikeDenialToken shape checks remain available through /redaction, alongside the original text/code/diff builders.
The root also exposes the canonical ResourceRegistry, resource metadata/template types, defineResourceTemplate, resourceRef and isResourceRef. Resource URI matching retains literal escaping, registration order and URI decoding behavior. Resource resolution remains the original caller-supplied read-only callback; registration and matching provide no authorization for executing that callback.
The existing root owns the canonical SpecContractRegistry, keyOfSpecContract and complete registry utility family. Legacy registry imports forward the same class, functions and grouping object; duplicate errors, latest-version selection, filters, defaults and insertion order remain unchanged. The five intentional package roots are unchanged.
The existing root exposes the canonical OperationSpecRegistry and supplied OperationHandlerCtx ports. Hosts retain their exact branding and translation types, and variant selection and handlers share the same context type. Legacy imports specialize this same constructor with the original product context; installer inference, protected subclass access and runtime authority guards remain intact. The executor uses private preparation and invocation modules to satisfy the package size limit. Preparation calls its typed continuation at the original guard boundary without an unconditional await, preserving handler and context-mutation onset; promise settlement and resulting-tree performance still require measurement.
The existing root owns the complete data-view filter-scope family: resolveDataViewFilters, sanitizeDataViewFilterSet, filterSetToClauses, pruneDataViewFilterClauses, pruneDataViewFilterSet and the two input/result interfaces. User filters override initial values even when explicitly empty; locked conflicts are pruned and locked clauses remain last. Range operators, null clauses, clone behavior and the visible-disabled chip default remain unchanged. Legacy leaf and barrel imports forward the same functions. Resolution supplies filter constraints and does not authorize query execution.
The existing root exposes evaluatePredicateSpec and PredicateEvaluation. The complete original evaluator uses canonical Core predicate models and preserves all comparison coercions, branch precedence, default path resolution, callback/getter errors and insertion order of accessed paths. Every child is evaluated with children.map before the group result is combined. Legacy imports forward this same three-argument function; the existing DecisionRuntime two-argument evaluatePredicate wrapper remains unchanged. Matching supplies evidence and does not grant action authority.
The existing root exposes the canonical FeatureRegistry and PresentationRegistry for caller-supplied Core contracts. Compatibility registry leaves forward these exact classes. Feature duplicate errors, filters, grouping and insertion order remain unchanged; presentation registration and latest-version lookup retain the shared nominal superclass. Registration provides no runtime effect authority.
Entity and DataView registries
DataViewRegistry, dataViewKey, EntityRegistry, and tech_contracts_entities_registry_DocBlocks are exported from the existing Runtime Kernel root. The original implementations consume portable Core models and the canonical SpecContractRegistry superclass. Duplicate handling, version selection, protected storage, edge order, defaults and error text are unchanged. Supported Legacy registry paths forward the same class objects; the original compatibility tests remain unchanged. No populated catalog or UI implementation is installed by importing these registries.
The canonical ./forms/form-registry and ./forms/projection-lookup leaves own the complete generic nominal form registry and projection lookup helpers over Core form contracts. They preserve duplicate/version selection, private map identity and all filtering/grouping behavior. They import no Forms services, UI, host DTO, provider or persistence implementation. Historical paths forward to the same class and functions; this ownership change grants no authority.
Policy, rich-reference runtime, idempotency and prompt registry
./policy and ./policy/<leaf> (context, engine, guards, opa-adapter,
registry, requirements, spec, validation) own PolicyEngine,
PolicyRegistry, policy context/guards, the OPA adapter and policy validation.
./policy also exports the condition grammar: compilePolicyExpression,
evaluatePolicyExpression, PolicyExpressionError, POLICY_CONDITION_ROOTS
and POLICY_EXPRESSION_LIMITS. Conditions are parsed and interpreted, never run with eval or new Function. A condition that cannot be parsed or evaluated fails closed: it applies a deny rule and never grants an allow rule. validatePolicySpec reports such conditions, and malformed specs, as error issues instead of throwing.
./rich-reference/handler, ./rich-reference/redaction and
./rich-reference/runtime[/<leaf>] own the reference handler contract, kind redaction and the ReferenceRuntime dispatch/redaction enforcement.
./shared/idempotency (Node-only deriveIdempotencyKey) and
./shared/idempotency-shape (browser-safe shape).
./promptRegistry owns PromptRegistry (the PromptSpec model lives in
@lssm-tech/lib.contracts-spec-core/prompt).
Legacy @lssm-tech/lib.contracts-spec paths forward to these same instances.
The ./pwa/registry entry owns PwaAppManifestRegistry, comparePwaVersions
and getLatestPwaRelease. It consumes portable Core PWA models and preserves the canonical registry superclass and semantic version ordering. Historical PWA registry exports forward to this entry; PWA update contract definitions belong to the pure @lssm-tech/lib.progressive-delivery/pwa entry.
Built-in rich-reference kinds
The rich-reference/kinds entry owns the existing explicit seven-kind registration and entity resolver. The six pure kind definitions remain in Core; registration uses the same Kernel registry and rejects duplicate ids. The rich-reference/kinds/entity
leaf and rich-reference/__fixtures__/cross-adapter-fixture preserve the existing entity contract and adapter parity data. Imports do not populate a registry or grant authority. Legacy contracts-spec paths forward the identical objects.
Canonical compatibility leaves: ./migrations, ./model-registry. These leaves preserve the original implementations and object/class identity; legacy ContractSpec imports forward to these owners.