lib.decision-runtime
Deterministic, effect-free DecisionGraph and PredicateSpec runtime.
@lssm-tech/lib.decision-runtimebun add @lssm-tech/lib.decision-runtimeManifest declarations describe the current workspace; they do not verify registry publication or runtime execution.
Package guide
Effect-free runtime for the shared PredicateSpec and immutable DecisionGraphRevision contracts. It validates graphs before execution, produces replayable traces, pins subgraphs by revision and digest, and never evaluates creator-authored code.
This runtime owns branching only. Operations and other business effects remain owned by workflow and product runtimes.
The ./form-decision-graph entry owns Forms document/decision-graph conversion. It uses the canonical Forms document types and local graph validation, preserves page predicates and immutable revision pins, and forwards the legacy contracts-spec/forms/platform-decision-graph identity. FormsRuntime does not depend on this adapter, keeping the package graph acyclic.
evaluateDecisionGraph requires an injected feature gate and fails closed on support.decisioning before validation or evaluation begins. It enforces bounded and cycle-safe inputs, graph and predicate complexity ceilings, decision-table totality, deterministic priority ties, digest-pinned subgraphs, shared trace budgets, and a bounded subgraph depth. Predicate edges are always considered before default edges, independently of creator priority values.
compileDecisionGraphToWorkflow projects an immutable, digest-verified graph into typed Workflow steps and predicates. It preserves deterministic branch order, emits no trusted expression strings, pins subgraphs, and creates effects only for exact outcome operation revisions present in a server-controlled allowlist. Workflow remains the execution and authorization authority.
Decisioning contracts
@lssm-tech/lib.decision-runtime/contracts and ./contracts/<leaf> own the decisioning contract family: evaluation and lifecycle operations, events, input/output/trace schemas, evidence administration, validation and the authority, input-protection, feature-gate and evidence-administration ports. Legacy @lssm-tech/lib.contracts-spec/decisioning imports forward to the same instances.
Relationships
Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.
7 declarations
@lssm-tech/lib.contracts-runtime-kernelworkspace:^
Read the package manual ↗@lssm-tech/lib.contracts-spec-coreworkspace:^
Read the package manual ↗@lssm-tech/lib.orchestration-specworkspace:^
Read the package manual ↗@lssm-tech/lib.workflow-composerworkspace:^
Read the package manual ↗@lssm-tech/lib.schemaworkspace:^
Read the package manual ↗zodcatalog:
Declared capabilities
Deterministic, effect-free DecisionGraph and PredicateSpec runtime.
Scripts
buildcontractspec-bun-build buildbuild:bundlecontractspec-bun-build transpilebuild:typescontractspec-bun-build typescleanrimraf dist .turbolint:checknode ../../../../scripts/biome.cjs check .testbun testprebuildcontractspec-bun-build prebuildtypechecktsgo --noEmit