@zodiacs/engine 0.1.1-rc.15 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +891 -0
  2. package/LICENSING.md +192 -12
  3. package/NOTICE +96 -2
  4. package/README.md +296 -66
  5. package/dist/{api-CoB_kqE3.d.ts → api-WbxJ4Wj-.d.ts} +15 -10
  6. package/dist/ayanamsa--YQ46fET.d.ts +134 -0
  7. package/dist/calc.d.ts +390 -0
  8. package/dist/calc.js +1039 -0
  9. package/dist/chunk-47ERTK5X.js +27 -0
  10. package/dist/chunk-7TRLIFFI.js +56 -0
  11. package/dist/chunk-A3U2ZS2W.js +29 -0
  12. package/dist/{chunk-KHBLFXFG.js → chunk-B5LKF437.js} +29 -28
  13. package/dist/{chunk-ONBZ4HK7.js → chunk-BHJXUY67.js} +4 -2
  14. package/dist/{chunk-OYGRVGXD.js → chunk-CHSYDKBL.js} +3 -3
  15. package/dist/{chunk-ZHVI3KWJ.js → chunk-DMGHYCDI.js} +4 -4
  16. package/dist/{chunk-CWI4YUDL.js → chunk-FTX3JDJA.js} +21 -18
  17. package/dist/{chunk-MFF3VKO3.js → chunk-OG4OYTJJ.js} +47 -42
  18. package/dist/{chunk-ZZPITHQS.js → chunk-SRXBTP5H.js} +199 -65
  19. package/dist/{chunk-AECKV73C.js → chunk-TSS2SZWQ.js} +8 -2
  20. package/dist/chunk-WS3TDSP3.js +474 -0
  21. package/dist/chunk-YIITY7Q7.js +483 -0
  22. package/dist/crossings.d.ts +8 -7
  23. package/dist/crossings.js +1 -1
  24. package/dist/deltat.d.ts +28 -3
  25. package/dist/deltat.js +1 -1
  26. package/dist/geo.d.ts +33 -12
  27. package/dist/geo.js +17 -458
  28. package/dist/{internal-math-BbktkHCc.d.ts → houses-CFERsAlK.d.ts} +14 -160
  29. package/dist/houses-extra.d.ts +95 -0
  30. package/dist/houses-extra.js +339 -0
  31. package/dist/index.d.ts +34 -48
  32. package/dist/index.js +31 -23
  33. package/dist/internal-math-DJJ8BYex.d.ts +174 -0
  34. package/dist/internal-math.d.ts +3 -2
  35. package/dist/internal-math.js +2 -2
  36. package/dist/internal.d.ts +1 -1
  37. package/dist/internal.js +5 -5
  38. package/dist/receipt.d.ts +2 -243
  39. package/dist/receipt.js +78 -37
  40. package/dist/reference-span-CILpclrz.d.ts +40 -0
  41. package/dist/rulers-Dla6h_Sm.d.ts +15 -0
  42. package/dist/sky.d.ts +173 -0
  43. package/dist/sky.js +379 -0
  44. package/dist/techniques.d.ts +453 -0
  45. package/dist/techniques.js +823 -0
  46. package/dist/timing.d.ts +113 -17
  47. package/dist/timing.js +98 -64
  48. package/dist/{types-BsWaqwU_.d.ts → types-B-yb_tGL.d.ts} +23 -11
  49. package/dist/vedic.d.ts +42 -124
  50. package/dist/vedic.js +44 -458
  51. package/dist/window.d.ts +180 -0
  52. package/dist/window.js +960 -0
  53. package/dist/zone-history-ghdyO0Sc.d.ts +268 -0
  54. package/package.json +25 -3
package/README.md CHANGED
@@ -3,25 +3,38 @@
3
3
  Pure TypeScript astrology calculations for browsers and Node.js. The package
4
4
  computes tropical planetary positions, natal charts, transit snapshots,
5
5
  synastry, secondary progressions, Moon phase, and Saturn-return seasons, and,
6
- in separate entries, Hellenistic timing techniques and sidereal positions and
7
- Jyotish techniques. Its calculations are synchronous; only loading a zone's
6
+ in separate entries, one calculation API over frames, centers and
7
+ corrections with bounds and receipts, birth-time windows, house positions and
8
+ cusp speeds, rise, set and transit times and planetary hours, returns and
9
+ relationship charts, Hellenistic timing techniques, and sidereal positions
10
+ and Jyotish techniques. Its calculations are synchronous; only loading a zone's
8
11
  history before 1970 (`prepareLocalTime`) and the GeoNames client, both in
9
12
  `@zodiacs/engine/geo`, are asynchronous. It is ESM-only, has no import-time
10
13
  side effects, and performs no network request from its core entry point. Its
11
14
  one runtime side effect is the ΔT it installs in astronomy-engine (see Time
12
15
  below).
13
16
 
14
- **Release candidate: 0.1.1-rc.15.** Public npm lookups for this package returned
15
- 404 on 2026-09-26. The expansion release remains held for review and operator
16
- publication authority. Install the exact candidate tarball supplied with the
17
- review, retaining its SHA-256 receipt:
17
+ **1.0.0**, the first stable release: 1.0.0-rc.2 with the version changed,
18
+ the same API and the same values (CHANGELOG.md). The package follows Semantic
19
+ Versioning: [docs/versioning.md](docs/versioning.md) says what is public, how
20
+ a number may change, which records stay readable and how something public is
21
+ deprecated, and `api/` holds each public entry point's declarations.
18
22
 
19
23
  ```sh
20
- pnpm add ./zodiacs-engine-0.1.1-rc.15.tgz
24
+ npm install @zodiacs/engine
21
25
  ```
