Files
Imhotep/packages/imhotep-core
John Dvorak e17e4d6c20 fix: remove silent error suppression — cache failures, box index mutation, cleanup catches
geometry-cache.ts: replace 5 empty catch blocks with console.warn
- statSync failure, rmSync failure (x2), readCachedWorld failure,
  readCachedExtractionResult failure were all silently swallowed.
  Now emit context-bearing warnings so stale/corrupt caches are visible.

predicates.ts: replace __boxIndex as any mutation with WeakMap
- getBorderRect used (world as any).__boxIndex to cache a subject-to-
  box-index map on the world object. Replaced with module-level WeakMap
  that auto-collects when the world is GC'd. Eliminates 2 as any casts.

extraction.ts: serialize materializeSemanticSelector + debug cleanup
- 3 Promise.all sites over page.evaluate changed to sequential for..of
  to eliminate DOM modification race conditions.
- 2 .catch(()=>{}) cleanup blocks now use console.debug so failed
  cleanup is traceable when debugging.
- resolveViewport catch now emits console.warn on zero-viewport fallback.

648 SDK + 57 E2E tests pass.
2026-05-22 12:00:20 -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