Internal module guide. This module is now part of
@astrology/vedic; use the public package README for application setup.
engine module
Public Vedic coordinator, dependency planning and evidence. Public imports use the package root. See the package specification and task plan (V-15).
Run pnpm --filter @astrology/vedic build, check, and test after building dependencies (pnpm build:vedic builds all).
Coordinator
createVedicEngine({ profiles, rulebooks, upstream, features, probeBudget? }) accepts only
registered feature instances; it imports no calculator, provider or Binder package. Each call resolves
one profile and one rulebook, binds upstream once through @astrology/vedic, and checks
that every feature’s rule hash matches the admitted bundle.
capabilities(profile)returns gate status and per-layer support, including missing gates and their owning tasks; a layer whose required dependency is unavailable is unsupported too.chartplans only requested layers plus required prerequisites, composes one snapshot (with houses only when a planned layer needs them) and runs the layers in order. Failure is complete by default;allowPartiallists missing layers and their dependents instead. Optional dependencies (varga divisional charts for strengths) also run when registered and supported.- Probe windows are checked against
probeBudget.maxWindowMillisecondsbefore a session opens; panchang (the five-limb Vedic calendar day) needs 5 days around the requested day. panchang,transits,matchingandmuhurta(electional timing) results are typed from the registered features.panchang,muhurta,transitsandmatchingdelegate to their features, opening bounded probe sessions where needed.
Results carry rule ids, profile, rulebook, engine and Composer versions, snapshot and probe references, and de-duplicated Binder evidence.
Connecting a dependency later
Connecting an upstream port is a host change only. For rise/set:
import { riseSetFrom } from './upstream/index.js';
const riseSet = riseSetFrom(reader);
const engine = createVedicEngine({ profiles, rulebooks, features, probeBudget,
upstream: { composer, ...(riseSet ? { riseSet } : {}) } });
The native Binder reader now implements Hindu rise/set. Connecting it through riseSetFrom
opens the astronomy gate; registered features still require admitted rules and other prerequisites.
A reader without an event method still returns null and leaves that gate closed.