22
26
 
27
+ The Release workflow publishes the archive carried in `artifacts/` as it is,
28
+ with provenance (CONTRIBUTING.md, *Releases*). Before 1.0.0 npm carried
29
+ 0.1.1-rc.14 to 0.1.1-rc.16. 0.1.1-rc.17, 1.0.0-rc.1 and 1.0.0-rc.2 were never
30
+ published, so a caller moving from npm reads their CHANGELOG entries,
31
+ 1.0.0-rc.1's *Migration* first, and a caller on 0.1.1-rc.15, npm's `latest`
32
+ until 1.0.0, reads 0.1.1-rc.16's too.
33
+
23
34
  The package runs in browsers through a bundler, and in Node.js 20.19.0 or a
24
35
  later 20.x, or 22.7.0 or later (`"engines": { "node": "^20.19.0 || >=22.7.0" }`).
36
+ Node.js 20 reached its end of life on 2026-04-30: the package is still tested
37
+ there, but a 1.x minor release may drop it (docs/versioning.md, *Runtimes*).
25
38
  Its dependency, astronomy-engine 2.1.19, ships ES modules in a package that does
26
39
  not declare `"type": "module"`. Earlier Node versions load that file as
27
40
  CommonJS, so a plain Node import of this package fails there with "Named export
@@ -32,7 +45,7 @@ themselves and are not affected.
32
45
 
33
46
  From a source checkout, run `npm ci` and `npm run build`, then
34
47
  `npm pack --ignore-scripts`. Test the packed file in a clean consumer using
35
- `npm run consumer:smoke -- /absolute/path/to/zodiacs-engine-0.1.1-rc.15.tgz`.
48
+ `npm run consumer:smoke -- /absolute/path/to/zodiacs-engine-1.0.0.tgz`.
36
49
  The smoke check
37
50
  downloads the artifact's public dependencies and TypeScript 5.9.3; its output
38
51
  records the artifact hash and runtime, and it removes its temporary consumer
@@ -61,27 +74,41 @@ dependencies afresh with `npm ci` and takes nothing from the checkout's
61
74
  needs merge commits: a squash or rebase merge drops the source commits it
62
75
  checks against, and the check then fails.
63
76
 
64
- This candidate reads a chart's instant on a time basis: from 1972 to
65
- 2027-10-02 as UTC, with TT from the leap seconds and UT1 from IERS UT1 − UTC,
66
- and otherwise as UT1 with the ΔT model, or on UT1 or TT when `timeScale` says
67
- so (see Time). From 1972 to 2027-10-02 a chart's angles therefore differ from
68
- rc.14's by UT1 − UTC, and its positions by less: in 1,801 synthetic charts the
69
- ascendant by up to 45.0″ and the Moon by up to 0.462″, and in a review's wider
70
- sample by up to 101.03″ and 0.4885″, near 65° S
71
- (`docs/evidence/rc15-20260929/review-sample.json`). Before and after that span
72
- its angles and houses are unchanged. `@zodiacs/engine/geo` reads wall times before 1970 on the
73
- tzdb 2025c history it ships, which `prepareLocalTime` must load first, and can
74
- read a birthplace's own mean time and a Julian date; unknown options and form
75
- keys now throw, and `lmt` means that a local-mean-time clock read the time. Two
76
- entry points are new, `@zodiacs/engine/timing` and `@zodiacs/engine/vedic`, and
77
- the root imports neither. Placidus no longer falls back to whole signs just
78
- below the polar limit. Receipts gain a conventions set that records the time
79
- basis; receipts of the earlier sets, rc.13's and rc.14's included, stay
80
- readable and replay. The package gate is now a budget for each entry point's
81
- import graph and a stated cap for the whole package (CHANGELOG.md). The
82
- ephemeris is still astronomy-engine 2.1.19. See CHANGELOG.md for the release
83
- history and `docs/evidence/rc15-20260929/` for this candidate's checks. Site
84
- adoption is reviewed separately.
77
+ 1.0.0-rc.1 settled the API for 1.0.0. Before the promise was made, three
78
+ reviews read every public declaration of the twelve entry points; it acted on
79
+ what they found, recorded the result in `api/`, which CI checks, and lists
80
+ every breaking change, deprecation and experimental part in CHANGELOG.md with
81
+ what a caller does about it. `@zodiacs/engine/calc` now computes a caller's
82
+ ayanamsa carried by precession from any epoch in `EPHEMERIS_SPAN`, where rc.17
83
+ refused one outside 1800 to 2200. Where both compute a value, it is rc.17's,
84
+ to the bit, in a comparison of 6,411 calls across the twelve entry points.
85
+ rc.17 added the sidereal zodiac to `@zodiacs/engine/calc`: its four
86
+ functions take an ayanamsa of `@zodiacs/engine/vedic`, or a caller's own,
87
+ and, with every other default, give the Vedic entry's sidereal longitudes to
88
+ the bit; their bounds add the ayanamsa's (see Uniform calculation API). rc.16
89
+ brought five opt-in entry points onto rc.15:
90
+ `@zodiacs/engine/calc`, one calculation API over eight frames, four centers
91
+ and three corrections, with speeds, bounds and receipts; `/window`, birth-time
92
+ window partitions; `/techniques`, returns, composite and Davison charts, the
93
+ void-of-course Moon, aspect patterns, dignities and Moon signs; `/houses`,
94
+ house positions of bodies with latitude, co-ascendants and cusp speeds; and
95
+ `/sky`, rise, set, transit and planetary hours. `@zodiacs/engine/timing`
96
+ gained planetary returns. The root imports none of them. rc.16 also made the
97
+ nutation the full IAU 2000B series, which the engine evaluates itself (see
98
+ Nutation): every longitude moved from rc.15's by the change in Δψ, up to
99
+ 0.2701″ from 1800 to 2200, and the angles and cusps by the change in the
100
+ sidereal time and the true obliquity, up to 0.8003″ over 9,697 synthetic
101
+ charts at places up to 60.17° N, and more toward the polar circle. Receipts
102
+ gained a conventions set that names the nutation; rc.15's receipts stay
103
+ readable. As in rc.15, a chart's instant is read on a time basis: from 1972
104
+ to 2027-10-02 as UTC, with TT from the leap seconds and UT1 from IERS
105
+ UT1 − UTC, and otherwise as UT1 with the ΔT model, or on UT1 or TT when
106
+ `timeScale` says so (see Time). The ephemeris is still astronomy-engine
107
+ 2.1.19. See CHANGELOG.md for the release history and
108
+ `docs/evidence/1.0.0-20261011/` for this release's checks (1.0.0-rc.2's are in
109
+ `docs/evidence/1.0.0-rc.2-20261006/`, 1.0.0-rc.1's in
110
+ `docs/evidence/1.0.0-rc.1-20261006/`, rc.17's in
111
+ `docs/evidence/rc17-20261005/`). Site adoption is reviewed separately.
85
112
 
