ether-to-astro 1.0.2 → 1.2.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.
- package/.github/ISSUE_TEMPLATE/bug-report.yml +87 -0
- package/.github/ISSUE_TEMPLATE/capability-request.yml +117 -0
- package/.github/ISSUE_TEMPLATE/config.yml +5 -0
- package/.github/ISSUE_TEMPLATE/paper-cut.yml +59 -0
- package/.github/pull_request_template.md +1 -0
- package/.github/workflows/release.yml +2 -2
- package/.github/workflows/test.yml +2 -2
- package/AGENTS.md +46 -1
- package/DEVELOPER.md +78 -0
- package/README.md +128 -75
- package/SETUP.md +100 -41
- package/dist/astro-service.d.ts +51 -2
- package/dist/astro-service.js +660 -56
- package/dist/cli.js +31 -0
- package/dist/entrypoint.d.ts +13 -0
- package/dist/entrypoint.js +78 -0
- package/dist/ephemeris.d.ts +15 -0
- package/dist/ephemeris.js +33 -0
- package/dist/formatter.d.ts +5 -1
- package/dist/formatter.js +4 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +63 -114
- package/dist/loader.d.ts +1 -1
- package/dist/loader.js +61 -23
- package/dist/mcp-alias.d.ts +2 -0
- package/dist/mcp-alias.js +8 -0
- package/dist/time-utils.d.ts +8 -0
- package/dist/time-utils.js +16 -0
- package/dist/tool-registry.js +111 -5
- package/dist/tool-result.d.ts +8 -0
- package/dist/tool-result.js +39 -0
- package/dist/types.d.ts +79 -1
- package/docs/product/adrs/0001-mcp-vs-skill-boundary.md +96 -0
- package/docs/product/architecture-boundaries.md +223 -0
- package/docs/product/product-tenets.md +174 -0
- package/docs/releases/1.2.0-draft.md +48 -0
- package/package.json +7 -7
- package/skills/.curated/daily-brief/SKILL.md +75 -0
- package/skills/.curated/electional-overlay/SKILL.md +67 -0
- package/skills/.curated/weekly-overview/SKILL.md +73 -0
- package/skills/.system/write-skill/SKILL.md +90 -0
- package/src/astro-service.ts +861 -60
- package/src/cli.ts +84 -0
- package/src/entrypoint.ts +118 -0
- package/src/ephemeris.ts +44 -0
- package/src/formatter.ts +13 -1
- package/src/index.ts +77 -121
- package/src/loader.ts +69 -25
- package/src/mcp-alias.ts +10 -0
- package/src/time-utils.ts +18 -0
- package/src/tool-registry.ts +129 -9
- package/src/tool-result.ts +44 -0
- package/src/types.ts +91 -1
- package/tests/unit/astro-service.test.ts +751 -5
- package/tests/unit/cli-commands.test.ts +13 -0
- package/tests/unit/entrypoint.test.ts +67 -0
- package/tests/unit/error-mapping.test.ts +20 -0
- package/tests/unit/formatter.test.ts +6 -0
- package/tests/unit/tool-registry.test.ts +114 -2
- package/setup.sh +0 -21
package/README.md
CHANGED
|
@@ -12,26 +12,90 @@
|
|
|
12
12
|
|
|
13
13
|
Astrology tooling for agent workflows.
|
|
14
14
|
|
|
15
|
-
`ether-to-astro` is a local-first astrology toolkit with
|
|
15
|
+
`ether-to-astro` is a local-first astrology toolkit with a unified `e2a` binary for CLI and MCP usage, plus an `e2a-mcp` compatibility alias for existing MCP setups.
|
|
16
16
|
|
|
17
17
|
This started as a side project because my wife is the real user, and I wasn’t impressed with the tooling around her astrology fascination. I’ve worked on plenty of AI tools and have a pretty high bar for them. Most of what I found in this space felt flimsy, closed-off, or not designed for serious agent workflows.
|
|
18
18
|
|
|
19
|
-
So I built the version I wanted to exist: local-first, scriptable, tested, and structured to work well both from the command line and through MCP. I
|
|
19
|
+
So I built the version I wanted to exist: local-first, scriptable, tested, and structured to work well both from the command line and through MCP. I built it, she uses it daily, and that feedback loop has made the product better.
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
### MCP
|
|
24
|
+
|
|
25
|
+
Add this to your MCP client config:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"mcpServers": {
|
|
30
|
+
"astro": {
|
|
31
|
+
"command": "npx",
|
|
32
|
+
"args": ["--yes", "--package=ether-to-astro", "e2a", "--mcp"]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Then restart your MCP client and call `set_natal_chart`.
|
|
39
|
+
|
|
40
|
+
### CLI
|
|
41
|
+
|
|
42
|
+
Run the CLI directly with `npx`:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npx --yes --package=ether-to-astro e2a --help
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Or install globally:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm install -g ether-to-astro
|
|
52
|
+
e2a --help
|
|
53
|
+
e2a --mcp --help
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Product Setup
|
|
57
|
+
|
|
58
|
+
- End-user setup and examples: [SETUP.md](/Users/salted/Code/astro-mcp/SETUP.md)
|
|
59
|
+
- Local repo setup and contributor workflow: [DEVELOPER.md](/Users/salted/Code/astro-mcp/DEVELOPER.md)
|
|
60
|
+
|
|
61
|
+
### Agent Skills
|
|
62
|
+
|
|
63
|
+
This repo also includes repo-owned agent skills in a standard `skills/` layout.
|
|
64
|
+
|
|
65
|
+
If you use the [Vercel `skills` CLI](https://github.com/vercel-labs/skills), you can inspect or install them from a local checkout:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# List skills available in this repo
|
|
69
|
+
npx skills add . --list
|
|
70
|
+
|
|
71
|
+
# Install the repo's skills to Codex for this project
|
|
72
|
+
npx skills add . --agent codex --skill daily-brief --skill weekly-overview --skill electional-overlay
|
|
73
|
+
|
|
74
|
+
# Install the repo's write-skill helper to Codex for this project
|
|
75
|
+
npx skills add . --agent codex --skill write-skill
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
You can also install from GitHub instead of a local checkout:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npx skills add unsalted/ether-to-astro --agent codex --skill write-skill
|
|
82
|
+
```
|
|
20
83
|
|
|
21
84
|
## Features
|
|
22
85
|
|
|
23
|
-
|
|
86
|
+
You can ask your AI agent about:
|
|
24
87
|
|
|
25
88
|
### Transits
|
|
26
|
-
- **Daily mundane
|
|
89
|
+
- **Daily mundane positions** - Current planetary positions
|
|
27
90
|
- **Moon transits** - Fast-moving Moon aspects to natal planets
|
|
28
91
|
- **Personal planet transits** - Sun, Mercury, Venus, Mars aspects to natal chart
|
|
29
92
|
- **Outer planet transits** - Jupiter, Saturn, Uranus, Neptune, Pluto aspects
|
|
30
93
|
- **Exact transit times** - Precise timing when transits become exact (0° orb)
|
|
31
|
-
- **Upcoming
|
|
94
|
+
- **Upcoming transit preview** - Best upcoming hits across a requested date range
|
|
32
95
|
|
|
33
96
|
### Advanced Features
|
|
34
97
|
- **House cusps** - Ascendant, Midheaven, and all 12 houses (multiple systems)
|
|
98
|
+
- **Electional context** - Stateless ascendant, sect, Moon phase, and applying-aspect context for a specific date, time, and location
|
|
35
99
|
- **Retrograde status** - Which planets are currently retrograde
|
|
36
100
|
- **Rise/Set times** - Sunrise, sunset, moonrise, moonset
|
|
37
101
|
- **Asteroids & Nodes** - Chiron, Ceres, Pallas, Juno, Vesta, North Node
|
|
@@ -40,8 +104,29 @@ Your wife can ask her AI agent about:
|
|
|
40
104
|
|
|
41
105
|
## Installation
|
|
42
106
|
|
|
107
|
+
### From npm
|
|
108
|
+
|
|
109
|
+
For normal product usage, install from npm or use `npx`.
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
npx --yes --package=ether-to-astro e2a --help
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Or:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
npm install -g ether-to-astro
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
You do not need to run `npm run build` when installing from npm.
|
|
122
|
+
|
|
123
|
+
### From a local repo checkout
|
|
124
|
+
|
|
125
|
+
If you cloned this repository and want to run the local source checkout:
|
|
126
|
+
|
|
43
127
|
```bash
|
|
44
|
-
|
|
128
|
+
npm install
|
|
129
|
+
npm run build
|
|
45
130
|
```
|
|
46
131
|
|
|
47
132
|
### Ephemeris Data Configuration
|
|
@@ -68,81 +153,32 @@ EPHEMERIS_VERSION=moshier npm install
|
|
|
68
153
|
Or manually:
|
|
69
154
|
```bash
|
|
70
155
|
npm install
|
|
71
|
-
npm run build
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Engineering Contract
|
|
75
|
-
|
|
76
|
-
This repo uses a lightweight, agent-friendly operating contract:
|
|
77
|
-
|
|
78
|
-
- Keep changes focused and avoid unrelated churn in the same diff.
|
|
79
|
-
- Treat Biome as the source of truth for formatting, import order, and linting.
|
|
80
|
-
- Use conventional commit messages: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`, `build`, `ci`.
|
|
81
|
-
- Keep PR descriptions short and explicit about what changed and how it was verified.
|
|
82
|
-
|
|
83
|
-
Required routine quality gate:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
npm run quality:gate
|
|
87
156
|
```
|
|
88
157
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
- `npm run build`
|
|
92
|
-
- `npm run lint`
|
|
93
|
-
- `npm test -- --run`
|
|
94
|
-
|
|
95
|
-
Use `npm run validate:astro` for high-risk astrology engine work such as ephemeris/root-solver/transit-timing changes. It is intentionally not part of the default routine gate.
|
|
96
|
-
|
|
97
|
-
Commit examples:
|
|
158
|
+
## Package Names
|
|
98
159
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
docs(readme): document remote-ready repo contract
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Pull request checklist:
|
|
107
|
-
|
|
108
|
-
- Scope is focused and coherent.
|
|
109
|
-
- `npm run quality:gate` passed locally.
|
|
110
|
-
- Tests were added or updated when behavior changed.
|
|
111
|
-
- Docs were updated when workflow or interfaces changed.
|
|
112
|
-
- PR description includes:
|
|
113
|
-
- What changed
|
|
114
|
-
- How it was verified
|
|
160
|
+
- Package: `ether-to-astro`
|
|
161
|
+
- CLI command: `e2a`
|
|
162
|
+
- Canonical MCP command: `e2a --mcp`
|
|
163
|
+
- Compatibility MCP alias: `e2a-mcp`
|
|
115
164
|
|
|
116
|
-
##
|
|
165
|
+
## Runtime Surfaces
|
|
117
166
|
|
|
118
|
-
|
|
167
|
+
### MCP server (stateful per process)
|
|
119
168
|
|
|
120
|
-
|
|
169
|
+
Launch MCP mode with:
|
|
121
170
|
|
|
122
171
|
```bash
|
|
123
|
-
|
|
172
|
+
e2a --mcp --help
|
|
124
173
|
```
|
|
125
174
|
|
|
126
|
-
|
|
175
|
+
Optional deterministic startup defaults:
|
|
127
176
|
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
"mcpServers": {
|
|
131
|
-
"astro": {
|
|
132
|
-
"command": "e2a-mcp"
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
177
|
+
```bash
|
|
178
|
+
e2a --mcp --preferred-tz America/Los_Angeles --preferred-house-style W --weekday-labels
|
|
136
179
|
```
|
|
137
180
|
|
|
138
|
-
|
|
139
|
-
- Package: `ether-to-astro`
|
|
140
|
-
- CLI command: `e2a`
|
|
141
|
-
- MCP command: `e2a-mcp`
|
|
142
|
-
|
|
143
|
-
## Runtime Surfaces
|
|
144
|
-
|
|
145
|
-
### MCP server (stateful per process)
|
|
181
|
+
The `e2a-mcp` binary remains available as a compatibility alias and starts MCP mode automatically.
|
|
146
182
|
|
|
147
183
|
### In-Memory Storage
|
|
148
184
|
The MCP server uses **in-memory storage** for natal chart data:
|
|
@@ -158,17 +194,20 @@ This design is **MCP-compliant** for stdio transport and ensures complete isolat
|
|
|
158
194
|
|
|
159
195
|
`e2a` is JSON-first for agent usage and supports `--pretty` for human-readable output.
|
|
160
196
|
|
|
197
|
+
`npx` usage note: this package is named `ether-to-astro`, so invoke bins with `--package`.
|
|
198
|
+
`npx e2a` will not work by itself because npm resolves package names first.
|
|
199
|
+
|
|
161
200
|
Examples:
|
|
162
201
|
|
|
163
202
|
```bash
|
|
164
203
|
# Help
|
|
165
|
-
npx e2a --help
|
|
204
|
+
npx --yes --package=ether-to-astro e2a --help
|
|
166
205
|
|
|
167
206
|
# Set natal chart and print JSON
|
|
168
|
-
npx e2a set-natal-chart --name "Test" --year 1990 --month 1 --day 1 --hour 12 --minute 0 --latitude 40.7 --longitude -74.0 --timezone America/New_York
|
|
207
|
+
npx --yes --package=ether-to-astro e2a set-natal-chart --name "Test" --year 1990 --month 1 --day 1 --hour 12 --minute 0 --latitude 40.7 --longitude -74.0 --timezone America/New_York
|
|
169
208
|
|
|
170
209
|
# Human-readable transit output
|
|
171
|
-
npx e2a get-transits --natal-file ./natal.json --date 2026-03-27 --pretty
|
|
210
|
+
npx --yes --package=ether-to-astro e2a get-transits --natal-file ./natal.json --date 2026-03-27 --pretty
|
|
172
211
|
```
|
|
173
212
|
|
|
174
213
|
### CLI Profiles (`.astro.json`)
|
|
@@ -193,9 +232,9 @@ Profile name resolution order:
|
|
|
193
232
|
Read-only helper commands:
|
|
194
233
|
|
|
195
234
|
```bash
|
|
196
|
-
npx e2a profiles list
|
|
197
|
-
npx e2a profiles show --profile
|
|
198
|
-
npx e2a profiles validate
|
|
235
|
+
npx --yes --package=ether-to-astro e2a profiles list
|
|
236
|
+
npx --yes --package=ether-to-astro e2a profiles show --profile default
|
|
237
|
+
npx --yes --package=ether-to-astro e2a profiles validate
|
|
199
238
|
```
|
|
200
239
|
|
|
201
240
|
Recommended: add project-local `.astro.json` to `.gitignore` because it contains birth data.
|
|
@@ -249,7 +288,17 @@ Ask your AI agent:
|
|
|
249
288
|
- `set_natal_chart` - Store birth chart data
|
|
250
289
|
|
|
251
290
|
### Transits
|
|
252
|
-
- `get_transits` - Category-filtered transits with optional exact-time data
|
|
291
|
+
- `get_transits` - Category-filtered transits with optional exact-time data and explicit mode semantics:
|
|
292
|
+
- `snapshot`: single-day view for the selected date
|
|
293
|
+
- `best_hit`: compressed multi-day preview across the selected date window
|
|
294
|
+
- `forecast`: day-grouped transit output across the selected date window
|
|
295
|
+
- if `mode` is omitted, legacy behavior is preserved: `days_ahead=0` resolves to `snapshot`, and `days_ahead>0` resolves to `best_hit`
|
|
296
|
+
- each transit now includes additive placement metadata for both sides: sign, degree, and house
|
|
297
|
+
|
|
298
|
+
In this release, `include_mundane` remains anchored to the forecast start date even when `mode=forecast`. Range-aware mundane output is tracked separately.
|
|
299
|
+
|
|
300
|
+
### Electional
|
|
301
|
+
- `get_electional_context` - Stateless electional context for a local date, time, and location. Returns deterministic ascendant, sect/day-night classification, Moon phase, applying aspects, and optional ASC-ruler basics without requiring a natal chart.
|
|
253
302
|
|
|
254
303
|
### Advanced Tools
|
|
255
304
|
- `get_houses` - House cusps, Ascendant, Midheaven (Placidus, Koch, Whole Sign, Equal)
|
|
@@ -292,6 +341,10 @@ Ask your AI agent:
|
|
|
292
341
|
- **Exact time calculation**: Uses binary search interpolation for precision
|
|
293
342
|
- **Advance warnings**: Shows transits within 2° orb
|
|
294
343
|
|
|
344
|
+
## Development
|
|
345
|
+
|
|
346
|
+
Contributor workflow, local repo setup, quality gates, and release-oriented notes live in [DEVELOPER.md](/Users/salted/Code/astro-mcp/DEVELOPER.md).
|
|
347
|
+
|
|
295
348
|
## License
|
|
296
349
|
|
|
297
350
|
AGPL-3.0-or-later
|
package/SETUP.md
CHANGED
|
@@ -1,70 +1,129 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Setup Guide
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This guide is for using `ether-to-astro` as a product, not for local development on the repo itself.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
For contributor setup, local builds, tests, and release workflow, see [DEVELOPER.md](/Users/salted/Code/astro-mcp/DEVELOPER.md).
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
1. Install npm dependencies (including WebAssembly Swiss Ephemeris)
|
|
11
|
-
2. Build TypeScript to JavaScript
|
|
9
|
+
### Use as an MCP server
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
Add this to your MCP client config:
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"mcpServers": {
|
|
16
|
+
"astro": {
|
|
17
|
+
"command": "npx",
|
|
18
|
+
"args": ["--yes", "--package=ether-to-astro", "e2a", "--mcp"]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
```
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
Alternative after global install:
|
|
20
25
|
|
|
21
26
|
```json
|
|
22
27
|
{
|
|
23
28
|
"mcpServers": {
|
|
24
29
|
"astro": {
|
|
25
|
-
"command": "
|
|
26
|
-
"args": ["
|
|
30
|
+
"command": "e2a",
|
|
31
|
+
"args": ["--mcp"]
|
|
27
32
|
}
|
|
28
33
|
}
|
|
29
34
|
}
|
|
30
35
|
```
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
Then restart your MCP client and call `set_natal_chart` before requesting transits or charts.
|
|
33
38
|
|
|
34
|
-
|
|
39
|
+
### Use as a CLI
|
|
35
40
|
|
|
36
|
-
|
|
37
|
-
2. Set your wife's natal chart:
|
|
41
|
+
Run directly with `npx`:
|
|
38
42
|
|
|
43
|
+
```bash
|
|
44
|
+
npx --yes --package=ether-to-astro e2a --help
|
|
39
45
|
```
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
|
|
47
|
+
Or install globally:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm install -g ether-to-astro
|
|
51
|
+
e2a --help
|
|
52
|
+
e2a --mcp --help
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Notes
|
|
56
|
+
|
|
57
|
+
- You do not need to run `npm run build` when installing from npm.
|
|
58
|
+
- `npx e2a` does not work by itself because npm resolves package names first. Use `npx --package=ether-to-astro e2a`.
|
|
59
|
+
- The package downloads Swiss Ephemeris data during install unless you choose `EPHEMERIS_VERSION=moshier`.
|
|
60
|
+
|
|
61
|
+
## Ephemeris Data Options
|
|
62
|
+
|
|
63
|
+
The package downloads Swiss Ephemeris data files during installation. You can control which version with `EPHEMERIS_VERSION`.
|
|
64
|
+
|
|
65
|
+
- `long` (default): 6000 years, recommended for professional use
|
|
66
|
+
- `short`: 600 years, smaller download for modern charts
|
|
67
|
+
- `moshier`: no ephemeris download, lower precision fallback
|
|
68
|
+
|
|
69
|
+
Examples:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npm install -g ether-to-astro
|
|
73
|
+
EPHEMERIS_VERSION=short npm install -g ether-to-astro
|
|
74
|
+
EPHEMERIS_VERSION=moshier npm install -g ether-to-astro
|
|
45
75
|
```
|
|
46
76
|
|
|
47
|
-
|
|
77
|
+
## First Use
|
|
78
|
+
|
|
79
|
+
Typical flow:
|
|
48
80
|
|
|
81
|
+
1. Start the MCP server or use the CLI.
|
|
82
|
+
2. Set the natal chart.
|
|
83
|
+
3. Request transits, houses, or chart rendering.
|
|
84
|
+
|
|
85
|
+
Example CLI call:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
npx --yes --package=ether-to-astro e2a set-natal-chart \
|
|
89
|
+
--name "Test" \
|
|
90
|
+
--year 1990 \
|
|
91
|
+
--month 1 \
|
|
92
|
+
--day 1 \
|
|
93
|
+
--hour 12 \
|
|
94
|
+
--minute 0 \
|
|
95
|
+
--latitude 40.7 \
|
|
96
|
+
--longitude -74.0 \
|
|
97
|
+
--timezone America/New_York
|
|
49
98
|
```
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
99
|
+
|
|
100
|
+
Then:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
npx --yes --package=ether-to-astro e2a get-transits --natal-file ./natal.json --date 2026-03-27 --pretty
|
|
53
104
|
```
|
|
54
105
|
|
|
55
|
-
##
|
|
106
|
+
## Product Surfaces
|
|
107
|
+
|
|
108
|
+
- `e2a --mcp`: canonical stateful MCP server launch
|
|
109
|
+
- `e2a-mcp`: compatibility alias for MCP launch
|
|
110
|
+
- `e2a`: stateless CLI
|
|
56
111
|
|
|
57
|
-
|
|
58
|
-
- `get_daily_transits` - Current planetary positions
|
|
59
|
-
- `get_moon_transits` - Moon aspects to natal planets
|
|
60
|
-
- `get_personal_planet_transits` - Sun/Mercury/Venus/Mars aspects
|
|
61
|
-
- `get_outer_planet_transits` - Jupiter/Saturn/Uranus/Neptune/Pluto aspects
|
|
62
|
-
- `get_exact_transit_times` - Calculate exact times for current transits
|
|
63
|
-
- `get_upcoming_transits` - Multi-day forecast (default 7 days)
|
|
112
|
+
Optional MCP startup defaults:
|
|
64
113
|
|
|
65
|
-
|
|
114
|
+
```bash
|
|
115
|
+
e2a --mcp --preferred-tz America/Los_Angeles --preferred-house-style W --weekday-labels
|
|
116
|
+
```
|
|
66
117
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
118
|
+
## Available Tools
|
|
119
|
+
|
|
120
|
+
- `set_natal_chart`
|
|
121
|
+
- `get_transits`
|
|
122
|
+
- `get_houses`
|
|
123
|
+
- `get_retrograde_planets`
|
|
124
|
+
- `get_rise_set_times`
|
|
125
|
+
- `get_asteroid_positions`
|
|
126
|
+
- `get_next_eclipses`
|
|
127
|
+
- `generate_natal_chart`
|
|
128
|
+
- `generate_transit_chart`
|
|
129
|
+
- `get_server_status`
|
package/dist/astro-service.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ChartRenderer } from './charts.js';
|
|
2
2
|
import { EclipseCalculator } from './eclipses.js';
|
|
3
|
+
import type { McpStartupDefaults } from './entrypoint.js';
|
|
3
4
|
import { EphemerisCalculator } from './ephemeris.js';
|
|
4
5
|
import { HouseCalculator } from './houses.js';
|
|
5
6
|
import { RiseSetCalculator } from './riseset.js';
|
|
6
7
|
import { type Disambiguation } from './time-utils.js';
|
|
7
8
|
import { TransitCalculator } from './transits.js';
|
|
8
|
-
import { type HouseSystem, type NatalChart } from './types.js';
|
|
9
|
+
import { type AspectType, type ElectionalHouseSystem, type HouseSystem, type NatalChart, type PlanetPosition } from './types.js';
|
|
9
10
|
interface AstroServiceDependencies {
|
|
10
11
|
ephem?: EphemerisCalculator;
|
|
11
12
|
transitCalc?: TransitCalculator;
|
|
@@ -13,6 +14,7 @@ interface AstroServiceDependencies {
|
|
|
13
14
|
riseSetCalc?: RiseSetCalculator;
|
|
14
15
|
eclipseCalc?: EclipseCalculator;
|
|
15
16
|
chartRenderer?: ChartRenderer;
|
|
17
|
+
mcpStartupDefaults?: McpStartupDefaults;
|
|
16
18
|
now?: () => Date;
|
|
17
19
|
writeFile?: (path: string, data: string | Buffer, encoding?: BufferEncoding) => Promise<void>;
|
|
18
20
|
}
|
|
@@ -34,13 +36,32 @@ export interface GetTransitsInput {
|
|
|
34
36
|
categories?: string[];
|
|
35
37
|
include_mundane?: boolean;
|
|
36
38
|
days_ahead?: number;
|
|
39
|
+
mode?: 'snapshot' | 'best_hit' | 'forecast';
|
|
37
40
|
max_orb?: number;
|
|
38
41
|
exact_only?: boolean;
|
|
39
42
|
applying_only?: boolean;
|
|
40
43
|
}
|
|
44
|
+
export interface GetElectionalContextInput {
|
|
45
|
+
date: string;
|
|
46
|
+
time: string;
|
|
47
|
+
timezone: string;
|
|
48
|
+
latitude: number;
|
|
49
|
+
longitude: number;
|
|
50
|
+
house_system?: ElectionalHouseSystem;
|
|
51
|
+
include_ruler_basics?: boolean;
|
|
52
|
+
include_planetary_applications?: boolean;
|
|
53
|
+
orb_degrees?: number;
|
|
54
|
+
}
|
|
41
55
|
export interface GetHousesInput {
|
|
42
56
|
system?: string;
|
|
43
57
|
}
|
|
58
|
+
export interface GetRisingSignWindowsInput {
|
|
59
|
+
date: string;
|
|
60
|
+
latitude: number;
|
|
61
|
+
longitude: number;
|
|
62
|
+
timezone: string;
|
|
63
|
+
mode?: 'approximate' | 'exact';
|
|
64
|
+
}
|
|
44
65
|
export interface GenerateChartInput {
|
|
45
66
|
theme?: 'light' | 'dark';
|
|
46
67
|
format?: 'svg' | 'png' | 'webp';
|
|
@@ -53,7 +74,17 @@ export interface ServiceResult<T> {
|
|
|
53
74
|
data: T;
|
|
54
75
|
text: string;
|
|
55
76
|
}
|
|
56
|
-
export interface
|
|
77
|
+
export interface MundaneAspect {
|
|
78
|
+
id: string;
|
|
79
|
+
planetA: PlanetPosition['planet'];
|
|
80
|
+
planetB: PlanetPosition['planet'];
|
|
81
|
+
aspect: AspectType;
|
|
82
|
+
orb: number;
|
|
83
|
+
isApplying: boolean;
|
|
84
|
+
longitudeA: number;
|
|
85
|
+
longitudeB: number;
|
|
86
|
+
}
|
|
87
|
+
interface ChartServiceResult {
|
|
57
88
|
format: 'svg' | 'png' | 'webp';
|
|
58
89
|
outputPath?: string;
|
|
59
90
|
text: string;
|
|
@@ -77,16 +108,34 @@ export declare class AstroService {
|
|
|
77
108
|
readonly riseSetCalc: RiseSetCalculator;
|
|
78
109
|
readonly eclipseCalc: EclipseCalculator;
|
|
79
110
|
readonly chartRenderer: ChartRenderer;
|
|
111
|
+
readonly mcpStartupDefaults: Readonly<McpStartupDefaults>;
|
|
80
112
|
private readonly now;
|
|
81
113
|
private readonly writeFileFn;
|
|
82
114
|
constructor(deps?: AstroServiceDependencies);
|
|
115
|
+
private formatTimestamp;
|
|
116
|
+
private normalizeLongitude;
|
|
117
|
+
private getSignAndDegree;
|
|
118
|
+
private getHouseNumber;
|
|
119
|
+
private resolveHouseSystem;
|
|
120
|
+
private resolveTimezones;
|
|
121
|
+
resolveReportingTimezone(explicitTimezone?: string, natalTimezone?: string): string;
|
|
83
122
|
init(): Promise<void>;
|
|
84
123
|
isInitialized(): boolean;
|
|
85
124
|
setNatalChart(input: SetNatalChartInput): ServiceResult<Record<string, unknown>> & {
|
|
86
125
|
chart: NatalChart;
|
|
87
126
|
};
|
|
88
127
|
getTransits(natalChart: NatalChart, input?: GetTransitsInput): ServiceResult<Record<string, unknown>>;
|
|
128
|
+
private getMundaneWeather;
|
|
129
|
+
private getMundaneAspects;
|
|
130
|
+
private getMundaneDay;
|
|
131
|
+
getElectionalContext(input: GetElectionalContextInput): ServiceResult<Record<string, unknown>>;
|
|
89
132
|
getHouses(natalChart: NatalChart, input?: GetHousesInput): ServiceResult<Record<string, unknown>>;
|
|
133
|
+
getRisingSignWindows(input: GetRisingSignWindowsInput): ServiceResult<Record<string, unknown>>;
|
|
134
|
+
private getElectionalApplyingAspects;
|
|
135
|
+
private isElectionalAspectApplying;
|
|
136
|
+
private getSignedAngularDifference;
|
|
137
|
+
private getElectionalPhaseName;
|
|
138
|
+
private getTraditionalSignRuler;
|
|
90
139
|
getRetrogradePlanets(timezone?: string): ServiceResult<Record<string, unknown>>;
|
|
91
140
|
getRiseSetTimes(natalChart: NatalChart): Promise<ServiceResult<Record<string, unknown>>>;
|
|
92
141
|
getAsteroidPositions(timezone?: string): ServiceResult<Record<string, unknown>>;
|