mingpan 0.1.1
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/LICENSE +201 -0
- package/README.md +118 -0
- package/dist/core/bazi/BaziCore.d.ts +112 -0
- package/dist/core/bazi/BaziCore.d.ts.map +1 -0
- package/dist/core/bazi/BaziCore.js +606 -0
- package/dist/core/bazi/BaziCore.js.map +1 -0
- package/dist/core/bazi/SolarTermCalculator.d.ts +46 -0
- package/dist/core/bazi/SolarTermCalculator.d.ts.map +1 -0
- package/dist/core/bazi/SolarTermCalculator.js +452 -0
- package/dist/core/bazi/SolarTermCalculator.js.map +1 -0
- package/dist/core/bazi/TrueSolarTime.d.ts +64 -0
- package/dist/core/bazi/TrueSolarTime.d.ts.map +1 -0
- package/dist/core/bazi/TrueSolarTime.js +210 -0
- package/dist/core/bazi/TrueSolarTime.js.map +1 -0
- package/dist/core/bazi/ephemerisData.d.ts +10 -0
- package/dist/core/bazi/ephemerisData.d.ts.map +1 -0
- package/dist/core/bazi/ephemerisData.js +88 -0
- package/dist/core/bazi/ephemerisData.js.map +1 -0
- package/dist/core/bazi/index.d.ts +8 -0
- package/dist/core/bazi/index.d.ts.map +1 -0
- package/dist/core/bazi/index.js +30 -0
- package/dist/core/bazi/index.js.map +1 -0
- package/dist/core/bazi/types.d.ts +116 -0
- package/dist/core/bazi/types.d.ts.map +1 -0
- package/dist/core/bazi/types.js +7 -0
- package/dist/core/bazi/types.js.map +1 -0
- package/dist/core/calendar/SolarTermsCalculator.d.ts +33 -0
- package/dist/core/calendar/SolarTermsCalculator.d.ts.map +1 -0
- package/dist/core/calendar/SolarTermsCalculator.js +111 -0
- package/dist/core/calendar/SolarTermsCalculator.js.map +1 -0
- package/dist/core/calendar/astronomicalCalendar.d.ts +74 -0
- package/dist/core/calendar/astronomicalCalendar.d.ts.map +1 -0
- package/dist/core/calendar/astronomicalCalendar.js +276 -0
- package/dist/core/calendar/astronomicalCalendar.js.map +1 -0
- package/dist/core/calendar/calendar.d.ts +81 -0
- package/dist/core/calendar/calendar.d.ts.map +1 -0
- package/dist/core/calendar/calendar.js +223 -0
- package/dist/core/calendar/calendar.js.map +1 -0
- package/dist/core/calendar/constants.d.ts +151 -0
- package/dist/core/calendar/constants.d.ts.map +1 -0
- package/dist/core/calendar/constants.js +97 -0
- package/dist/core/calendar/constants.js.map +1 -0
- package/dist/core/calendar/julian.d.ts +54 -0
- package/dist/core/calendar/julian.d.ts.map +1 -0
- package/dist/core/calendar/julian.js +142 -0
- package/dist/core/calendar/julian.js.map +1 -0
- package/dist/core/calendar/lunarCalendar.d.ts +79 -0
- package/dist/core/calendar/lunarCalendar.d.ts.map +1 -0
- package/dist/core/calendar/lunarCalendar.js +164 -0
- package/dist/core/calendar/lunarCalendar.js.map +1 -0
- package/dist/core/calendar/solarTerms.d.ts +105 -0
- package/dist/core/calendar/solarTerms.d.ts.map +1 -0
- package/dist/core/calendar/solarTerms.js +487 -0
- package/dist/core/calendar/solarTerms.js.map +1 -0
- package/dist/core/constants/bazi.d.ts +138 -0
- package/dist/core/constants/bazi.d.ts.map +1 -0
- package/dist/core/constants/bazi.js +332 -0
- package/dist/core/constants/bazi.js.map +1 -0
- package/dist/core/constants/index.d.ts +6 -0
- package/dist/core/constants/index.d.ts.map +1 -0
- package/dist/core/constants/index.js +37 -0
- package/dist/core/constants/index.js.map +1 -0
- package/dist/core/constants/positions.d.ts +27 -0
- package/dist/core/constants/positions.d.ts.map +1 -0
- package/dist/core/constants/positions.js +39 -0
- package/dist/core/constants/positions.js.map +1 -0
- package/dist/core/ziwei/BrightnessSystem.d.ts +53 -0
- package/dist/core/ziwei/BrightnessSystem.d.ts.map +1 -0
- package/dist/core/ziwei/BrightnessSystem.js +278 -0
- package/dist/core/ziwei/BrightnessSystem.js.map +1 -0
- package/dist/core/ziwei/IztroAdapter.d.ts +78 -0
- package/dist/core/ziwei/IztroAdapter.d.ts.map +1 -0
- package/dist/core/ziwei/IztroAdapter.js +314 -0
- package/dist/core/ziwei/IztroAdapter.js.map +1 -0
- package/dist/core/ziwei/MutagenCore.d.ts +81 -0
- package/dist/core/ziwei/MutagenCore.d.ts.map +1 -0
- package/dist/core/ziwei/MutagenCore.js +246 -0
- package/dist/core/ziwei/MutagenCore.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1101 -0
- package/dist/index.js.map +1 -0
- package/dist/output/fortuneTextRenderer.d.ts +63 -0
- package/dist/output/fortuneTextRenderer.d.ts.map +1 -0
- package/dist/output/fortuneTextRenderer.js +384 -0
- package/dist/output/fortuneTextRenderer.js.map +1 -0
- package/dist/output/listTextRenderer.d.ts +298 -0
- package/dist/output/listTextRenderer.d.ts.map +1 -0
- package/dist/output/listTextRenderer.js +942 -0
- package/dist/output/listTextRenderer.js.map +1 -0
- package/dist/services/bazi/BaziService.d.ts +83 -0
- package/dist/services/bazi/BaziService.d.ts.map +1 -0
- package/dist/services/bazi/BaziService.js +635 -0
- package/dist/services/bazi/BaziService.js.map +1 -0
- package/dist/services/bazi/analyzers/ClimateAnalyzer.d.ts +31 -0
- package/dist/services/bazi/analyzers/ClimateAnalyzer.d.ts.map +1 -0
- package/dist/services/bazi/analyzers/ClimateAnalyzer.js +194 -0
- package/dist/services/bazi/analyzers/ClimateAnalyzer.js.map +1 -0
- package/dist/services/bazi/analyzers/HiddenStemsAnalyzer.d.ts +16 -0
- package/dist/services/bazi/analyzers/HiddenStemsAnalyzer.d.ts.map +1 -0
- package/dist/services/bazi/analyzers/HiddenStemsAnalyzer.js +60 -0
- package/dist/services/bazi/analyzers/HiddenStemsAnalyzer.js.map +1 -0
- package/dist/services/bazi/analyzers/NaYinAnalyzer.d.ts +33 -0
- package/dist/services/bazi/analyzers/NaYinAnalyzer.d.ts.map +1 -0
- package/dist/services/bazi/analyzers/NaYinAnalyzer.js +209 -0
- package/dist/services/bazi/analyzers/NaYinAnalyzer.js.map +1 -0
- package/dist/services/bazi/analyzers/PatternAnalyzer.d.ts +159 -0
- package/dist/services/bazi/analyzers/PatternAnalyzer.d.ts.map +1 -0
- package/dist/services/bazi/analyzers/PatternAnalyzer.js +1150 -0
- package/dist/services/bazi/analyzers/PatternAnalyzer.js.map +1 -0
- package/dist/services/bazi/analyzers/RelationsAnalyzer.d.ts +114 -0
- package/dist/services/bazi/analyzers/RelationsAnalyzer.d.ts.map +1 -0
- package/dist/services/bazi/analyzers/RelationsAnalyzer.js +704 -0
- package/dist/services/bazi/analyzers/RelationsAnalyzer.js.map +1 -0
- package/dist/services/bazi/analyzers/ShenShaAnalyzer.d.ts +236 -0
- package/dist/services/bazi/analyzers/ShenShaAnalyzer.d.ts.map +1 -0
- package/dist/services/bazi/analyzers/ShenShaAnalyzer.js +2079 -0
- package/dist/services/bazi/analyzers/ShenShaAnalyzer.js.map +1 -0
- package/dist/services/bazi/analyzers/StrengthAnalyzer.d.ts +181 -0
- package/dist/services/bazi/analyzers/StrengthAnalyzer.d.ts.map +1 -0
- package/dist/services/bazi/analyzers/StrengthAnalyzer.js +1119 -0
- package/dist/services/bazi/analyzers/StrengthAnalyzer.js.map +1 -0
- package/dist/services/bazi/analyzers/TenGodsAnalyzer.d.ts +78 -0
- package/dist/services/bazi/analyzers/TenGodsAnalyzer.d.ts.map +1 -0
- package/dist/services/bazi/analyzers/TenGodsAnalyzer.js +383 -0
- package/dist/services/bazi/analyzers/TenGodsAnalyzer.js.map +1 -0
- package/dist/services/bazi/analyzers/TraditionalAnalyzer.d.ts +46 -0
- package/dist/services/bazi/analyzers/TraditionalAnalyzer.d.ts.map +1 -0
- package/dist/services/bazi/analyzers/TraditionalAnalyzer.js +260 -0
- package/dist/services/bazi/analyzers/TraditionalAnalyzer.js.map +1 -0
- package/dist/services/bazi/analyzers/YongShenAnalyzer.d.ts +70 -0
- package/dist/services/bazi/analyzers/YongShenAnalyzer.d.ts.map +1 -0
- package/dist/services/bazi/analyzers/YongShenAnalyzer.js +858 -0
- package/dist/services/bazi/analyzers/YongShenAnalyzer.js.map +1 -0
- package/dist/services/bazi/calculators/DaYunCalculator.d.ts +71 -0
- package/dist/services/bazi/calculators/DaYunCalculator.d.ts.map +1 -0
- package/dist/services/bazi/calculators/DaYunCalculator.js +496 -0
- package/dist/services/bazi/calculators/DaYunCalculator.js.map +1 -0
- package/dist/services/bazi/calculators/LiuNianCalculator.d.ts +88 -0
- package/dist/services/bazi/calculators/LiuNianCalculator.d.ts.map +1 -0
- package/dist/services/bazi/calculators/LiuNianCalculator.js +546 -0
- package/dist/services/bazi/calculators/LiuNianCalculator.js.map +1 -0
- package/dist/services/bazi/calculators/LiuRiCalculator.d.ts +66 -0
- package/dist/services/bazi/calculators/LiuRiCalculator.d.ts.map +1 -0
- package/dist/services/bazi/calculators/LiuRiCalculator.js +497 -0
- package/dist/services/bazi/calculators/LiuRiCalculator.js.map +1 -0
- package/dist/services/bazi/calculators/LiuYueCalculator.d.ts +50 -0
- package/dist/services/bazi/calculators/LiuYueCalculator.d.ts.map +1 -0
- package/dist/services/bazi/calculators/LiuYueCalculator.js +338 -0
- package/dist/services/bazi/calculators/LiuYueCalculator.js.map +1 -0
- package/dist/services/bazi/calculators/LuckCycleCalculator.d.ts +123 -0
- package/dist/services/bazi/calculators/LuckCycleCalculator.d.ts.map +1 -0
- package/dist/services/bazi/calculators/LuckCycleCalculator.js +414 -0
- package/dist/services/bazi/calculators/LuckCycleCalculator.js.map +1 -0
- package/dist/services/bazi/index.d.ts +21 -0
- package/dist/services/bazi/index.d.ts.map +1 -0
- package/dist/services/bazi/index.js +83 -0
- package/dist/services/bazi/index.js.map +1 -0
- package/dist/services/bazi/types.d.ts +597 -0
- package/dist/services/bazi/types.d.ts.map +1 -0
- package/dist/services/bazi/types.js +123 -0
- package/dist/services/bazi/types.js.map +1 -0
- package/dist/services/ziwei/ZiweiService.d.ts +86 -0
- package/dist/services/ziwei/ZiweiService.d.ts.map +1 -0
- package/dist/services/ziwei/ZiweiService.js +343 -0
- package/dist/services/ziwei/ZiweiService.js.map +1 -0
- package/dist/services/ziwei/calculators/BrightnessCalculator.d.ts +38 -0
- package/dist/services/ziwei/calculators/BrightnessCalculator.d.ts.map +1 -0
- package/dist/services/ziwei/calculators/BrightnessCalculator.js +142 -0
- package/dist/services/ziwei/calculators/BrightnessCalculator.js.map +1 -0
- package/dist/services/ziwei/calculators/DailyCalculator.d.ts +27 -0
- package/dist/services/ziwei/calculators/DailyCalculator.d.ts.map +1 -0
- package/dist/services/ziwei/calculators/DailyCalculator.js +55 -0
- package/dist/services/ziwei/calculators/DailyCalculator.js.map +1 -0
- package/dist/services/ziwei/calculators/DecadeCalculator.d.ts +46 -0
- package/dist/services/ziwei/calculators/DecadeCalculator.d.ts.map +1 -0
- package/dist/services/ziwei/calculators/DecadeCalculator.js +181 -0
- package/dist/services/ziwei/calculators/DecadeCalculator.js.map +1 -0
- package/dist/services/ziwei/calculators/HoroscopeStarsCalculator.d.ts +28 -0
- package/dist/services/ziwei/calculators/HoroscopeStarsCalculator.d.ts.map +1 -0
- package/dist/services/ziwei/calculators/HoroscopeStarsCalculator.js +84 -0
- package/dist/services/ziwei/calculators/HoroscopeStarsCalculator.js.map +1 -0
- package/dist/services/ziwei/calculators/HourlyCalculator.d.ts +41 -0
- package/dist/services/ziwei/calculators/HourlyCalculator.d.ts.map +1 -0
- package/dist/services/ziwei/calculators/HourlyCalculator.js +139 -0
- package/dist/services/ziwei/calculators/HourlyCalculator.js.map +1 -0
- package/dist/services/ziwei/calculators/MinorLimitCalculator.d.ts +30 -0
- package/dist/services/ziwei/calculators/MinorLimitCalculator.d.ts.map +1 -0
- package/dist/services/ziwei/calculators/MinorLimitCalculator.js +90 -0
- package/dist/services/ziwei/calculators/MinorLimitCalculator.js.map +1 -0
- package/dist/services/ziwei/calculators/MonthlyCalculator.d.ts +39 -0
- package/dist/services/ziwei/calculators/MonthlyCalculator.d.ts.map +1 -0
- package/dist/services/ziwei/calculators/MonthlyCalculator.js +128 -0
- package/dist/services/ziwei/calculators/MonthlyCalculator.js.map +1 -0
- package/dist/services/ziwei/calculators/MutagenCalculator.d.ts +20 -0
- package/dist/services/ziwei/calculators/MutagenCalculator.d.ts.map +1 -0
- package/dist/services/ziwei/calculators/MutagenCalculator.js +121 -0
- package/dist/services/ziwei/calculators/MutagenCalculator.js.map +1 -0
- package/dist/services/ziwei/calculators/PalaceDynamicCalculator.d.ts +35 -0
- package/dist/services/ziwei/calculators/PalaceDynamicCalculator.d.ts.map +1 -0
- package/dist/services/ziwei/calculators/PalaceDynamicCalculator.js +55 -0
- package/dist/services/ziwei/calculators/PalaceDynamicCalculator.js.map +1 -0
- package/dist/services/ziwei/calculators/YearlyCalculator.d.ts +35 -0
- package/dist/services/ziwei/calculators/YearlyCalculator.d.ts.map +1 -0
- package/dist/services/ziwei/calculators/YearlyCalculator.js +119 -0
- package/dist/services/ziwei/calculators/YearlyCalculator.js.map +1 -0
- package/dist/services/ziwei/index.d.ts +15 -0
- package/dist/services/ziwei/index.d.ts.map +1 -0
- package/dist/services/ziwei/index.js +48 -0
- package/dist/services/ziwei/index.js.map +1 -0
- package/dist/services/ziwei/transformers/PalaceTransformer.d.ts +62 -0
- package/dist/services/ziwei/transformers/PalaceTransformer.d.ts.map +1 -0
- package/dist/services/ziwei/transformers/PalaceTransformer.js +153 -0
- package/dist/services/ziwei/transformers/PalaceTransformer.js.map +1 -0
- package/dist/services/ziwei/types.d.ts +185 -0
- package/dist/services/ziwei/types.d.ts.map +1 -0
- package/dist/services/ziwei/types.js +54 -0
- package/dist/services/ziwei/types.js.map +1 -0
- package/dist/shared/logger.d.ts +51 -0
- package/dist/shared/logger.d.ts.map +1 -0
- package/dist/shared/logger.js +136 -0
- package/dist/shared/logger.js.map +1 -0
- package/dist/shared/types.d.ts +91 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +7 -0
- package/dist/shared/types.js.map +1 -0
- package/dist/utils/ageCalculator.d.ts +30 -0
- package/dist/utils/ageCalculator.d.ts.map +1 -0
- package/dist/utils/ageCalculator.js +51 -0
- package/dist/utils/ageCalculator.js.map +1 -0
- package/package.json +54 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# 命盘 MCP Server
|
|
2
|
+
|
|
3
|
+
[](https://github.com/ChesterRa/mingpan)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
6
|
+
**命盘(Mingpan)** 是一个中华传统命理计算 MCP 服务,为 Claude 等 AI 应用提供八字与紫微斗数的排盘计算能力。
|
|
7
|
+
|
|
8
|
+
## 特性
|
|
9
|
+
|
|
10
|
+
- **MCP 原生**:无缝集成 Claude Desktop 及 Claude Code
|
|
11
|
+
- 🌏 **繁体中文输出**:符合命理传统的专业术语
|
|
12
|
+
- 📊 **结构化文本**:便于 AI 理解与分析的格式
|
|
13
|
+
|
|
14
|
+
## 配置方法
|
|
15
|
+
|
|
16
|
+
### Claude Desktop
|
|
17
|
+
|
|
18
|
+
找到配置文件并添加以下内容:
|
|
19
|
+
|
|
20
|
+
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
21
|
+
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
22
|
+
- **Linux**: `~/.config/Claude/claude_desktop_config.json`
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"mcpServers": {
|
|
27
|
+
"mingpan": {
|
|
28
|
+
"command": "npx",
|
|
29
|
+
"args": ["-y", "mingpan"]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Claude Code
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
claude mcp add mingpan -- npx -y mingpan
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 验证
|
|
42
|
+
|
|
43
|
+
配置完成后重启客户端,然后尝试:
|
|
44
|
+
|
|
45
|
+
> 请帮我排一个八字命盘,1992年4月12日7点30分,男性
|
|
46
|
+
|
|
47
|
+
## 工具列表
|
|
48
|
+
|
|
49
|
+
### 八字命理
|
|
50
|
+
|
|
51
|
+
| 工具 | 说明 |
|
|
52
|
+
|------|------|
|
|
53
|
+
| `bazi_basic` | 八字命盘排盘(四柱、藏干、十神、五行力量) |
|
|
54
|
+
| `bazi_dayun` | 大运列表(十年一运) |
|
|
55
|
+
| `bazi_liunian` | 流年列表(指定年份范围) |
|
|
56
|
+
| `bazi_liuyue` | 流月列表(节气月,立春起算) |
|
|
57
|
+
| `bazi_liuri` | 流日列表(指定月份内每日) |
|
|
58
|
+
|
|
59
|
+
### 紫微斗数
|
|
60
|
+
|
|
61
|
+
| 工具 | 说明 |
|
|
62
|
+
|------|------|
|
|
63
|
+
| `ziwei_basic` | 紫微命盘排盘(十二宫、主星、辅星、四化) |
|
|
64
|
+
| `ziwei_daxian` | 大限列表(十年一限) |
|
|
65
|
+
| `ziwei_xiaoxian` | 小限列表(每年一宫) |
|
|
66
|
+
| `ziwei_liunian` | 流年列表(指定年份范围) |
|
|
67
|
+
| `ziwei_liuyue` | 流月列表(农历月) |
|
|
68
|
+
| `ziwei_liuri` | 流日列表(农历日) |
|
|
69
|
+
|
|
70
|
+
## 输入参数
|
|
71
|
+
|
|
72
|
+
所有工具的基础输入:
|
|
73
|
+
|
|
74
|
+
| 参数 | 类型 | 必填 | 说明 |
|
|
75
|
+
|------|------|------|------|
|
|
76
|
+
| year | number | ✓ | 出生年份(1900-2100) |
|
|
77
|
+
| month | number | ✓ | 出生月份(1-12) |
|
|
78
|
+
| day | number | ✓ | 出生日期(1-31) |
|
|
79
|
+
| hour | number | ✓ | 出生时辰(0-23) |
|
|
80
|
+
| minute | number | | 出生分钟(0-59),默认 0 |
|
|
81
|
+
| gender | string | ✓ | `male` / `female` |
|
|
82
|
+
| longitude | number | | 出生地经度,用于真太阳时校正 |
|
|
83
|
+
|
|
84
|
+
## 月份基准说明
|
|
85
|
+
|
|
86
|
+
| 系统 | 月份基准 | 日期基准 |
|
|
87
|
+
|------|----------|----------|
|
|
88
|
+
| 八字 | 节气月(立春起算) | 公历日 |
|
|
89
|
+
| 紫微 | 农历月(初一起算) | 农历日 |
|
|
90
|
+
|
|
91
|
+
## 开发
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
git clone https://github.com/ChesterRa/mingpan.git
|
|
95
|
+
cd mingpan
|
|
96
|
+
npm install
|
|
97
|
+
npm run build
|
|
98
|
+
npm run dev # 监听变化
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## 依赖
|
|
102
|
+
|
|
103
|
+
| 库 | 用途 |
|
|
104
|
+
|------|------|
|
|
105
|
+
| `@modelcontextprotocol/sdk` | MCP 协议实现 |
|
|
106
|
+
| `lunar-javascript` | 农历/公历转换 |
|
|
107
|
+
| `iztro` | 紫微斗数计算引擎 |
|
|
108
|
+
| `zod` | 输入参数校验 |
|
|
109
|
+
|
|
110
|
+
## 路线图
|
|
111
|
+
|
|
112
|
+
- [x] 八字基础排盘与时运列表
|
|
113
|
+
- [x] 紫微基础排盘与时运列表
|
|
114
|
+
- [ ] 大六壬、六爻等其他术数系统
|
|
115
|
+
|
|
116
|
+
## 许可证
|
|
117
|
+
|
|
118
|
+
Apache License 2.0
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BaZi Core Calculator
|
|
3
|
+
* Enhanced with taro-bazi astronomical calculations
|
|
4
|
+
* Language-agnostic core calculations
|
|
5
|
+
*/
|
|
6
|
+
import { BaziChart, FiveElementsAnalysis, TwelveGrowthStage, BaziCoreInput, BaziCoreResult } from './types';
|
|
7
|
+
export declare class BaziCore {
|
|
8
|
+
constructor();
|
|
9
|
+
/**
|
|
10
|
+
* Main calculation method
|
|
11
|
+
* Calculates the four pillars based on birth information
|
|
12
|
+
*/
|
|
13
|
+
calculate(input: BaziCoreInput): Promise<BaziCoreResult>;
|
|
14
|
+
/**
|
|
15
|
+
* Calculate four pillars based on taro-bazi logic
|
|
16
|
+
*/
|
|
17
|
+
private calculateHoroscope;
|
|
18
|
+
/**
|
|
19
|
+
* Calculate year pillar using lunar-javascript
|
|
20
|
+
*/
|
|
21
|
+
private calculateYearPillar;
|
|
22
|
+
/**
|
|
23
|
+
* Calculate month pillar based on solar term
|
|
24
|
+
*/
|
|
25
|
+
private calculateMonthPillar;
|
|
26
|
+
/**
|
|
27
|
+
* Normalize solar term names to simplified Chinese keys used by SOLAR_TERM_TO_ZHI
|
|
28
|
+
*/
|
|
29
|
+
private normalizeSolarTerm;
|
|
30
|
+
/**
|
|
31
|
+
* Calculate day pillar
|
|
32
|
+
*/
|
|
33
|
+
private calculateDayPillar;
|
|
34
|
+
/**
|
|
35
|
+
* Calculate hour pillar
|
|
36
|
+
*/
|
|
37
|
+
private calculateHourPillar;
|
|
38
|
+
/**
|
|
39
|
+
* Create a pillar with hidden stems and Na Yin
|
|
40
|
+
*/
|
|
41
|
+
private createPillar;
|
|
42
|
+
/**
|
|
43
|
+
* Get hidden stems for a branch
|
|
44
|
+
*/
|
|
45
|
+
private getHiddenStems;
|
|
46
|
+
/**
|
|
47
|
+
* Get element of a heavenly stem
|
|
48
|
+
*/
|
|
49
|
+
private getStemElement;
|
|
50
|
+
/**
|
|
51
|
+
* Get element of an earthly branch
|
|
52
|
+
*/
|
|
53
|
+
private getBranchElement;
|
|
54
|
+
/**
|
|
55
|
+
* Get zodiac animal for a branch
|
|
56
|
+
*/
|
|
57
|
+
private getZodiac;
|
|
58
|
+
/**
|
|
59
|
+
* Get Na Yin information
|
|
60
|
+
*/
|
|
61
|
+
private getNaYin;
|
|
62
|
+
/**
|
|
63
|
+
* Extract element from Na Yin name
|
|
64
|
+
*/
|
|
65
|
+
private extractNaYinElement;
|
|
66
|
+
/**
|
|
67
|
+
* Get Na Yin meaning
|
|
68
|
+
*/
|
|
69
|
+
private getNaYinMeaning;
|
|
70
|
+
/**
|
|
71
|
+
* Calculate five elements distribution
|
|
72
|
+
*/
|
|
73
|
+
calculateFiveElements(chart: BaziChart): FiveElementsAnalysis;
|
|
74
|
+
/**
|
|
75
|
+
* Evaluate element distribution
|
|
76
|
+
*/
|
|
77
|
+
private evaluateDistribution;
|
|
78
|
+
/**
|
|
79
|
+
* Calculate twelve growth stages based on taro-bazi logic
|
|
80
|
+
*/
|
|
81
|
+
calculateTwelveGrowthStages(chart: BaziChart): Promise<TwelveGrowthStage[]>;
|
|
82
|
+
/**
|
|
83
|
+
* Get growth stage information
|
|
84
|
+
*/
|
|
85
|
+
private getGrowthStageInfo;
|
|
86
|
+
/**
|
|
87
|
+
* Calculate self-sitting relationship (自坐)
|
|
88
|
+
* Uses the twelve growth stages (十二长生) system
|
|
89
|
+
* Based on taro-bazi implementation
|
|
90
|
+
*/
|
|
91
|
+
private calculateSelfSitting;
|
|
92
|
+
/**
|
|
93
|
+
* Calculate void branches (空亡) based on taro-bazi logic
|
|
94
|
+
*/
|
|
95
|
+
calculateVoidBranches(pillar: {
|
|
96
|
+
stem: string;
|
|
97
|
+
branch: string;
|
|
98
|
+
}): string[];
|
|
99
|
+
/**
|
|
100
|
+
* Calculate month strength
|
|
101
|
+
*/
|
|
102
|
+
calculateMonthStrength(chart: BaziChart, birthInfo: any): number;
|
|
103
|
+
/**
|
|
104
|
+
* Get season from month branch
|
|
105
|
+
*/
|
|
106
|
+
private getSeason;
|
|
107
|
+
/**
|
|
108
|
+
* Get birth info for other calculations
|
|
109
|
+
*/
|
|
110
|
+
getBirthInfo(year: number, month: number, day: number, hour: number): Promise<any>;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=BaziCore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaziCore.d.ts","sourceRoot":"","sources":["../../../src/core/bazi/BaziCore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,SAAS,EAGT,oBAAoB,EAEpB,iBAAiB,EAGjB,aAAa,EACb,cAAc,EACf,MAAM,SAAS,CAAC;AAkCjB,qBAAa,QAAQ;;IAKnB;;;OAGG;IACG,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IAoG9D;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAqC1B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAiB3B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IA4C5B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAkC1B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAqB1B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAwB3B;;OAEG;IACH,OAAO,CAAC,YAAY;IAsBpB;;OAEG;IACH,OAAO,CAAC,cAAc;IAWtB;;OAEG;IACH,OAAO,CAAC,cAAc;IAKtB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAKxB;;OAEG;IACH,OAAO,CAAC,SAAS;IAKjB;;OAEG;IACH,OAAO,CAAC,QAAQ;IAWhB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAS3B;;OAEG;IACH,OAAO,CAAC,eAAe;IAavB;;OAEG;IACH,qBAAqB,CAAC,KAAK,EAAE,SAAS,GAAG,oBAAoB;IA6D7D;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAc5B;;OAEG;IACG,2BAA2B,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAgEjF;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAsB1B;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IA6C5B;;OAEG;IACH,qBAAqB,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,EAAE;IAuBzE;;OAEG;IACH,sBAAsB,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,GAAG,MAAM;IAuBhE;;OAEG;IACH,OAAO,CAAC,SAAS;IAUjB;;OAEG;IACG,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CAiBzF"}
|