86
113
  ## Natal chart in 10 lines
87
114
 
@@ -173,16 +200,56 @@ for (const aspect of today.aspects) {
173
200
  longitude function of your own, without the ephemeris.
174
201
  - `@zodiacs/engine/geo` provides IANA local-time resolution, Julian calendar
175
202
  dates and a client for a separately hosted, sharded GeoNames index.
203
+ - `@zodiacs/engine/techniques` provides solar and lunar returns, composite and
204
+ Davison charts, the void-of-course Moon, aspect patterns, essential
205
+ dignities and the Moon signs possible over a date (see `docs/techniques.md`).
176
206
  - `@zodiacs/engine/timing` provides profections, firdaria, zodiacal releasing
177
- and solar arc directions (see `docs/timing-hellenistic.md`).
207
+ and solar arc directions (see `docs/timing-hellenistic.md`), and planetary
208
+ returns (see `docs/houses.md`).
209
+ - `@zodiacs/engine/houses` provides the house position of a body with ecliptic
210
+ latitude in each house system, the co-ascendants and the polar ascendant,
211
+ and the speeds of the cusps and the angles (see `docs/houses.md`). It
212
+ imports no ephemeris and no module of the root entry.
178
213
  - `@zodiacs/engine/vedic` provides the sidereal zodiac: ayanamsas, sidereal
179
214
  charts, nakshatras, vargas, KP sub-lords and dashas (see `docs/vedic.md`).
215
+ - `@zodiacs/engine/sky` provides rise, set and transit times for an observer
216
+ and planetary hours (see `docs/sky.md`).
217
+ - `@zodiacs/engine/window` partitions a birth-time window into cells within
218
+ which the chart's signs, houses and aspects are constant (see *Birth-time
219
+ windows*).
220
+
221
+ ### Uniform calculation API
222
+
223
+ `@zodiacs/engine/calc` offers `calc`, `houses`, `events` and `chart` with one
224
+ vocabulary: instants as ISO strings, Dates or `{ jd, scale: "utc" | "ut1" | "tt" }`
225
+ on the engine's time basis, as `positions()` reads them;
226
+ eight frames (the ecliptic or the equator; true or mean of date, J2000.0 or
227
+ the ICRS); geocentric, heliocentric, barycentric and topocentric centers;
228
+ apparent, astrometric or geometric positions with distances and speeds; and
229
+ the tropical or the sidereal zodiac, with any ayanamsa of
230
+ `@zodiacs/engine/vedic` or a caller's own (Swiss Ephemeris's `SE_SIDM_USER`).
231
+ Results carry bounds and a receipt of convention ids. A measured bound is the
232
+ largest difference from JPL Horizons on 32 instants from 1802 to 2188: a
233
+ sample maximum, not a limit. In the sidereal zodiac a bound adds the
234
+ ayanamsa's: the largest difference of its mean, and of its rate, from ERFA's
235
+ construction of the same definition, over every year from 1800 to 2199. An
236
+ estimated bound names what it rests on. What this version does not compute
237
+ comes back as a typed refusal, such as gravitational deflection, or an
238
+ instant whose UT1 or TT is outside 1800 to 2200: there calc has no
239
+ comparison to take a bound from, while the root entry's functions
240
+ still compute such an instant and flag it `outside-reference-span`. With
241
+ every default, `calc({ body, time })` is the position `positions()` gives, to
242
+ the bit. The root entry loads none of it. The reference, with the Swiss Ephemeris flag
243
+ mapping and the measured accuracy, is
244
+ [docs/calc.md](https://github.com/zodiacs-org/engine/blob/main/docs/calc.md).
180
245
 
181
246
  Returned longitudes use degrees in `[0, 360)` and positions include sign and degree
182
247
  annotations. Charts use the tropical ecliptic of date. Planetary positions are
183
248
  geocentric and corrected for light time and aberration, but not for the Sun's
184
- gravitational deflection; the Moon's series carries neither correction. This
185
- package does not calculate topocentric parallax.
249
+ gravitational deflection; the Moon's series carries neither correction. The
250
+ chart functions do not calculate topocentric parallax; `@zodiacs/engine/calc`
251
+ gives topocentric positions (`center: { topocentric }`), and
252
+ `@zodiacs/engine/sky` finds rise and set for a topocentric observer.
186
253
 
187
254
  Positions have been compared with an independent ephemeris from 1800-01-01T00:00Z
188
255
  up to 2200-01-01T00:00Z, exported as `REFERENCE_SPAN`. A chart outside that span
@@ -348,24 +415,27 @@ Out-of-bounds means strictly `abs(dec) > trueObliquity`, without an
348
415
  uncertainty allowance. Each row also carries `boundMarginArcsec`, the signed
349
416
  margin `(abs(dec) − trueObliquity) × 3600`: positive beyond the bound, negative
350
417
  inside it. For every row but the exempt Sun below, `outOfBounds` is exactly
351
- `boundMarginArcsec > 0`. In `chartDeclinations`, `trueObliquity` is
352
- astronomy-engine's true obliquity of date at the chart instant on the chart's
353
- clock: the IAU 2006 mean obliquity plus astronomy-engine's five-term truncation
354
- of the IAU 2000B nutation in obliquity. That is not the full IAU 2000B value:
355
- it differed from ERFA's `obl06` plus `nut00b` by up to 0.086″ at 20,000
356
- instants from 1850 to 2150. The pure functions use the obliquity they are given.
418
+ `boundMarginArcsec > 0`. In `chartDeclinations`, `trueObliquity` is the
419
+ engine's true obliquity of date at the chart instant on the chart's clock: the
420
+ IAU 2006 mean obliquity plus the IAU 2000B nutation in obliquity, all 77 terms
421
+ (see *Nutation*). It equals ERFA's `obl06` plus `nut00b` within the tests'
422
+ tolerances (1e-9″ and 1e-10″), and at 20,000 instants from 1850 to 2150 it was
423
+ within 1.63 mas of `obl06` plus `nut06a` (IAU 2000A), where astronomy-engine's
424
+ five-term value, used until this change, was up to 85.6 mas from both. The
425
+ pure functions use the obliquity they are given.
357
426
 
358
427
  The flag describes the ephemeris's position, and it agrees with the real sky
359
428
  only where the margin exceeds the ephemeris's error in declination. Against
360
- JPL's DE440s at those 20,000 instants, the largest declination errors were:
429
+ JPL's DE440s at those 20,000 instants, the largest declination errors were,
430
+ rounded up (`docs/evidence/nutation-2026-09-29/results/declination-truth.json`):
361
431
 
362
432
  | Body | Largest error | Body | Largest error |
363
433
  | --- | ---: | --- | ---: |
364
434
  | Sun | 2.7″ | Jupiter | 16.1″ |
365
435
  | Moon | 3.4″ | Saturn | 21.6″ |
366
436
  | Mercury | 12.2″ | Uranus | 19.3″ |
367
- | Venus | 14.7″ | Neptune | 15.4″ |
368
- | Mars | 14.5″ | Pluto | 4.6″ |
437
+ | Venus | 14.8″ | Neptune | 15.5″ |
438
+ | Mars | 14.6″ | Pluto | 4.6″ |
369
439
 
370
440
  These are sample maxima, not bounds, and they grow outside `REFERENCE_SPAN`.
371
441
  Within them the flag can be wrong either way: at 2022-10-22T08:11:10.756Z the
@@ -415,7 +485,11 @@ not include this analysis; the result states that scope explicitly.
415
485
  `houseSystem` takes one of thirteen systems. Each is the definition Swiss
416
486
  Ephemeris uses, and every one agrees with Swiss's `swe_houses_armc` to within
417
487
  0.0001″ given the same sidereal time, latitude and obliquity (Placidus, which
418
- iterates, to 0.01″).
488
+ iterates, to 0.01″). End to end, from an instant read as UT1 as Swiss reads
489
+ it, every system was within 0.055″ of Swiss's `swe_houses_ex` from 1850 to
490
+ 2049, on a ladder of latitudes from 55° to 66.6° and on 3,000 draws within 66°
491
+ of the equator (`docs/evidence/nutation-2026-09-29/results/ladder.json`);
492
+ outside those years Swiss uses a long-term sidereal time of its own.
419
493
 
