Internal module guide. This module is now part of
@astrology/vedic; use the public package README for application setup.
upstream module
Adapter and binder layer that connects upstream astronomy ports as they become available. Public imports use the package root. See the package specification and task plan.
Run pnpm --filter @astrology/vedic build, check, and test after building dependencies (pnpm build:vedic builds all).
Gates
UPSTREAM_GATES lists each capability, the task that delivers it and what it unblocks:
| Gate | Source today | Unblocks |
|---|---|---|
positions, houses |
Composer capabilities | Every chart layer; lagna, ashtakavarga, dig/kendradi |
probes |
Composer probe sessions (host probe limits) | Panchang, transit windows |
rise-set |
Native Hindu events through Binder/Composer; host connects riseSetFrom(reader) |
Panchang, muhurta, sunrise-based strength factors |
declination |
binder.declinations through the runtime reader |
Ayana bala |
mean-longitude |
binder.meanLongitudes (madhya and seeghrocca) through the runtime reader |
Chesta bala |
disc-diameter |
binder.discDiameters through the runtime reader |
Yuddha bala (still needs the V-02 war rule) |
Binder
bindVedicUpstream({ composer, riseSet?, declination?, meanLongitude?, discDiameter? }) reads Composer
capabilities once and records which optional ports the host connected. status is what the engine
advertises; connect(gates, probe?) hands a feature exactly the ports it named (opening a probe
session when probes is named) and throws LAYER_UNSUPPORTED with { gate, owner } when a
required gate is closed. Nothing is inferred from a missing field and no provider is selected.
Adapters
riseSetFrom(source) wraps the optional riseSet method of a Composer AstronomyReader or
ProbePort and returns null while it is absent, so the gate stays closed instead of answering with
a fabricated sunrise. declinationFrom, meanLongitudeFrom and discDiameterFrom structurally admit host sources;
createVedicService({ reader }) applies all four to the reader unless an explicit port is given.
With B-01/C-05 implemented, a host passes riseSet: riseSetFrom(reader) and panchang/muhurta become
supported with no calculator change.