libraryPackage manifestv0.1.0

lib.contracts-runtime-kernel

Canonical framework-neutral ContractSpec engine, ports and storage; no Forms or backend authority

@lssm-tech/lib.contracts-runtime-kernel
Source, release and verification context

Source snapshot bcc79fcc · Declared package version 0.1.0. This page combines the checked-in package guide and manifest; commands and runtime behavior were not executed in this review.

Package source ↗ Manifest ↗
serverwebreact-nativenodebunbrowser
EXPLORE THE PACKAGE

See where this package fits.

Follow a declared connection, inspect an import, then open the source guide when you need the detail.

THIS PACKAGElib.contracts-runtime-kernelfoundation

Arrows point from a package to its direct dependency. Each count is derived from the captured manifests.

5 declarationsSELECT TO INSPECT

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.

Declared capabilities.

Framework-neutral ContractSpec runtime kernel

Existing query/cache/offline engine and supplied approval, transport, reachability, storage, collaboration, redaction and event ports.

Use it to

  • Compose the portable ContractSpec engine with caller-supplied ports without Forms services or automatic backend binding.

Requires

  • Caller-supplied ports and existing authority/principal context; platform storage facilities for the selected storage leaf.

Choose another boundary when

  • Forms services, Observability backend binding, host environment conveniences or provider implementations are required.
  • A storage leaf is selected outside its published browser or react-native platform condition.
  • A supplied port is being treated as a grant of runtime authority.

@lssm-tech/lib.contracts-runtime-kernelcreateOnlineOnlyDataEngine, createMemoryStorage

@lssm-tech/lib.contracts-runtime-kernel/engine/events

@lssm-tech/lib.contracts-runtime-kernel/redactionredactSecrets

@lssm-tech/lib.contracts-runtime-kernel/storage/async-storage

@lssm-tech/lib.contracts-runtime-kernel/storage/indexeddb

@lssm-tech/lib.contracts-runtime-kernel/forms/form-registryFormRegistry

@lssm-tech/lib.contracts-runtime-kernel/forms/projection-lookupfindFormProjection, formKey, formProjectionVersion, formProjectionKey, formProjectionKeyForSpec

@lssm-tech/lib.contracts-runtime-kernel/policy/context

@lssm-tech/lib.contracts-runtime-kernel/policy/engine

@lssm-tech/lib.contracts-runtime-kernel/policy/guards

@lssm-tech/lib.contracts-runtime-kernel/policy

@lssm-tech/lib.contracts-runtime-kernel/policy/opa-adapter

@lssm-tech/lib.contracts-runtime-kernel/policy/registry

@lssm-tech/lib.contracts-runtime-kernel/policy/requirements

@lssm-tech/lib.contracts-runtime-kernel/policy/spec

@lssm-tech/lib.contracts-runtime-kernel/policy/validation

@lssm-tech/lib.contracts-runtime-kernel/rich-reference/runtime/dev-invariants

@lssm-tech/lib.contracts-runtime-kernel/rich-reference/runtime/dispatch

@lssm-tech/lib.contracts-runtime-kernel/rich-reference/runtime

@lssm-tech/lib.contracts-runtime-kernel/rich-reference/runtime/redaction-enforcer

@lssm-tech/lib.contracts-runtime-kernel/rich-reference/runtime/runtime

@lssm-tech/lib.contracts-runtime-kernel/rich-reference/handler

@lssm-tech/lib.contracts-runtime-kernel/rich-reference/redaction

@lssm-tech/lib.contracts-runtime-kernel/shared/idempotency

@lssm-tech/lib.contracts-runtime-kernel/shared/idempotency-shape

@lssm-tech/lib.contracts-runtime-kernel/promptRegistry

Rich-reference registry, signing, governance ports and content privacy

Existing canonical reference-kind registry, denial-token signer and supplied subject, policy and audit ports, with rich-content builders/redaction preserving hidden values and metadata removal.

Use it to

  • Resolve registered reference kinds and redact rich code/diff content under supplied policy while retaining existing singleton identity and privacy behavior.

Choose another boundary when

  • Host authentication, policy decisions, audit persistence or action authorization are required; these remain supplied ports and separate runtime authorities.
  • A concrete UI renderer, provider, transport or populated domain kind registry is required.

@lssm-tech/lib.contracts-runtime-kernelregisterKind, getKind, tryGetKind, createDenialTokenSigner, createSessionSalt, AuditRecord, AuditSink, Subject, KindPolicy, KindPolicyProvider

@lssm-tech/lib.contracts-runtime-kernel/redactionredactRichSegments, redactRichCodeBlock, redactRichDiffBlock, richSegmentsToText, codeBlockFromText, diffBlockFromLines, textSegment, DENIAL_TOKEN_PREFIX, looksLikeDenialToken, RichContentRedactionPolicy