420
494
  | `houseSystem` | System | Cusps |
421
495
  | --- | --- | --- |
@@ -435,8 +509,9 @@ iterates, to 0.01″).
435
509
 
436
510
  Placidus and Koch are undefined in polar regions, where |latitude| ≥ 90° − ε,
437
511
  with ε the true obliquity of date (about 66.56° today). There the engine falls
438
- back to whole-sign houses, exported as `POLAR_FALLBACK` (and, as before,
439
- `PLACIDUS_POLAR_FALLBACK`), and adds `polar-fallback` to the chart flags. Swiss
512
+ back to whole-sign houses, exported as `POLAR_FALLBACK` (and as
513
+ `PLACIDUS_POLAR_FALLBACK`, deprecated from 1.0, since Koch falls back too),
514
+ and adds `polar-fallback` to the chart flags. Swiss
440
515
  Ephemeris falls back to Porphyry instead. Every other system is defined at
441
516
  every latitude where the angles are. Inside the polar circle, where the
442
517
  ascendant is taken on the eastern half of the horizon, Regiomontanus, Campanus
@@ -445,6 +520,11 @@ meridian, as in Swiss Ephemeris. When the birth time is unknown, pass a
445
520
  conventional UTC instant with `timeKnown: false`; angles and houses remain
446
521
  absent and the chart carries the `no-time` flag.
447
522
 
523
+ `@zodiacs/engine/houses` places a body with ecliptic latitude in any of these
524
+ systems, as Swiss Ephemeris's `swe_house_pos` defines the position, and gives
525
+ the co-ascendants, the polar ascendant and the speeds of the cusps and angles
526
+ (`docs/houses.md`).
527
+
448
528
  ### Points
