Packages2 MIN READ87 / 116

Internal module guide. This module is now part of @astrology/vedic; use the public package README for application setup.

host module

Registers Vedic calculation modules with createVedicEngine and exposes the result as one transport-neutral service for an HTTP layer. See the host assembly order (steps 3–5).

Run pnpm --filter @astrology/vedic build, check, and test after pnpm build:vedic.

import { createComposeHost } from '@astrology/runtime';
import { createVedicService } from '@astrology/vedic';

const { composer, reader } = createComposeHost({ binder, probeLimits });
const vedic = createVedicService({ composer, reader, probeBudget });

vedic.configurations; // [{ profile, rulebook, layers, default }]
await vedic.chart({ instant, houseObserver, layers: ['dasha', 'varga'] });            // default profile
await vedic.chart({ profile: { id: 'parashari-lahiri', version: 2 }, instant, houseObserver, layers: ['judgments', 'yoga-dosha'] });

Configurations

A profile names exactly one rulebook, so a request switches rules by choosing profile; omitting it uses defaultProfile. Each rulebook gets its own engine whose layers are those its families supply. The layers are Vedic techniques such as dasha, varga, drishti, panchang and muhurta. The service has capabilities(profile?), chart, panchang, transits, matching and muhurta, plus configurations and defaultProfile for discovery. Engine VedicError codes pass through; an unknown profile is UNKNOWN_PROFILE.

Profile Rulebook Layers Status
parashari-lahiri@2 (default) parashari-core@2 all eleven Selected strength conventions, nodes-5-7-9 drishti and AV reductions
parashari-lahiri@1 parashari-core@1 varga, drishti, dasha, strengths, panchang, muhurta Original specification tables

Tables live in their owning calculation modules (PARASHARI_JUDGMENT_RULES, PARASHARI_BAV_RULES, PARASHARI_CORE_PACK, PARASHARI_GOCHARA_RULES, PARASHARI_ASHTAKOOTA_RULES). The manifest’s sources records their provenance; external review gates remain in the development plan. For matching, first is the groom and second the bride.

Pass rulebooks and profiles to serve other bundles, defaultProfile to change the default and layers to restrict registration. Rise/set opens from ports.riseSet or a reader that reads it.