Files
Imhotep/packages/imhotep-core
John Dvorak aa69ddc52f fix: replace as any casts in AST walkers with typed guards + add options to PredicateCall
logic-ast.ts: add optional options?: Record<string, unknown> to
  PredicateCall interface. Previously any predicate needing options
  (e.g., space, dimension, tolerance) smuggled them via (node as any)
  .options, bypassing the type system entirely.

extraction.ts: replace all 18 (node as any).body/.left/.right etc.
  casts with proper type guard narrowing (isForAllFormula, isExistsFormula,
  isAndFormula, isOrFormula, isNotFormula, isImpliesFormula, isPredicateCall).
  Affected functions: collectPredicates, formulaNeedsCssLengthMetrics,
  usesLayoutSpace, computeRequiredFacts & nestDomAncestry, getSelectorsFromFormula.

595 SDK + 57 E2E tests pass.
2026-05-22 12:18:22 -07:00
..

imhotep-core

Foundation types and contracts for Imhotep. Defines the AST/IR, geometry world schema, diagnostic taxonomy, pipeline contracts, FOL AST/IR representations, domain/value types, scene target descriptors, property contract/results types, and geometry snapshot caching.

Key Exports

Module Description
types Core type definitions (positions, IDs, results, proofs)
ast Unist-style AST node definitions
ir Semantic IR and execution IR
world Geometry world schema tables
contracts Extractor, solver, compiler, reporter interfaces
diagnostics Diagnostic categories, error codes, traces, shrinking
logic-ast FOL AST types (quantifiers, connectives, predicates)
logic-ir Lowered FOL IR for logic engine
canonical Canonical world adapter for solver
geometry-cache Disk-based extraction caching