449
529
 
450
530
  `chartPoints(natal)` takes a birth or a chart and returns `{ sect, points }`.
@@ -461,9 +541,11 @@ Each point has a longitude, a latitude, a sign and a degree, like a body.
461
541
  The mean node and Black Moon Lilith come from the Moon's mean elements: the
462
542
  IERS Conventions' fundamental arguments (Simon et al. 1994), with a mean
463
543
  inclination of 5.1453964°. The nutation in longitude puts them on the true
464
- equinox of date, like every other longitude here. They are within 0.7″ of Swiss
465
- Ephemeris's `SE_MEAN_NODE` and `SE_MEAN_APOG` from 1800 to 2199. Both carry a
466
- speed in degrees per day.
544
+ equinox of date, like every other longitude here. At 2,000 instants from 1800
545
+ to 2199 they were within 0.4503″ and 0.4887″ of Swiss Ephemeris's
546
+ `SE_MEAN_NODE` and `SE_MEAN_APOG`
547
+ (`docs/evidence/nutation-2026-09-29/results/swiss.json`). Both carry a speed in
548
+ degrees per day.
467
549
 
468
550
  Every chart gets those three. The Vertex, the East Point, the sect and the
469
551
  lots need a birth time and place.
@@ -479,7 +561,10 @@ lots need a birth time and place.
479
561
 
480
562
  `antiscion`, `contraAntiscion` and `midpoint` work on any two longitudes.
481
563
  `meanNodeLongitude`, `meanApogee`, `lunarMeanArguments`, `hellenisticLots` and
482
- `sectOf` expose the calculations underneath. The osculating ("true") Lilith is
564
+ `sectOf` expose the calculations underneath. The first three, with
565
+ `MEAN_LUNAR_INCLINATION`, are experimental from 1.0
566
+ ([docs/versioning.md](docs/versioning.md)): a minor release may change them,
567
+ and `chartPoints` and `@zodiacs/engine/calc` give the points themselves. The osculating ("true") Lilith is
483
568
  not offered: from astronomy-engine's lunar series it would be several
484
569
  arcminutes from Swiss's.
485
570
 
@@ -534,7 +619,7 @@ bracket, which cannot fail outside the polar circle; it never returns the last
534
619
  unconverged iterate. Near the polar limit a cusp carries the rounding of asin
535
620
  near ±1: up to 6.5e-7° one unit in the last place below it.
536
621
 
