@zodiacs/engine 0.1.1-rc.14

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,502 @@
1
+ # Engine changelog
2
+
3
+ ## 0.1.1-rc.14 — unreleased candidate
4
+
5
+ - `engines` now reads `"node": "^20.19.0 || >=22.7.0"`; rc.13's `>=18` was
6
+ false. astronomy-engine 2.1.19 ships ES modules in a package without
7
+ `"type": "module"`, and plain Node loads them as ES modules only from 20.19.0
8
+ and 22.7.0. On 18.20.8, 20.18.3, 21.7.3 and 22.6.0, importing this package
9
+ fails with "Named export 'Body' not found". Bundlers are not affected. CI
10
+ installs the packed archive in a clean consumer on Node 20.19.0, 22.7.0, 22
11
+ and 24, and the consumer check refuses an unsupported runtime by name.
12
+ - The licence expression is `MIT AND CC-BY-4.0`. The 32 values of Stephenson,
13
+ Morrison & Hohenkerk's Table S15 in the package's ΔT module, shipped since
14
+ rc.8, are CC BY 4.0, as NOTICE says; `package.json` had declared `MIT` alone.
15
+ NOTICE, LICENSING.md and the README say where the values are: in a shared
16
+ chunk under `dist/`, which `dist/deltat.js` re-exports. `npm run
17
+ package:contents` checks that `package.json`, LICENSING.md, NOTICE and the
18
+ README agree, and that the build still puts the values there.
19
+ - Instants outside `EPHEMERIS_SPAN`, the years astronomy-engine tabulates (TT
20
+ 0001-04-30T12:00 to 3998-09-03T12:00), throw `RangeError` at once from every
21
+ calculation. rc.13 evaluated them, slowly and wrongly: a position at year
22
+ 30,000 took more than 20 s and put the Sun 29° off the ecliptic. The speed
23
+ samples must lie inside too, so on the model ΔT clock the instants from
24
+ 0001-05-01T00:00Z to 3998-09-02T00:00Z are evaluated. This replaces rc.13's
25
+ check against the ends of JavaScript's Date range.
26
+ - Each declination row gains `boundMarginArcsec`, the signed margin
27
+ `(abs(dec) − trueObliquity) × 3600`. The out-of-bounds flag is exactly
28
+ `boundMarginArcsec > 0`, the exempt Sun aside, and agrees with the sky only
29
+ where the margin exceeds the ephemeris's declination error. Against JPL's
30
+ DE440s at 20,000 instants from 1850 to 2150, the largest errors were 2.7″
31
+ for the Sun, 3.4″ for the Moon, 4.6″ for Pluto and 12″ to 22″ for the other
32
+ planets; the README gives each. Within them a flag can be wrong either way:
33
+ at 2022-10-22T08:11:10.756Z the engine puts Mars 1.57″ inside the bound, and
34
+ DE440s 1.05″ beyond it.
35
+ - The Sun's exemption is restated as a convention. rc.13's reason was wrong,
36
+ and its entry is corrected below. The real Sun does pass the bound: computed
37
+ with ERFA, at 402 of the 800 solstices from 1800 to 2199, by up to 1.09″
38
+ (DE440s agrees within 0.008″ over 1850–2149). The engine cannot tell: its
39
+ solar declination is off by up to 2.7″ near the present, and its solar
40
+ latitude drifts from −1.1″ on average in the 1800s to +1.1″ in the 2100s, so
41
+ at those solstices its margin has the real sign at only 404 of the 800. Far
42
+ from J2000 the drift reaches tens of arcseconds: −68.3″ at the June solstice
43
+ of year 2, +25.8″ at that of 3902. So `chartDeclinations` never flags the
44
+ chart's own Sun, at any latitude, as rc.13 did not; it is unflagged at all
45
+ 7,995 solstices in `EPHEMERIS_SPAN`. `declinationsForBodies` exempts a
46
+ supplied row labelled `Sun` only within `SUN_BOUND_LATITUDE` (0.001°) of the
47
+ ecliptic, and holds it to the strict rule beyond.
48
+ - `trueObliquity` is the IAU 2006 mean obliquity plus astronomy-engine's
49
+ five-term truncation of the IAU 2000B nutation in obliquity, not IAU 2000B
50
+ itself, and the documentation now says so. It differed from ERFA's `obl06`
51
+ plus `nut00b` by up to 0.086″ at the 20,000 instants.
52
+ - A declination aspect's longitude `separation` is the short way round between
53
+ the supplied longitudes reduced exactly modulo 360, rounded once, whatever
54
+ their size. rc.13 first normalized each longitude into [0, 360), which
55
+ rounds: −1e-20 and 0 were 5.68e-14 apart (now 1e-20), and −0.1 and 0.2 were
56
+ 0.30000000000002275 apart (now 0.30000000000000004).
57
+ - The body-label rule is stated precisely: 1 to 80 UTF-16 code units,
58
+ unchanged by `String.prototype.trim` (so no U+FEFF or U+3000 at either end),
59
+ and no C0 control character or DEL. C1 controls, U+200B and lone surrogates
60
+ pass. The rule and its message are rc.13's, but rc.13 changed the message
61
+ without saying so: configured aspects used to say "Body labels must be
62
+ nonempty, trimmed strings of at most 80 characters." and the declination
63
+ functions "body identifier must be a nonempty string."; both now say "Body
64
+ labels must be nonempty, trimmed strings of at most 80 characters, without
65
+ control characters." Code that matched the old text must match the new.
66
+ - The archive check reads git objects only, never the working tree, and every
67
+ commit reachable from HEAD, with no history simplification. The rc.13 check
68
+ missed a rewrite on a merged side branch and accepted rc.11's first packing
69
+ in any commit; reviews of two earlier local rc.14 builds found more ways
70
+ past it. Now:
71
+ - `artifacts/archives.json` records each archive's digest, size, file count
72
+ and source commit. It is append-only: every committed version of it must
73
+ be a prefix of HEAD's, and each commit's must extend its parents'. Its
74
+ superseded entries are pinned in the script: rc.11's first packing, allowed
75
+ only in 00bdae7, where it was committed.
76
+ - Every recorded version, and `package.json`'s at HEAD, must be a strict
77
+ semantic version, with no `v` prefix and no build metadata, and no two
78
+ carried versions may be equal as npm compares them (`semver.eq`). A second
79
+ archive under `0.1.1-rc.14+evil` or `v0.1.1-rc.14` is refused, and so is a
80
+ HEAD version that differs only in build metadata, which let the check skip
81
+ HEAD's rebuild.
82
+ - In every commit, `artifacts/` must be a real directory holding only
83
+ archives, receipts, the manifest and its README, as regular files: no
84
+ symbolic link, no subdirectory, and no two names, nor another top-level
85
+ entry and `artifacts`, that differ only in case.
86
+ - Every version's receipt is checked, and nothing ever committed under
87
+ `artifacts/` may be missing from HEAD.
88
+ - Each archive's packed `package.json`, README, CHANGELOG and licence files
89
+ must be byte-identical to its source commit's, and the commit that
90
+ introduces it must be that source commit or a child of it.
91
+ - A clean worktree of HEAD must rebuild the current version's archive byte
92
+ for byte, both by default and with `--rebuild-all`, which also rebuilds
93
+ every archive from its source commit; CI runs both. Each rebuild installs
94
+ its commit's locked dependencies afresh with `npm ci` in that worktree and
95
+ takes nothing from the checkout's `node_modules`. A change to a packed file
96
+ under a version already carried fails either way.
97
+ - Merge with merge commits: a squash or rebase merge rewrites the source
98
+ commit, and the check then fails.
99
+ - rc.14 includes main's conformance suite (`conformance/`, not packed) and the
100
+ section of LICENSING.md about it, which is packed. Its archive is built from
101
+ that merged source.
102
+ - TypeDoc canonical URLs point to
103
+ https://zodiacs.org/developers/engine/reference/, and the footer names both
104
+ licences. Earlier entries refer to the separate earlier package by its
105
+ repository, github.com/ZodiacsOfficial/sdk, instead of its npm name.
106
+ - rc.13's exact decisions cost time. In the review's worst case, 256 bodies
107
+ under 64 custom rules (32,045 aspects), `findConfiguredAspects` took 1.72 s,
108
+ where rc.12 took 0.19 s, and 256 declinations all within a 90° orb took
109
+ 0.47 s, where rc.12 took 0.07 s (each the fastest of 63 runs on Node 22.22.2
110
+ on a shared four-core machine). An ordinary chart's configured aspects or
111
+ declinations still take under a millisecond.
112
+
113
+ Migration: plain Node consumers need Node 20.19.0 or a later 20.x, or 22.7.0
114
+ or later. Calculations at instants outside `EPHEMERIS_SPAN` throw `RangeError`.
115
+ Declination rows gain `boundMarginArcsec`. A row labelled `Sun` given to
116
+ `declinationsForBodies` more than 0.001° off the ecliptic can now be out of
117
+ bounds; the chart's own Sun in `chartDeclinations` never is. Declination
118
+ separations of longitudes outside [0, 360) can change, by less than 1e-13°.
119
+ Natal, transit, synastry, progression and receipt results are unchanged apart
120
+ from the reported engine version.
121
+
122
+ ## 0.1.1-rc.13 — unreleased candidate
123
+
124
+ - Configured aspects are exact on binary64 inputs. `findConfiguredAspects`
125
+ takes every longitude, speed, angle, orb and threshold as the exact value of
126
+ its double, forms the signed separation without rounding, folds it into
127
+ (−180°, 180°] by exactly 360°, and decides the orb test, the closest rule,
128
+ the motion and the result order on exact values, with no tolerance. Only the
129
+ reported orb is rounded, once, to nearest with ties to even. The policy's
130
+ conventions gain `arithmetic: "exact-binary64;reported-orb-rounded-half-even"`.
131
+ rc.11's direct subtraction still rounded across 0°: Mars at
132
+ 7.6999999999999895 and Saturn at 359.7, which are 8 + 2⁻⁵⁰ apart, are no
133
+ longer a default conjunction at orb 8, and Jupiter at 6.3 and the Sun at 314
134
+ now fall within a 7.3° semisquare orb, at exactly 7.3. The zero-orb square
135
+ between 188.86 and 98.86 stays unmatched, since they are 90 + 2⁻⁴⁶ apart;
136
+ the pre-merge rc.11 build at 00bdae79 matched it only by rounding.
137
+ - Declination parallels and contraparallels use the same exact arithmetic on
138
+ the declination doubles: 13.3 and 12.3 match at orb 1, while 8.3 and 7.3, and
139
+ 1.1 and 0.1, do not. The reported orb and longitude separation are rounded once.
140
+ - A row labelled exactly `Sun` is never out of bounds. Other rows keep the
141
+ strict rule against astronomy-engine's true obliquity of date. (Corrected in
142
+ rc.14. This entry said the Sun defines the bound and so never passes it, and
143
+ that its latitude had put the computed declination beyond it at 400 of the
144
+ 800 solstices from 1800 to 2200, by up to 1.35″, as at 2024-06-20T20:51Z. The
145
+ real Sun does pass the bound, at 402 of the 800 solstices from 1800 to 2199,
146
+ by up to 1.09″; the engine's 400 come from astronomy-engine's drifting solar
147
+ latitude and have the real sign at only 404 of the 800. The obliquity is the
148
+ IAU 2006 mean obliquity plus a five-term truncation of the IAU 2000B nutation
149
+ in obliquity, not IAU 2000B itself. rc.14 keeps the exemption as a
150
+ convention: for the chart's own Sun at any latitude, and for a supplied Sun
151
+ row within 0.001° of the ecliptic.)
152
+ - One body-label rule for both analyses. The declination functions now reject,
153
+ as configured aspects already did, labels that are empty, longer than 80
154
+ characters, carry surrounding whitespace or contain control characters, with
155
+ the same `RangeError` message.
156
+ - Ephemeris failures are `RangeError`s. Speed samples are checked against
157
+ JavaScript's Date range, so `positions` and `progressedBodies` within six
158
+ hours of ±8.64e15 ms no longer throw astronomy-engine's plain string. Any
159
+ other string it throws, such as its light-time solver's refusal at year
160
+ −250,000, reaches the caller as a `RangeError` whose `cause` is the original
161
+ value. The README states the evaluable range.
162
+ - Secondary-progression documentation states that the mapping counts UTC
163
+ milliseconds without leap seconds, not ephemeris days; that the speed is a
164
+ central difference over ±0.001 day (±0.25 day for the nodes), numerically
165
+ degrees per tropical year of life; and that the pre-birth mapping is not a
166
+ converse progression. The cited PDF's SHA-256 and pages 84–85 are recorded,
167
+ with the book's own 4.73 s precision budget behind the 5 s comparison and a
168
+ new regression within 50 ms of its unrounded result.
169
+ - `homepage` is the repository README, and the TypeDoc footer and links are
170
+ neutral. The packed-consumer check sets `"types": []`, refuses a temporary
171
+ directory with `node_modules` above it, and removes that directory; the
172
+ rc.12 site-adoption check counts its mismatches and cleans up.
173
+ - CI, now on Node 20, 22 and 24, runs `npm run archive:binding`: it refuses
174
+ any carried archive that changes or disappears in history, and rebuilds the
175
+ archive for the current version, requiring identical bytes (skipping that
176
+ comparison until the version's archive exists). `artifacts/README.md` lists
177
+ every carried archive. The first rc.11 archive, packed at 00bdae79
178
+ (SHA-256 `13d637db…`, 70,676 bytes), was superseded before merge and never
179
+ released; the rc.11 archive is `d88e0ff8…`. A version string will not again
180
+ name two different byte sequences.
181
+
182
+ Migration: configured-aspect and declination-parallel results can change at
183
+ exact boundaries (membership, motion, order), and reported orbs and separations
184
+ can differ from rc.12's by up to about 2⁻⁴⁴°, not only in their last bit
185
+ (wording corrected in rc.14). 2⁻⁴⁵° was the largest difference in 200,000
186
+ random pairs; Moon 331.026 and Sun 103.38600000000001 under a custom 132.36°
187
+ angle had orb 0 in rc.12 and 2⁻⁴⁶° in rc.13. The Sun's `outOfBounds` can
188
+ change from true to false. Labels the declination API used to accept can now
189
+ throw `RangeError`. Callers near the ends of the Date range should expect
190
+ `RangeError` instead of a string. Natal, transit, synastry, progression-mapping
191
+ and receipt conventions are unchanged apart from the reported engine version.
192
+
193
+ ## 0.1.1-rc.12 — unreleased candidate
194
+
195
+ - Export `PROGRESSION_DAYS_PER_YEAR`, `progressedInstant` and
196
+ `progressedBodies` for the site's existing secondary-progression convention:
197
+ one 365.2422-day tropical year of elapsed life maps to one day after birth
198
+ (86,400,000 ms of UTC time, without leap seconds; wording corrected in rc.13).
199
+ - Accept the normal resolved `DateInput` forms with strict validation, retain
200
+ signed targets before birth and preserve the original floating-point
201
+ operation order and integer-millisecond Date truncation.
202
+ - Return the same twelve position rows as `positions`, including true lunar
203
+ nodes. Speeds remain ephemeris degrees/day at the progressed instant, not
204
+ degrees per lived day. No progressed angles, houses, extra chart points,
205
+ solar-arc convention, aspect policy or receipt extension is added.
206
+ - Reuse the existing public JPL fixture for a constructed mapping-and-position
207
+ component check and add a rounded published date-mapping example. These
208
+ checks do not establish predictive validity or new physical accuracy bounds.
209
+
210
+ Migration: existing calculations and natal receipt conventions are unchanged
211
+ apart from the reported engine version. The site remains separately pinned;
212
+ this is an unpublished package candidate, not site adoption or npm release.
213
+
214
+ ## 0.1.1-rc.11
215
+
216
+ - `createAspectPolicy` and `findConfiguredAspects` add explicit, immutable
217
+ longitude-aspect policies: major, minor and custom angles; per-aspect,
218
+ per-body and applying/separating/stationary orb limits; selected bodies;
219
+ and deterministic matching. The result includes its resolved policy.
220
+ - The unpublished candidate's review repair uses direct bounded subtraction
221
+ in configured matching and motion, preserving exact custom-angle matches
222
+ at zero orb without widening tolerances. Configured boundary behavior can
223
+ differ at roundoff scale from the historical helper; existing natal,
224
+ transit, synastry and receipt calculations are unchanged. Current repair
225
+ evidence is in `docs/evidence/rc11-20260928/decimal-orb-repair/`.
226
+ - `chartDeclinations(natal)` derives right ascension and declination from
227
+ full ecliptic longitude and latitude using true obliquity on the chart's
228
+ pinned or model ΔT clock. It includes parallel/contraparallel aspects,
229
+ explicit orb settings and out-of-bounds flags. Right ascension is in
230
+ degrees and is null at a numerical celestial pole.
231
+ - `eclipticToEquatorial`, `declinationsForBodies`, `declinationOf`,
232
+ `declinationOrb` and `findDeclinationAspects` expose the underlying geometry
233
+ with an explicitly supplied obliquity.
234
+ - Validation and finite comparison evidence is in
235
+ `docs/evidence/rc11-20260928/`. The ephemeris provider and its corrections
236
+ are unchanged; the programme's physical declination accuracy target is
237
+ not established by the new geometric checks.
238
+
239
+ Migration: existing natal, synastry, transit and receipt conventions stay
240
+ unchanged. New aspect policies do not alter `chart.aspects`. The additional
241
+ analyses are not included in the natal receipt. This is a review candidate,
242
+ not an npm publication or a completed Phase 2 milestone.
243
+
244
+ ## 0.1.1-rc.10
245
+
246
+ - A thirteenth house system, `"equal-mc"`: Equal houses from the midheaven,
247
+ 30° each with the 10th cusp at the midheaven (Swiss Ephemeris's `D`). It
248
+ depends on neither the ascendant nor the latitude, so it is the same at every
249
+ latitude. `equalMcCusps` computes it. Receipts accept it and check that its
250
+ cusps count 30° from the midheaven; a receipt naming an engine before rc.10
251
+ cannot carry it.
252
+ - `chartPoints(natal)` returns the chart's points and its sect.
253
+ - **Mean Node and Mean South Node**: the Moon's mean node from the IERS
254
+ Conventions' fundamental arguments (Simon et al. 1994), with the nutation in
255
+ longitude.
256
+ - **Black Moon Lilith**: the mean lunar apogee. It is the point of the mean
257
+ orbit 180° from the mean perigee, carried to the ecliptic, so it has a
258
+ latitude of up to 5.15°.
259
+ - Both are within 0.7″ of Swiss's `SE_MEAN_NODE` and `SE_MEAN_APOG` every
260
+ 3.7 days from 1800 to 2199, and carry a speed.
261
+ - **Vertex and East Point**, from the instant and the place. Given the same
262
+ sidereal time, latitude and obliquity they agree with Swiss's to within
263
+ 0.00001″. `vertexOf` and `eastPointOf` compute them.
264
+ - **The lots** of Fortune, Spirit, Eros, Necessity, Courage, Victory and
265
+ Nemesis, after Paulus Alexandrinus, from the chart's ascendant and bodies,
266
+ reversed by night. `sectOf` gives the sect they use.
267
+ - `antiscion`, `contraAntiscion` and `midpoint` for any longitudes.
268
+ - The osculating Lilith is left out. astronomy-engine's lunar series puts it
269
+ 198″ from Swiss's at the median, and up to 683″.
270
+
271
+ Migration: nothing changes for existing charts, systems or receipts.
272
+ `validateBirthSettings` accepts `"equal-mc"`, and its error message lists all
273
+ thirteen systems. The conventions set is rc.8's, unchanged.
274
+
275
+ ## 0.1.1-rc.9
276
+
277
+ - Nine more house systems, for twelve: Koch, Regiomontanus, Campanus,
278
+ Topocentric (Polich–Page), Alcabitius, Equal, Vehlow, Meridian (axial
279
+ rotation) and Morinus, beside whole sign, Placidus and Porphyry. Each
280
+ follows the definition Swiss Ephemeris uses. Given the same sidereal time,
281
+ latitude and obliquity, every one agrees with Swiss's `swe_houses_armc` to
282
+ within 0.0001″ over 20,000 random cases at every latitude and on the
283
+ 55°–66.6° ladder; Placidus, which iterates, to 0.0096″.
284
+ - Koch, like Placidus, is undefined inside the polar circle and falls back to
285
+ whole sign with the `polar-fallback` flag, where Swiss refuses it. The new
286
+ `POLAR_FALLBACK` names that system, and `POLAR_UNDEFINED_HOUSE_SYSTEMS` the
287
+ two systems that use it; `PLACIDUS_POLAR_FALLBACK` stays. Every other
288
+ system is computed at every latitude where the angles are. Inside the polar
289
+ circle Regiomontanus, Campanus and Topocentric cusps turn with the eastern
290
+ ascendant, so their 10th cusp is the lower meridian there, as in Swiss.
291
+ - Each system is exported as a function (`kochCusps`, `regiomontanusCusps`,
292
+ `campanusCusps`, `topocentricCusps`, `alcabitiusCusps`, `equalCusps`,
293
+ `vehlowCusps`, `meridianCusps`, `morinusCusps`) and through `computeHouses`.
294
+ `src/house-systems.test.ts` holds each to its own definition: Regiomontanus
295
+ and Campanus cusps lie on their circles through the horizon's north point,
296
+ Koch and Topocentric cusps are the ascendants they are defined as, and
297
+ Alcabitius, Meridian and Morinus cusps have the right ascensions they are
298
+ defined by.
299
+ - Receipts accept the new systems and check each system's shape: Equal and
300
+ Vehlow count 30° from the ascendant, the quadrant systems put the ascendant
301
+ on the 1st cusp and the midheaven on the 10th (the lower meridian only for
302
+ the three turning systems, and only beyond 65° of latitude), Meridian keeps
303
+ the midheaven, and every system's cusps come in opposite pairs. A receipt
304
+ naming an engine before rc.9 cannot carry a new system. The conventions set
305
+ is rc.8's, unchanged.
306
+
307
+ Migration: nothing changes for whole sign, Placidus or Porphyry.
308
+ `validateBirthSettings` accepts the new names, and its error message lists
309
+ all twelve.
310
+
311
+ ## 0.1.1-rc.8
312
+
313
+ - Observed ΔT with a band (Phase 1 step 1.4). The model `zodiacs-deltat/1`
314
+ replaces astronomy-engine's 2004 polynomial: Stephenson, Morrison &
315
+ Hohenkerk's 2016 reconstruction to 1941, USNO and IERS values from 1941,
316
+ Bulletin A's predictions, then a damped extrapolation. Today ΔT falls from
317
+ 75.50 s to 69.20 s (IERS: 69.20 s): the Moon moves back 3.4″, and Moon
318
+ events come about 6 s later. At 2100 ΔT is 78.9 ± 42.4 s, where rc.7 gave
319
+ 202.7 s. Every chart reports `deltaT`; birth inputs take a `deltaT` pin;
320
+ `@zodiacs/engine/deltat` exports the model with no dependencies.
321
+ - Receipts record ΔT (`result.deltaT`, conventions `deltaT`) and name the
322
+ ephemeris (`receipt.engine.ephemeris`, astronomy-engine 2.1.19, now an
323
+ exact dependency pin). The conventions no longer call the planets
324
+ "apparent": they are aberrated but not deflected, and the Moon has
325
+ neither correction. rc.7's conventions are frozen; each set is read only
326
+ from the engine versions that wrote it, and receipts from rc.3 to rc.7
327
+ still parse and replay.
328
+ - `REFERENCE_SPAN`: a chart before 1800-01-01T00:00Z or from
329
+ 2200-01-01T00:00Z carries the new `outside-reference-span` flag.
330
+ - One longitude-crossing solver, the one the site runs. It moves into the
331
+ package as `@zodiacs/engine/crossings`: `findLongitudeCrossingsWith` and
332
+ `searchLongitudeCrossingsWith` take the longitude function as their first
333
+ argument and import no ephemeris. `findLongitudeCrossings` and
334
+ `saturnReturn` run it on the engine's longitudes.
335
+ - The window is (from, to]. A root exactly at `from` is no longer returned. A
336
+ sample exactly on the target is returned once, at that sample, including a
337
+ touch and the start of a plateau, which rc.7 dropped.
338
+ - A station that falls between two samples just past the target now gives
339
+ both crossings. A natal Saturn 0.002° below its 2019 station gets three
340
+ first-return passes, where rc.7 gave one.
341
+ - No sample budget and no `RangeError` for the size of a search. A quarter-day
342
+ Moon scan over 2,600 days returns its 95 crossings, and Saturn from 1900 to
343
+ 2100 at 5 days its 13, where rc.7 threw at 10,000 samples.
344
+ `searchLongitudeCrossings` takes an optional `maxSamples` and returns a typed
345
+ `refused` result instead of throwing.
346
+
347
+ Migration: positions move by ΔT's change (the Moon about 3.4″ today, far
348
+ more in the far future), charts gain `deltaT` and may gain
349
+ `outside-reference-span`, and receipts from rc.8 carry the new conventions.
350
+ A crossing exactly at `from` is left out; include it by starting the window
351
+ earlier. Exact touches and grazing station pairs can add crossings to
352
+ Saturn-return seasons. Code that relied on the `RangeError` to bound work
353
+ should pass `maxSamples` to `searchLongitudeCrossings`.
354
+
355
+ ## 0.1.1-rc.7
356
+
357
+ - Judge an aspect applying from the sign of its orb's rate of change. The old
358
+ rule moved both bodies 0.02 day ahead, and so read every aspect as separating
359
+ for the last 14.4 minutes before exact. `aspectMotion`, `AspectMotion` and
360
+ `STATIONARY_RELATIVE_SPEED` are exported; `Aspect.applying` stays a boolean.
361
+ - Take each speed as the derivative of the reported longitude over ±0.001 day.
362
+ The Moon's step error at perigee falls from 7.55″ a day to 0.0015″ a day. The
363
+ true node keeps ±0.25 day. The Saturn return scan takes natal Saturn's
364
+ direction from the same speed as the chart.
365
+ - Build the ascendant and midheaven on the true obliquity of date, the one that
366
+ matches apparent sidereal time. Against ERFA on the 3,128-case grid, the
367
+ ascendant's largest error falls from 506.8″ to 6.36″, and within 45° of the
368
+ equator from 14.6″ to 0.36″. The midheaven's falls from 2.25″ to 0.20″.
369
+ - Put the Placidus limit at 90° minus the true obliquity, 66.53° to 66.59° over
370
+ 1800–2200, where it was 66°. Between the two, Placidus is now computed
371
+ instead of falling back to whole sign.
372
+ - Offer `houseSystem: "porphyry"`. It is defined wherever the ascendant and
373
+ midheaven are, including inside the polar circle. Placidus keeps whole sign
374
+ as its polar fallback, now exported as `PLACIDUS_POLAR_FALLBACK` and returned
375
+ as `fallbackSystem`.
376
+ - Receipts record the new speed, aspect and angle conventions. The set that
377
+ rc.3 to rc.6 recorded is kept as `CONVENTIONS_RC3`, and their receipts stay
378
+ readable and replay as before. `NATAL_RECEIPT_CONVENTION_SETS` lists both
379
+ sets. A receipt must match one set exactly, and the old set only with an rc.3
380
+ to rc.6 version. Porphyry is accepted only in the new set.
381
+
382
+ Migration: planetary longitudes are unchanged. Speeds, the angles, Placidus
383
+ cusps between 66° and the polar circle, and the applying flag of aspects close
384
+ to exact can change. Recorded receipts are immutable and are not rewritten.
385
+
386
+ ## 0.1.1-rc.6 — unreleased candidate
387
+
388
+ - Compare the complete civil timestamp, including seconds and milliseconds, when
389
+ matching a local HH:MM input. Historical shifts smaller than one minute now
390
+ receive the correct gap/fold flags; neighboring ordinary times lose false
391
+ ambiguity flags. The selected instants in the retained finite controls agree.
392
+ - Normalize only floating-point offset conversion to integer milliseconds.
393
+ Preserve historical offset seconds, actual fractional-minute offsets, earlier
394
+ fold selection and the existing forward-gap policy.
395
+ - Retain strict date/time/zone guards and the existing three-point offset
396
+ sampling. This is a precision correction, not a proof of complete transition
397
+ discovery, historical source accuracy or broad astronomical coverage.
398
+
399
+ Recorded receipts are immutable and are not rewritten. Recomputations can have
400
+ corrected time flags under this new version. The receipt schema, core numerical
401
+ formulas, the earlier package in github.com/ZodiacsOfficial/sdk, site/starter
402
+ pins and account protocols are unchanged. The explicit merge/publication hold
403
+ and required review on pull request #5 of that repository remain.
404
+
405
+ ## 0.1.1-rc.5 — unreleased candidate
406
+
407
+ - Preserve all five typed birth flags while checking derived echoes against the
408
+ actual result. Correct unknown-time/polar echoes now produce canonical flags
409
+ once and round-trip through the unchanged draft receipt schema.
410
+ - Reject unknown, malformed and contradictory claims. Snapshot up to 64 raw
411
+ data entries without custom array iteration or scalar coercion; deduplicate
412
+ valid claims. Canonical input records semantics, not the submitted array.
413
+ - Validate supplied Chart flag consistency against its input and house/angle
414
+ metadata. Keep canonical object identity; normalize compatible echoes with a
415
+ shallow metadata copy. This does not authenticate astronomical values.
416
+ - Capture validated public/civil settings once. Reject invalid civil settings
417
+ and explicit null local time before Intl resolution. Ordinary Saturn inputs
418
+ remain date-only; an explicit raw polar assertion requires one natal
419
+ calculation before the return scan.
420
+
421
+ Migration: do not use flags to override timeKnown or the requested house system.
422
+ Fix contradictory/missing result claims in supplied Charts. Arrays over 64 raw
423
+ entries reject. Historical time flags remain assertions; executable same-realm
424
+ getters/proxies are not sandboxed. Internal computation, receipt wire format,
425
+ site/starter pins and the APIs of the earlier package in
426
+ github.com/ZodiacsOfficial/sdk are unchanged. Required review and the explicit
427
+ merge/publication hold on pull request #5 of that repository remain.
428
+
429
+ ## 0.1.1-rc.4 — unreleased candidate
430
+
431
+ - Validate the optional GeoNames client's compact v1 index and requested shard
432
+ before caching fulfillment. Malformed HTTP-200 JSON now rejects with a fixed
433
+ schema error and can be retried by a later explicit call.
434
+ - Reject unsafe table indices, coerced/out-of-range coordinates and malformed
435
+ rows before returning partial results. Preserve Unicode names, empty region
436
+ and country labels, geographical endpoints and host-independent timezone
437
+ strings. No automatic retries, eager shard requests or new network endpoint.
438
+ - Return metadata array snapshots from `preload()` so caller mutation cannot
439
+ alter validated cache state. Keep valid/in-flight cache sharing and original
440
+ fetch/HTTP/JSON-parser failures.
441
+ - These checks do not authenticate place facts or detect structurally valid
442
+ mixed-generation data. The v1 assets lack generation/content identities;
443
+ hosts must serve matching index and shards together.
444
+
445
+ Site application rc.1 and the separately delivered standalone starter rc.3
446
+ remain pinned to their existing artifacts. Numerical calculations are unchanged
447
+ apart from the reported engine version. The explicit review/publication hold on
448
+ pull request #5 of github.com/ZodiacsOfficial/sdk, the repository of an earlier
449
+ package, remains; this entry is not npm publication or production release.
450
+
451
+ ## 0.1.1-rc.3 — unreleased candidate
452
+
453
+ - Add an optional draft natal receipt/envelope entry point for bounded local
454
+ export/import, requested-versus-actual house preservation and redacted
455
+ diagnostics. This does not change account sync v1 or establish an industry
456
+ standard. Preserve original ISO spelling when captured and replay the recorded
457
+ request without consulting today's timezone database. Imported provenance is
458
+ an unauthenticated claim; recalculation across versions may differ.
459
+ - Reject duplicate decoded JSON keys, unknown versions/features, excessive
460
+ input, inconsistent flags/results and unsupported exact-pole angles. Keep
461
+ parser exceptions and arbitrary imported metadata out of diagnostics.
462
+ - The site and starter retain rc.1. Package publication, production release and
463
+ required human/external review remain separate gates.
464
+
465
+ ## 0.1.1-rc.2 — unreleased candidate
466
+
467
+ - Permit a later explicit GeoNames preload/search call to retry after rejected
468
+ network requests, unsuccessful HTTP responses or JSON parsing failures.
469
+ - Preserve shared in-flight requests, successful index/shard caches and original
470
+ rejection reasons. No automatic retry loop or per-caller cancellation API.
471
+ - This does not validate structurally invalid but parseable JSON responses.
472
+ The site and public starter retain their immutable rc.1 candidate.
473
+
474
+ This candidate changes the optional geo client only; existing numerical
475
+ calculations are unchanged apart from the reported package version. The
476
+ review/publication hold on pull request #5 of github.com/ZodiacsOfficial/sdk,
477
+ the repository of an earlier package, remains.
478
+
479
+ ## 0.1.1-rc.1 — unreleased candidate
480
+
481
+ - Correct the polar ascendant in the shared implementation before deriving
482
+ houses. Public consumers and the site receive the same rising axis.
483
+ - Require Placidus iteration convergence; allow up to 64 iterations and use
484
+ a tighter stopping criterion, retaining the conservative 66-degree limit.
485
+ - Reject invalid calendar dates, ambiguous local date-times, non-date
486
+ coercions, unsupported house systems and nonboolean unknown-time settings.
487
+ Date-only ISO inputs still mean UTC midnight; date-times require an offset.
488
+ - Add public contract regressions and a real packed-consumer ESM/types check.
489
+ - Bound longitude-crossing work and reject steps that cannot advance time.
490
+ - Emit an exact coarse-sample crossing once, with explicit endpoint semantics.
491
+ - Preserve proleptic Gregorian years below 100 in local-time conversion;
492
+ format historical years without false daylight-saving gap flags.
493
+
494
+ Migration: valid resolved inputs retain their shape. Callers previously relying
495
+ on `Date` rollover, implicit machine timezone, or silently ignored settings must
496
+ resolve/correct those inputs. Do not compare cached chart receipts across
497
+ versions without recalculation. The API of the earlier package in
498
+ github.com/ZodiacsOfficial/sdk is unchanged.
499
+
500
+ Release holds remain in pull request #5 of that repository. This entry records
501
+ implementation, not publication, deployment, full external review, or
502
+ adoption.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Zodiacs.org
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/LICENSING.md ADDED
@@ -0,0 +1,99 @@
1
+ # Licensing gate
2
+
3
+ Status: **GO for a package licensed `MIT AND CC-BY-4.0`**, subject to the
4
+ repository operator having authority to publish the Zodiacs.org-authored
5
+ TypeScript under the MIT license.
6
+
7
+ SPDX licence expression: `MIT AND CC-BY-4.0`. The code is MIT (`LICENSE`). The
8
+ package's ΔT module, exported as `@zodiacs/engine/deltat`, carries 32 values
9
+ of Table S15 of Stephenson, Morrison & Hohenkerk 2016, which are CC BY 4.0
10
+ (see *ΔT data* below), with their attribution in `NOTICE`. The build places
11
+ that module in a shared chunk under `dist/`, which `dist/deltat.js`
12
+ re-exports. Both licences apply to the package as distributed. From
13
+ 0.1.1-rc.8, which added those values, to rc.13, `package.json` declared `MIT`
14
+ alone; rc.14 corrects it.
15
+
16
+ ## Provenance chain
17
+
18
+ The package implementation was adapted from these Zodiacs.org TypeScript
19
+ modules:
20
+
21
+ - `src/lib/engine/full.ts` — planetary positions and chart assembly
22
+ - `src/lib/engine/houses.ts` — independently implemented spherical
23
+ trigonometry for angles, whole-sign houses, and Placidus houses
24
+ - `src/lib/engine/aspects.ts` — aspect matching
25
+ - `src/lib/engine/synastry.ts` — inter-chart aspect and balance summaries
26
+ - `src/lib/engine/returns.ts` — longitude crossing and Saturn-return scans
27
+ - `src/lib/engine/progressions.ts` — elapsed-time secondary-progression mapping
28
+ - `src/lib/time/localToUtc.ts` — host-`Intl` timezone conversion
29
+ - `src/lib/geo/search.ts` — client for the separately hosted GeoNames index
30
+
31
+ `src/exact.ts`, added in 0.1.1-rc.13, is this package's own implementation of
32
+ exact sums of binary64 values for the configured-aspect and declination
33
+ decisions. It follows published algorithms: the nonoverlapping expansions of
34
+ J. R. Shewchuk, "Adaptive Precision Floating-Point Arithmetic and Fast Robust
35
+ Geometric Predicates" (1997), in the partial-sums form documented for Python's
36
+ `math.fsum`, with one round-to-nearest-even at the end. It adds no dependency.
37
+
38
+ The computational dependency is `astronomy-engine@2.1.19`. Its installed npm
39
+ metadata declares MIT, names Donald Cross as author, and links to
40
+ `https://github.com/cosinekitty/astronomy`. Its distributed
41
+ `esm/astronomy.js` begins with a preserved MIT notice and a 2019–2023 Don Cross
42
+ copyright line. The package uses its geocentric vectors, coordinate rotations,
43
+ Moon state, sidereal time, and date helpers.
44
+
45
+ Repository and dependency searches found no Swiss Ephemeris runtime import,
46
+ package dependency, vendored source, or generated lookup table in this npm
47
+ package.
48
+
49
+ ## Swiss Ephemeris exclusion
50
+
51
+ The website test suite contains Placidus reference constants generated with
52
+ `pyswisseph`. Those constants and their surrounding test block were
53
+ deliberately **not copied**. Package accuracy tests contain only:
54
+
55
+ - public JPL Horizons longitude vectors;
56
+ - geometric and astronomical invariants;
57
+ - synthetic aspect fixtures; and
58
+ - behavior computed directly by this package.
59
+
60
+ The Placidus implementation is the site's own formula-based TypeScript, not a
61
+ port or translation of Swiss Ephemeris code. This licensing decision must be
62
+ revisited before accepting any Swiss Ephemeris source, binary, table, or
63
+ generated fixture into the package.
64
+
65
+ ## ΔT data
66
+
67
+ `src/deltat.ts` ships 32 values of Table S15 of Stephenson, Morrison &
68
+ Hohenkerk 2016 (Proc. R. Soc. A 472: 20160404), rounded to 0.01 s, and
69
+ constants of its equations (4.1) and (5.1). The article and its electronic
70
+ supplement are CC BY 4.0, which permits redistribution with attribution;
71
+ `NOTICE` carries it. The 2020 addendum's revised table has no established
72
+ licence and is not shipped. From 1941 the table holds values derived from
73
+ USNO files (US Government works) and IERS Earth-orientation data, which IERS
74
+ distributes free of charge and asks users to cite. The derivation, every
75
+ source's digest and licence, and the measurements are in the Zodiacs site
76
+ repository, `docs/platform/evidence/deltat-2026-09-25/`. No Swiss Ephemeris
77
+ output was used to build the table; Swiss is used there only as a comparison
78
+ instrument, and only statistics are committed.
79
+
80
+ ## GeoNames and timezone data
81
+
82
+ The `./geo` entry point is code-only and bundles no place records. Compatible
83
+ indexes may be derived from GeoNames `cities15000`, `admin1CodesASCII`, and
84
+ `countryInfo`, which are CC BY 4.0. Downstream users who host or redistribute
85
+ that data are instructed to retain `NOTICE`.
86
+
87
+ Timezone conversion uses the host's `Intl`/ICU implementation. The package
88
+ does not redistribute tzdb, so historical timezone completeness is a runtime
89
+ property rather than a package-data guarantee.
90
+
91
+ ## The conformance suite
92
+
93
+ Everything under `conformance/` is dedicated to the public domain under CC0 1.0 (`conformance/LICENSE`). It is not part of the npm package: the package's `files` list leaves it out.
94
+
95
+ Swiss Ephemeris is used there only as an instrument:
96
+
97
+ - `conformance/adapters/pyswisseph.py` calls a separately installed pyswisseph;
98
+ - no Swiss Ephemeris code, data file or output is committed;
99
+ - its results are published as verdicts, returned flags and summary statistics.