@lssm-tech/lib.contracts-runtime-kernel/rich-reference/kindsBUILT_IN_REFERENCE_KINDS, registerBuiltInReferenceKinds, entityKind, resolveEntitySpec

Resource URI template registry

Original resource registry, template definitions and resource-ref descriptors with preserved canonical class identity and URI matching/decoding behavior.

Use it to

  • Register and match caller-supplied read-only resource templates using the canonical class without importing compatibility registrations.

Choose another boundary when

  • Registration or URI matching is being treated as authorization to execute the supplied resource resolver.
  • A populated product resource catalog, concrete transport, backend or effectful resource implementation is required.

@lssm-tech/lib.contracts-runtime-kernelResourceRegistry, ResourceMeta, ResourceTemplateSpec, defineResourceTemplate, ResourceRefDescriptor, resourceRef, isResourceRef

Data-view filter scope resolution

Original complete filter sanitization, clause conversion and locked-scope precedence execution over canonical Core data-view models.

Use it to

  • Resolve user and locked data-view filters with original defaults and conflict semantics.

Choose another boundary when

  • Filter resolution is being treated as authorization to execute a data query.

@lssm-tech/lib.contracts-runtime-kernelResolvedDataViewFilters, ResolveDataViewFiltersInput, resolveDataViewFilters, sanitizeDataViewFilterSet, filterSetToClauses, pruneDataViewFilterClauses, pruneDataViewFilterSet

Portable predicate evaluation

Original complete PredicateSpec evaluator and deterministic path/comparison helpers, preserving callback order and accessed-path evidence.

Use it to

  • Evaluate canonical pure predicate contracts with caller-supplied path resolution.

Choose another boundary when

  • Predicate matching is being treated as a grant of authority or an action-policy decision.

@lssm-tech/lib.contracts-runtime-kernelevaluatePredicateSpec, PredicateEvaluation

Entity and DataView contract registries

Original nominal entity, edge and DataView registries for caller-supplied portable contracts, preserving shared superclass identity, duplicate errors and version-selection behavior.

Use it to

  • Store supplied entity, edge and DataView contracts through the canonical nominal registry classes without importing populated compatibility registries.

Choose another boundary when

  • A populated domain catalog, concrete UI renderer, backend or registration-as-authorization behavior is required.

@lssm-tech/lib.contracts-runtime-kernelDataViewRegistry, dataViewKey, EntityRegistry, tech_contracts_entities_registry_DocBlocks

Imports and export paths.

33 entries

These are package-manifest entry points. Named symbols listed above come from the capability catalogue; this is not an exhaustive TypeScript symbol reference.

33 imports

Dependencies and related packages.

Runtime dependencies 5
compare-versions
catalog:data
zod
catalog:
Development dependencies 2

Package scripts.

Commands declared by this package. Review its setup requirements before running them; no command here was executed by this review.

buildcontractspec-bun-build build
build:bundlecontractspec-bun-build transpile
build:typescontractspec-bun-build types
lint:checknode ../../../scripts/biome.cjs check .
prebuildcontractspec-bun-build prebuild
typechecktsgo --noEmit -p tsconfig.json
Your view

Make room for your context.

Shape the presentation around this moment. You can change it whenever you need.

Your context

The different parts of you

Choose a starting point

A useful mix of context, visuals and gentle guidance.

Tune each dimension
Each dimension can change independently. Product permissions and available actions stay unchanged.

Support the way you begin and return

Tune your support

Reading comfort

Choose your language

Interface language changes text only. Markets, prices and workflows keep their own settings.

Translation coverage

Original source

Navigation151
Graph616
Categories378
Portfolio833
Examples2,035
Source preview1,542

More translations will be added as content is reviewed.

This preference is saved on this browser.

Search the website

Useful starting points

No results. Try a shorter phrase, an operation name or another search area.

A LITTLE ROOM TO EXPLORE

Find something to explore.

Open a closer look on this page, try a different perspective, or follow the detail into its own page.

How previews and controls work
01

Look before you leave

Hover a link or focus it with Tab to see a preview. Clicking the original link or pressing Enter always opens its destination.

02

Stay with the context

Move into the preview to explore its sections. Use Alt + ↓ from a focused link to enter it with the keyboard. Escape closes it.

03

Open the possibilities

Disclosure rows, perspective choices and highlighted controls reveal more. Your view changes reading comfort and the context you explore.

A separate button for a closer look

Show small preview buttons beside links where there is room. Tap the eye to inspect, or tap the link to go straight there. This choice stays in this tab.

No browsing history is collected. Reduced motion follows your device and Your view.