537
- See [CHANGELOG.md](CHANGELOG.md) for candidate changes. Reference coverage and
622
+ See [CHANGELOG.md](CHANGELOG.md) for each release's changes. Reference coverage and
538
623
  known limits are recorded in the site [platform evidence ledger](https://github.com/zodiacs-org/site/blob/75ae549c6bcedba67ccce7d467e1b54af0c83070/docs/platform/EVIDENCE.md).
539
624
  The date parser's representable range is not a claim of astronomical accuracy
540
625
  across that range. Reference cases are finite; broader numerical scope review
@@ -593,6 +678,121 @@ Invalid input throws `RangeError` before any sampling: an invalid `Date`,
593
678
  shorter than a millisecond, or a `maxSamples` that is not a positive integer or
594
679
  `Infinity`. A non-finite longitude from the ephemeris throws `RangeError` too.
595
680
 
681
+ ### Birth-time windows
682
+
683
+ ```ts
684
+ import { birthWindow } from "@zodiacs/engine/window";
685
+
686
+ const result = birthWindow({
687
+ start: "1990-06-15T12:20:00Z",
688
+ end: "1990-06-15T12:40:00Z",
689
+ latitude: 40.7128,
690
+ longitude: -74.006,
691
+ houseSystem: "placidus",
692
+ rounding: { recorded: "1990-06-15T12:30:00Z", minutes: 5 }
693
+ });
694
+ for (const cell of result.cells) console.log(cell.start, cell.share, cell.roundedShare, cell.features.ascendant);
695
+ for (const change of result.switches) console.log(change.at, change.changes);
696
+ ```
697
+
698
+ `birthWindow` divides a window of possible birth instants into cells within
699
+ which every discrete feature of the chart is constant: each body's sign and
700
+ house, the signs of the ascendant and the midheaven, the aspects in orb and,
701
+ for Placidus and Koch, whether the houses fall back to whole signs. The
702
+ features are natalChart's: houses are `houseOf` on the chart's cusps, and
703
+ aspects are its five major aspects with their orbs. Each switch gives the
704
+ first millisecond of its new cell and every change at it, from and to. Each
705
+ cell gives its share of the window under a uniform prior and, when `rounding`
706
+ is given, under that rounding model. Nothing else is partitioned: two instants
707
+ in one cell can differ in natalChart's retrograde flags, positions within a
708
+ sign, speeds, orbs and whether they apply, the degrees of angles and cusps,
709
+ declinations and chart points.
710
+
711
+ The window is `start` to `end`, excluding `end`, at most 48 hours; or `at`
712
+ and `minutes`, for `minutes` either side of `at`; or only `rounding`, whose
713
+ unit is then the window. It must lie inside `REFERENCE_SPAN` (1800-01-01 to
714
+ 2200-01-01, UTC), where the search's bounds were scanned. `rounding:
715
+ { recorded, minutes, mode }` says the recorded time was rounded to `minutes`,
716
+ to the nearest (the default) or `"down"`; the true instant is taken as
717
+ uniform over that unit, which must lie inside the window. Resolve local times
718
+ first, for example with `resolveLocalToUtc` from `@zodiacs/engine/geo`.
719
+
720
+ Every value is the engine's own at a millisecond, as natalChart computes it
721
+ on UTC and the engine's time basis (not a pinned `deltaT`). Where the search's
722
+ bounds hold, each cell holds
723
+ natalChart's features at every millisecond in it, and at each switch
724
+ natalChart's value at the millisecond before `at` differs from its value at
725
+ `at` exactly as listed, except inside an interval listed in `unresolved`.
726
+
727
+ The search halves the window until each feature is settled, dropping an
728
+ interval for a feature when enclosures of the quantities it depends on keep
729
+ clear of every threshold and the feature agrees at both ends; single
730
+ milliseconds are compared directly. The enclosures rest on bounds scanned
731
+ from 1800 to 2200: `WINDOW_RATE_BOUNDS` (about twice each body's largest
732
+ rate), the obliquity's rate, and the true node's millisecond jitter, J =
733
+ 5e-5·(1 + |T|)° with T in centuries from 2000, at least 3.01 times every
734
+ departure found at 3,000 consecutive milliseconds every five days
735
+ (`docs/evidence/birth-window/rc16/node-jitter.json`). They assume TT and
736
+ UT1 run on continuously. The time basis steps at the ΔT model's seam,
737
+ 1940-12-31T18:00:00Z, where ΔT steps from
738
+ 24.834 s to 24.820 s; at 1972-01-01, where the leap seconds begin; at each
739
+ leap second, where TT and UT1 step by a second; and where the IERS UT1 table
740
+ ends, 2027-10-02. Each sample installs its own ΔT, so every position and
741
+ angle steps there together: the search finds each step inside the window
742
+ from the engine's own arithmetic, splits at its millisecond and compares
743
+ both sides. Within 1e-8° of the Placidus
744
+ or Koch polar limit, near the RAMCs where their cusps carry the rounding of
745
+ asin near ±1, the house system and the houses are compared at every
746
+ millisecond. A failed check of an enclosure adds `bound-exceeded`, and
747
+ completeness is then not established; a failure that does not show in an
748
+ interval's end-to-end change goes unseen. The method in full is in
749
+ `docs/evidence/birth-window/RESULTS.md`.
750
+
751
+ Near a sign boundary the true node's jitter makes its sign change back and
752
+ forth between milliseconds, for about 4J/|rate| days around an ingress: 1.5
753
+ minutes at the fastest from 1800 to 2200, 4.5 at the median, 2.3 hours at the
754
+ slowest. Every change is reported where the budget of two million evaluated
755
+ instants allows (299 at the ingress of March 2028,
756
+ `docs/evidence/birth-window/rc16/node-flicker.json`). Where the node
757
+ would need more, the stretch is left unresolved, found before any of the
758
+ budget is spent on it: the nodes' signs, and their houses where the houses are
759
+ whole signs, are null there, the interval is listed in `unresolved`, and the
760
+ result carries `node-unresolved`; a change to or from null is its edge, not a
761
+ crossing. 24 of the 294 ingresses from 1800 to 2200 flicker for longer than
762
+ the budget, in 1810, 1842 (two), 1848, 1865 (two), 1882 (two), 1946 (two),
763
+ 1981 (two), 2007, 2032 (two), 2049 (two), 2071, 2090 (four), 2113 and 2127
764
+ (`node-ingresses.json`). A true node from the Moon's analytic velocity,
765
+ instead of astronomy-engine's 1.728 s difference, would be smooth and leave
766
+ nothing unresolved; it changes natalChart's node in its last digits and is
767
+ left for a later release.
768
+
769
+ Results carry `verification: "sampled at one-second resolution"`: checked
770
+ against natalChart at every whole second, not proven. On 1,000 preregistered
771
+ random windows (1800 to 2200, all thirteen systems, two thirds at 60° of
772
+ latitude or more), all 24,188 sampled transitions were matched, none missed
773
+ and none extra, and natalChart confirmed every switch at its millisecond
774
+ (`docs/evidence/birth-window/RESULTS.md`); on rc.16's build, after the time
775
+ basis and the nutation, again (`docs/evidence/birth-window/rc16/`).
776
+
777
+ In one thread, a 10-minute window takes about 2 ms, two hours about 20 ms and
778
+ a whole day about 0.23 s (medians, Node.js 22; `timing.json`). A window over a
779
+ node ingress takes from seconds to a few minutes, as the node is compared at
780
+ every millisecond of its flicker (1,950 s around the ingress of 2032-11-25:
781
+ 77 s, 18,315 switches); an unresolved stretch costs a fraction of a second.
782
+ Within 1e-8° of the polar limit each passage of a sensitive RAMC adds about
783
+ 20 s, and at 89.999999° a 48-hour window takes up to three minutes
784
+ (Alcabitius).
785
+
786
+ Other flags are `polar-fallback`, when a cell uses whole-sign houses in place
787
+ of Placidus or Koch, `bound-exceeded` and `node-unresolved`. Invalid input
788
+ throws `RangeError`, including a window outside `REFERENCE_SPAN` and a
789
+ latitude within 1e-6° of either pole, where the ascendant is undefined or
790
+ turns too fast for the search. A search that would evaluate more than two
791
+ million instants outside the unresolved intervals throws `WindowBudgetError`,
792
+ which is an `Error` and not a `RangeError`. The entry point carries the
793
+ ephemeris and is separate from the root entry point, so that the root does not
794
+ grow.
795
+
596
796
  ### Resolved instant inputs
597
797
 
598
798
  `DateInput` values passed to the calculation APIs accept a valid `Date`, a finite
@@ -687,6 +887,29 @@ Gregorian adoption. Each resolution names the tzdb version, the transition
687
887
  behind the offset and its cause (`dst`, `legal-change` or `date-line`).
688
888
  [docs/time.md](docs/time.md) describes every field.
689
889
 
890
+ ## Nutation
891
+
892
+ Longitudes, the sidereal time and the obliquity of date use the IAU 2000B
893
+ nutation (McCarthy & Luzum 2003; IERS Conventions 2003, chapter 5), all 77 of
894
+ its luni-solar terms and its two fixed planetary offsets, which the engine
895
+ evaluates itself (`src/nutation.ts`, transcribed from NOVAS C 3.1). Its Δψ and
896
+ Δε equal ERFA's `nut00b` within 1e-10″ at 101 instants from 1800 to 2200
897
+ (`src/nutation.test.ts`). astronomy-engine's vectors on the J2000 mean equator
898
+ are turned to the ecliptic of date with astronomy-engine's own IAU 2006
899
+ precession (`src/frame.ts`) and that nutation. Measured against ERFA's IAU
900
+ 2006/2000A chain applied to the same vectors at 4,001 instants from 1800 to
901
+ 2200, that rotation puts a longitude at most 0.003691″ off, and the ascendant
902
+ and midheaven at latitudes within 60° at most 0.006284″ and 0.003358″ off; with
903
+ astronomy-engine's five-term nutation, used until this change, they were up to
904
+ 0.2520″, 0.8235″ and 0.2457″ off
905
+ (`docs/evidence/nutation-2026-09-29/results/erfa-frame.json`). The equation of
906
+ the equinoxes adds the two largest IAU 2000 complementary terms (IERS
907
+ Conventions 2010, table 5.2e). The opt-in entries use the same precession,
908
+ nutation and sidereal time: `@zodiacs/engine/calc` for its true-of-date
909
+ frames and its topocentric observer, `@zodiacs/engine/window` for the angles,
910
+ and `@zodiacs/engine/sky` for its apparent places and the observer's
911
+ sidereal angle.
912
+
690
913
  ## Accuracy and licensing
691
914
 
692
915
  The ephemeris is powered by the MIT-licensed `astronomy-engine`. Tests compare
@@ -702,9 +925,10 @@ CC BY 4.0, attributed in [NOTICE](NOTICE).
702
925
 
703
926
  The npm package contains no place database. It carries tzdb 2025c's zone
704
927
  histories before 1970, the IERS leap-second list, an IERS UT1 − UTC table, a
705
- table of Gregorian adoption dates from public-domain sources, and 22 catalogue
706
- values for the stars of the Vedic ayanamsas; [NOTICE](NOTICE) records their
707
- sources and the GeoNames attribution, and downstream users should retain it.
928
+ table of Gregorian adoption dates from public-domain sources, 22 catalogue
929
+ values for the stars of the Vedic ayanamsas, and the IAU 2000B nutation series
930
+ from NOVAS C 3.1, a US Government work; [NOTICE](NOTICE) records their sources
931
+ and the GeoNames attribution, and downstream users should retain it.
708
932
  [LICENSING.md](LICENSING.md) gives the terms of each.
709
933
 
710
934
  ## Internal site entry points
@@ -713,8 +937,9 @@ sources and the GeoNames attribution, and downstream users should retain it.
713
937
  compatibility boundaries for Zodiacs.org. They let the site consume the exact
714
938
  package implementation while keeping its scanner-oriented functions and lazy
715
939
  bundle boundary intact. They are not covered by semantic-versioning guarantees;
716
- third-party code must use the documented entry points: the root, `/geo`,
717
- `/timing`, `/vedic`, `/receipt`, `/crossings` and `/deltat`.
940
+ third-party code must use the documented entry points: the root, `/calc`,
941
+ `/geo`, `/houses`, `/sky`, `/techniques`, `/timing`, `/vedic`, `/window`,
942
+ `/receipt`, `/crossings` and `/deltat`.
718
943
 
719
944
  ## GeoNames request recovery
720
945
 
@@ -800,18 +1025,23 @@ and that the Moon has neither correction. Receipts from rc.3 to rc.7 are still
800
1025
  read, each under the conventions its engine recorded, and a set is accepted
801
1026
  only from the engine versions that wrote it.
802
1027
 
803
- The current set, written from 0.1.1-rc.15 on, also records the instant's scale
804
- (`receipt.timeScale`) and its time basis (`result.timeScale`), and a local
805
- resolution records the calendar, the tzdb version and form, the clock, the
806
- transition behind the offset and any birthplace mean time, each checked
807
- against the offsets and flags. Receipts under the rc.8 set (rc.8 to rc.14),
808
- which read the instant as UT1, stay readable and replay as UTC requests (see
809
- docs/time.md). A receipt's engine, ephemeris and package versions must be
810
- SemVer 2.0.0 versions. The codec accepts an earlier set only under the versions
811
- that wrote it, and compares the engine's version in SemVer order with
812
- 0.1.1-rc.15, which brought the current set, and with the releases that brought
813
- each house system: a receipt of the current set that names a version before
814
- 0.1.1-rc.15, such as 0.1.1-rc.14.1 or 0.1.1-beta, is refused.
1028
+ The time-basis sets, written from 0.1.1-rc.15 on, also record the instant's
1029
+ scale (`receipt.timeScale`) and its time basis (`result.timeScale`), and a
1030
+ local resolution records the calendar, the tzdb version and form, the clock,
1031
+ the transition behind the offset and any birthplace mean time, each checked
1032
+ against the offsets and flags. The current set, written from 0.1.1-rc.16 on,
1033
+ also names the nutation, the engine's IAU 2000B (`nutation`), and takes the
1034
+ Moon from astronomy-engine's geocentric series turned by the engine's frame
1035
+ (`moonPosition`); rc.15's set, which does not name the nutation, stays
1036
+ readable. Receipts under the rc.8 set (rc.8 to rc.14), which read the instant
1037
+ as UT1, stay readable and replay as UTC requests (see docs/time.md). A
1038
+ receipt's engine, ephemeris and package versions must be SemVer 2.0.0
1039
+ versions. The codec accepts an earlier set only under the versions that wrote
1040
+ it, rc.15's under 0.1.1-rc.15 alone, and compares the engine's version in
1041
+ SemVer order with 0.1.1-rc.16, which brought the current set, and with the
1042
+ releases that brought each house system: a receipt of the current set that
1043
+ names a version before 0.1.1-rc.16, such as 0.1.1-rc.15.1 or 0.1.1-beta, is
1044
+ refused.
815
1045
 
816
1046
  `natalReplayInput` recovers the recorded request. It does not select or install
817
1047
  the original engine. Recalculation with another engine, ephemeris dependency or
@@ -1,12 +1,18 @@
1
1
  import { DeltaT } from './deltat.js';
2
- import { B as BodyName, b as Chart, d as BirthInput, D as DateInput, e as ChartPoints, M as MoonPhase, a as BodyPosition, S as SynastryResult, f as TransitResult } from './types-BsWaqwU_.js';
2
+ import { B as BodyName, D as DateInput, d as Chart, h as BirthInput, i as ChartPoints, M as MoonPhase, c as BodyPosition, S as SynastryResult, j as TransitResult } from './types-B-yb_tGL.js';
3
3
  import { LongitudeCrossing, CrossingSearchOptions, CrossingSearchResult } from './crossings.js';
4
4
 
5
5
  /** Geometry over full ecliptic positions; no independent ephemeris is implied. */
6
6
 
7
- /** Site-compatible maximum orb, in degrees, for a pair without Sun or Moon. */
7
+ /**
8
+ * Site-compatible maximum orb, in degrees, for a pair without Sun or Moon.
9
+ * @deprecated The same value as DEFAULT_DECLINATION_ORB_POLICY.orb; use that.
10
+ */
8
11
  declare const DECLINATION_ORB = 1;
9
- /** Site-compatible maximum orb when either identifier is exactly Sun or Moon. */
12
+ /**
13
+ * Site-compatible maximum orb when either identifier is exactly Sun or Moon.
14
+ * @deprecated The same value as DEFAULT_DECLINATION_ORB_POLICY.luminaryOrb; use that.
15
+ */
10
16
  declare const DECLINATION_ORB_LUMINARY = 1.5;
11
17
  interface DeclinationOrbPolicy {
12
18
  /** Inclusive maximum difference in degrees for an ordinary pair. */
@@ -89,10 +95,9 @@ interface DeclinationAspect {
89
95
  interface Declinations {
90
96
  /**
91
97
  * True obliquity of date in degrees: the bound for out-of-bounds flags. From
92
- * chartDeclinations it is astronomy-engine's, at the chart instant on its TT
93
- * clock: the IAU 2006 mean obliquity plus astronomy-engine's five-term
94
- * truncation of the IAU 2000B nutation in obliquity. Elsewhere it is the
95
- * value supplied.
98
+ * chartDeclinations it is the engine's, at the chart instant on its TT
99
+ * clock: the IAU 2006 mean obliquity plus the IAU 2000B nutation in
100
+ * obliquity, all 77 terms. Elsewhere it is the value supplied.
96
101
  */
97
102
  trueObliquity: number;
98
103
  rows: DeclinationRow[];
@@ -103,7 +108,7 @@ interface Declinations {
103
108
  receiptScope: "not-included-in-natal-receipt";
104
109
  }
105
110
  interface ChartDeclinations extends Declinations {
106
- /** Observation instant, retaining the engine's UTC-label/UT1 convention. */
111
+ /** The chart's instant as given, ISO 8601, on the scale its `input.timeScale` names, as ChartInput.utc. */
107
112
  utc: string;
108
113
  /** The evaluated provider Delta-T used to obtain true obliquity. */
109
114
  deltaT: DeltaT;
@@ -151,14 +156,14 @@ interface SaturnReturnResult {
151
156
  * sample budget; {@link searchLongitudeCrossings} takes one and refuses
152
157
  * instead of throwing. Invalid input throws RangeError.
153
158
  */
154
- declare function findLongitudeCrossings(body: BodyName, targetLongitude: number, from: Date, to: Date, stepDays?: number): LongitudeCrossing[];
159
+ declare function findLongitudeCrossings(body: BodyName, targetLongitude: number, from: DateInput, to: DateInput, stepDays?: number): LongitudeCrossing[];
155
160
  /**
156
161
  * {@link findLongitudeCrossings} under an optional budget of ephemeris
157
162
  * evaluations, `maxSamples`, with the step as `stepDays` (default 5). Over
158
163
  * budget, it returns `{ status: "refused", reason: "sample-budget" }` with no
159
164
  * crossings rather than throwing.
160
165
  */
161
- declare function searchLongitudeCrossings(body: BodyName, targetLongitude: number, from: Date, to: Date, options?: CrossingSearchOptions): CrossingSearchResult;
166
+ declare function searchLongitudeCrossings(body: BodyName, targetLongitude: number, from: DateInput, to: DateInput, options?: CrossingSearchOptions): CrossingSearchResult;
162
167
  declare function groupIntoSeasons(crossings: readonly LongitudeCrossing[], gapDays?: number): ReturnSeason[];
163
168
 
164
169
  type NatalSource = Chart | BirthInput;