Internal module guide. This module is now part of
@astrology/western; use the public package README for application setup.
host module
createWesternService({ composer, rulebooks?, profiles?, defaultProfile?, techniques? }) admits the
supplied resources and registers their implemented Western features. All eight
families are supported: natal, transit, synastry, midpoint composite, secondary
progressions, solar returns, Naibod directions (solar arc) and integer harmonics. Only
families supplied by the rulebook and permitted by techniques are registered.
Without options it serves tropical-placidus@1 over western-standard@1, which ships a resource
for every family.
The service exposes the coordinator’s capabilities, compose, chart and
operation methods, plus the registered technique names and profile/rulebook
identities. Requests still select exact profile and technique revisions.
import { createComposeHost } from '@astrology/runtime';
import { createWesternService } from '@astrology/western';
const { composer } = createComposeHost({ binder });
const western = createWesternService({ composer });
await western.chart({ instant, houseObserver, techniques: ['natal'] }); // default profile
Configurations
A profile names exactly one rulebook, so a request switches rules by choosing profile; omitting
it uses defaultProfile. The default is tropical-placidus@1 (tropical, Placidus, Ptolemaic
aspects, traditional rulership) over western-standard@1, which ships TRADITIONAL_NATAL_RULES,
MAJOR_TRANSIT_RULES, MAJOR_SYNASTRY_RULES, MIDPOINT_COMPOSITE_RULES,
SECONDARY_PROGRESSION_RULES, SOLAR_RETURN_RULES, NAIBOD_DIRECTION_RULES and HARMONIC_RULES.
Pass rulebooks and profiles to add configurations (for example a modern-rulership natal
resource), defaultProfile to change the default and techniques to restrict registration. The
service has capabilities(profile?), chart, compose and dedicated operation, plus configurations and defaultProfile.
Engine WesternError codes pass through; an unknown profile is UNKNOWN_PROFILE.