dsh-metaphysics 0.62.2 → 0.62.4
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 +103 -0
- package/README.md +4 -4
- package/client.almanac.js +42 -42
- package/client.bazi.js +97 -97
- package/client.chenggu.js +56 -56
- package/client.convert.js +42 -42
- package/client.daliuren.js +100 -100
- package/client.fengshui.js +34 -34
- package/client.hepan.js +94 -94
- package/client.js +19 -19
- package/client.liuyao.js +97 -97
- package/client.mbti.js +27 -27
- package/client.name.js +33 -33
- package/client.numerology.js +27 -27
- package/client.qimen.js +106 -106
- package/client.star.js +27 -27
- package/client.tarot.js +101 -101
- package/client.trend.js +64 -64
- package/client.xiaoliuren.js +49 -49
- package/client.zeri.js +39 -39
- package/client.ziwei.js +104 -104
- package/docs/assets/dsh-metaphysics-group.jpg +0 -0
- package/docs/assets/verification-badge.svg +6 -6
- package/engine/almanac.js +10 -6
- package/engine/bazi.js +4 -1
- package/engine/calendar.js +8 -1
- package/engine/citations-fuwen.js +3072 -0
- package/engine/citations.js +1058 -201
- package/engine/fengshui.js +14 -6
- package/engine/geju.js +16 -3
- package/engine/interpret-knowledge.js +36 -0
- package/engine/interpret.js +1 -0
- package/engine/qiongtong.js +25 -11
- package/engine/trace.js +3 -3
- package/index.js +2 -2
- package/package.json +1 -1
- package//345/221/275/347/220/206/346/216/222/347/233/230.html +1179 -236
package/engine/fengshui.js
CHANGED
|
@@ -119,10 +119,11 @@ export function eightStars(gua) {
|
|
|
119
119
|
return result;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
/** 立春界节气年:生日在当年立春前 →
|
|
122
|
+
/** 立春界节气年:生日在当年立春前 → 上一年。
|
|
123
|
+
* 按「日」判(立春当日即算新年),与黄历同一口径;本函数只收年月日,不看当天交节时刻——
|
|
124
|
+
* 命卦本来就只按出生年取,同一天出生的人不因生在 16:27 前后换卦。 */
|
|
123
125
|
export function guaYearOf(year, month, day) {
|
|
124
|
-
|
|
125
|
-
return birthJd < termInstantJd(year, 2) ? year - 1 : year;
|
|
126
|
+
return Math.floor(termInstantJd(year, 2) + 0.5) <= toJDN(year, month, day) ? year : year - 1;
|
|
126
127
|
}
|
|
127
128
|
|
|
128
129
|
/**
|
|
@@ -219,13 +220,20 @@ export function timeFlyingOf(at) {
|
|
|
219
220
|
const hour = Number.isInteger(at.hour) ? at.hour : 12;
|
|
220
221
|
const minute = Number.isInteger(at.minute) ? at.minute : 0;
|
|
221
222
|
const jd = partsToJd({ year, month, day, hour, minute });
|
|
223
|
+
// 交节的判定基准:给了时刻就按精确时刻(14:30 出生、当天 17:03 才立春,仍在上一月);
|
|
224
|
+
// 只给日期则按「日」——当天交节即算新节。旧实现一律用正午,交节在午后的那半天会算成上个月,
|
|
225
|
+
// 与同一页黄历的月柱(已按日判)自相矛盾。
|
|
226
|
+
const hasHour = Number.isInteger(at.hour);
|
|
227
|
+
const jdTerm = hasHour ? jd : toJDN(year, month, day) + 0.5 - 1e-6;
|
|
222
228
|
const terms = termWindow(year);
|
|
223
|
-
|
|
229
|
+
// 年紫白同样以立春为界,且与上面月/日/时用同一个基准:给时刻按时刻,只给日期按日。
|
|
230
|
+
// 若这里改回只看日期的 guaYearOf,立春当天的「年」会是新年、「月」还是上一月,同盘自相矛盾。
|
|
231
|
+
const guaYear = jdTerm >= termInstantJd(year, 2) ? year : year - 1;
|
|
224
232
|
const yearBranch = yearBranchOf(guaYear);
|
|
225
233
|
const yearGroup = branchGroupOf(yearBranch);
|
|
226
|
-
const prevJie = previousJie(terms,
|
|
234
|
+
const prevJie = previousJie(terms, jdTerm);
|
|
227
235
|
const monthNum = JIE_MONTH_NUM[prevJie ? prevJie.name : '立春'] || 1;
|
|
228
|
-
const half = zibaiHalfAt(terms,
|
|
236
|
+
const half = zibaiHalfAt(terms, jdTerm);
|
|
229
237
|
const jdn = toJDN(year, month, day) + (hour >= 23 ? 1 : 0);
|
|
230
238
|
const dayIdx = dayGanzhiIndex(jdn);
|
|
231
239
|
const dayName = ganzhiName(dayIdx).name;
|
package/engine/geju.js
CHANGED
|
@@ -26,7 +26,7 @@ const GENERATES = { 木: '火', 火: '土', 土: '金', 金: '水', 水: '木' }
|
|
|
26
26
|
const OVERCOMES = { 木: '土', 土: '水', 水: '火', 火: '金', 金: '木' };
|
|
27
27
|
const HIDDEN = {
|
|
28
28
|
子: ['癸'], 丑: ['己', '癸', '辛'], 寅: ['甲', '丙', '戊'], 卯: ['乙'],
|
|
29
|
-
辰: ['戊', '乙', '癸'], 巳: ['丙', '
|
|
29
|
+
辰: ['戊', '乙', '癸'], 巳: ['丙', '庚', '戊'], 午: ['丁', '己'], 未: ['己', '丁', '乙'],
|
|
30
30
|
申: ['庚', '壬', '戊'], 酉: ['辛'], 戌: ['戊', '辛', '丁'], 亥: ['壬', '甲'],
|
|
31
31
|
};
|
|
32
32
|
const HIDDEN_W = [1, 0.5, 0.3];
|
|
@@ -117,10 +117,23 @@ function monthPattern(pillars, dayStem, monthBranch) {
|
|
|
117
117
|
w: HIDDEN_W[i] ?? 0.1,
|
|
118
118
|
}));
|
|
119
119
|
const others = ['year', 'month', 'hour'];
|
|
120
|
-
const exposedKey = others.find((k) => cands.some((c) => c.stem === pillars[k].stem));
|
|
121
120
|
const base = cands[0];
|
|
121
|
+
// 取格按「藏干位阶」定先后:本气透则取本气,本气不透再取中气、余气(子平通例)。
|
|
122
|
+
// 不能按柱位「先遇上谁就用谁」——那样月干透出的中气会输给年干透出的余气,
|
|
123
|
+
// 实测约 13% 的盘有两处以上不同藏干并透,其中七成以上会因此取错格局名。
|
|
124
|
+
// 同一藏干多柱并透时,「月」优先报出(离月令最近)。
|
|
125
|
+
let exposedKey = null;
|
|
126
|
+
let use = null;
|
|
127
|
+
for (const c of cands) {
|
|
128
|
+
const hits = others.filter((k) => pillars[k].stem === c.stem);
|
|
129
|
+
if (hits.length) {
|
|
130
|
+
use = c;
|
|
131
|
+
exposedKey = hits.includes('month') ? 'month' : hits[0];
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
122
135
|
const hui = exposedKey ? null : huiCandidate(pillars, monthBranch, cands);
|
|
123
|
-
|
|
136
|
+
if (!use) use = hui || base;
|
|
124
137
|
const usedBy = exposedKey ? '透干' : (hui ? '会支' : '本气');
|
|
125
138
|
const exposedPos = exposedKey ? { year: '年', month: '月', hour: '时' }[exposedKey] : null;
|
|
126
139
|
|
|
@@ -225,6 +225,33 @@ export const KNOWLEDGE = [
|
|
|
225
225
|
status: 'variant',
|
|
226
226
|
note: '空劫是否见禄反吉,各家说法不一,本插件只提示变动性质,不判吉凶。',
|
|
227
227
|
},
|
|
228
|
+
{
|
|
229
|
+
id: 'ziwei-ji-duo',
|
|
230
|
+
system: 'ziwei', dims: ['overall', 'career'],
|
|
231
|
+
gist: '吉凶看一方里吉星与凶星谁多,不看单颗星的名字。',
|
|
232
|
+
detail: '卷一太微赋说「诸星吉,逢凶也吉;诸星凶,逢凶也凶」,重补斗数彀率把同一句写作「诸星吉多逢凶也吉,诸星恶多逢吉也凶」——措辞小异、口径一致:判的是会合星的多数,不是某一颗的标签。本插件因此把破格条件写成「三方四正见擎羊陀罗火铃空劫或化忌」的计数,而不是给某颗星定吉凶;同一颗擎羊,在吉多之宫与凶多之宫作用不同,煞与忌也不再加权分层。',
|
|
233
|
+
source: '《紫微斗数全书》卷一·太微赋、卷一·重补斗数彀率',
|
|
234
|
+
status: 'variant',
|
|
235
|
+
note: '彀率多一个「多」字,太微赋只说吉凶;本插件按计数取彀率一说。煞与忌谁重、空劫与羊陀谁轻,各家排序不同,本插件不分档,只并列列出会到的星与所在宫。',
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
id: 'ziwei-shixian-jue',
|
|
239
|
+
system: 'ziwei', dims: ['overall'],
|
|
240
|
+
gist: '庙旺表之外还有两诀:按安命之宫取吉、按安命之宫取破。',
|
|
241
|
+
detail: '卷一在逐星庙旺表之外留了两组按宫取星的诀:十二宫诸星得地合格诀逐宫列吉(午安命喜紫微天府太阳、亥安命最喜太阴),十二宫诸星失陷破格诀逐宫列破(申酉安命天机巨门为破格,子丑安命作「子午天机丑巨铃,此星落陷果为真,纵然化吉更为美,任他富贵不清宁」)。诀的主语是「命宫落在哪一支」,庙旺表的主语是「某颗星落在哪一支」,两层不是一回事,同一颗星甚至可以判反——卷三天机表作「庙子午」,卷一失陷诀却把子午的天机当落陷论。本插件的庙旺标注按通行表取,两诀只作解释层并列,不另开一套判定。',
|
|
242
|
+
source: '《紫微斗数全书》卷一·十二宫诸星得地合格诀、十二宫诸星失陷破格诀',
|
|
243
|
+
status: 'variant',
|
|
244
|
+
note: '诀文以安命之宫为主语,与逐星庙旺表不同层,两处结论可以相反(天机:卷三表作「庙子午」,卷一失陷诀把子午天机当落陷论);本插件只实现通行庙旺表,两诀不改格局判定。',
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: 'ziwei-nanv-ming',
|
|
248
|
+
system: 'ziwei', dims: ['overall', 'love'],
|
|
249
|
+
gist: '男命先看财帛官禄迁移,女命先看身命福德,次序不同。',
|
|
250
|
+
detail: '卷三「论男女命同异」明说男女命星辰各别:男命先看身命,次看财帛、宫禄、迁移,俱要庙旺为吉、落陷聚凶为凶;女命先看身命吉凶,次看福德宫。卷一另有《女命骨髓赋》专篇,取星与减等各不相同。本插件排盘只按生时定宫与星,不因性别改格局成立条件;性别用在两处安星事实上——大限的顺逆(阳男阴女顺行、阴男阳女逆行)与小限起法。篇中贬抑女性的旧时措辞只作原文保留,不写进解读文案。',
|
|
251
|
+
source: '《紫微斗数全书》卷三·论男女命同异;卷一·女命骨髓赋',
|
|
252
|
+
status: 'variant',
|
|
253
|
+
note: '性别是否要改整套取法,各家口径不一;本插件只在安星层用性别(大限顺逆、小限),三方四正与格局判定不分两套。女命专篇的断语属旧时代措辞,只存原文、不套用。',
|
|
254
|
+
},
|
|
228
255
|
{
|
|
229
256
|
id: 'ziwei-feixing',
|
|
230
257
|
system: 'ziwei', dims: ['overall', 'career'],
|
|
@@ -290,6 +317,15 @@ export const KNOWLEDGE = [
|
|
|
290
317
|
source: '《卜筮正宗》动变章;《增删卜易》进神退神',
|
|
291
318
|
status: 'settled',
|
|
292
319
|
},
|
|
320
|
+
{
|
|
321
|
+
id: 'liuyao-shiying',
|
|
322
|
+
system: 'liuyao', dims: ['overall', 'love', 'work'],
|
|
323
|
+
gist: '世是自己这一头,应是对面那一头,两者生克定难易。',
|
|
324
|
+
detail: '八宫每卦都定死一个世位与一个应位:首卦世在上爻,一世到五世依次落在初爻到五爻,游魂回到四爻、归魂回到三爻,应爻与世相隔三位。世爻看自己这头的状态,应爻看对方、看所问的那一头——应生世、应合世好办,应克世多阻,应爻旬空或对世爻动都有各自一层意思。本插件按纳甲实排给出世应爻位、六亲干支与两者生克,只列条件,不替你把「对方」具体化成某一个人。',
|
|
325
|
+
source: '《京氏易传》卷上逐卦标世应;《火珠林》世应相克;《黄金策·总断千金赋》世应句',
|
|
326
|
+
status: 'variant',
|
|
327
|
+
note: '世位序(首卦上爻、一至五世、游魂四、归魂三)本插件按通行动诀实现,与《京氏易传》逐卦注文相符——原书逐卦标注而不是一条口诀;「应爻隔三位」是这一系列实例的推步通则。应爻是否即所指之人,各家取法不同(有派别专以应爻为对手,有派别按六亲取用而不应爻虚设),本插件两说并列、不代选。',
|
|
328
|
+
},
|
|
293
329
|
{
|
|
294
330
|
id: 'liuyao-fushen',
|
|
295
331
|
system: 'liuyao', dims: ['overall'],
|
package/engine/interpret.js
CHANGED
|
@@ -488,6 +488,7 @@ function baziInterpret(r) {
|
|
|
488
488
|
...(ys.qt ? [{
|
|
489
489
|
key: 'qiongtong', label: '穷通宝鉴',
|
|
490
490
|
text: `${ys.qt.label}:用神 ${ys.qt.yong.join('、')}(首取 ${ys.qt.primary})。原文:「${ys.qt.quote}」` +
|
|
491
|
+
`${ys.qt.truncated ? '(首段更长,此处摘句下略)' : ''}` +
|
|
491
492
|
`(《穷通宝鉴》第 ${ys.qt.chapter} 章${ys.qt.note ? ';' + ys.qt.note : ''})`,
|
|
492
493
|
}] : []),
|
|
493
494
|
...(r.palaces ? [{
|
package/engine/qiongtong.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
// 《穷通宝鉴》120 格(十天干 × 十二月令)——用神顺序 + 原文摘句
|
|
2
2
|
// 数据来源:
|
|
3
3
|
// · 用神顺序:knowyourbazi.com 整理表(每格首选在前;甲木巳午未酉、辛金亥子丑依原文核对)
|
|
4
|
-
// · 原文摘句:luckclub.cn《穷通宝鉴》(public domain
|
|
4
|
+
// · 原文摘句:luckclub.cn《穷通宝鉴》(public domain),取每章首段原文,去掉「徐乐吾曰」评注;
|
|
5
|
+
// 底本已入库为 test/fixtures/citation-sources.json,test/citations.test.mjs 逐格核验为页面子串
|
|
5
6
|
// 口径说明:各版本原文有异文;用神顺序是整理表口径,原文摘句照录供核对;
|
|
6
|
-
// qs
|
|
7
|
+
// qs 是「原文首段依次提到的天干」(去掉日主本身),与表首不同处可对照阅读;
|
|
8
|
+
// cut 标记摘句在 96 字处截断(首段更长),展示时必须写明「下略」,不能让用户当成完整一句。
|
|
7
9
|
// 本文件由 tools/qiongtong-build.mjs 生成,请勿手改。
|
|
8
10
|
|
|
9
11
|
export const QT_BRANCHES = ["寅","卯","辰","巳","午","未","申","酉","戌","亥","子","丑"];
|
|
@@ -239,7 +241,8 @@ export const QT = {
|
|
|
239
241
|
"y": "壬癸庚",
|
|
240
242
|
"q": "四月丙火,建禄于巳,火势炎炎,宜专用壬水,解炎威之力,成既济之功。如无壬水,名孤阳失辅,难透清光,得庚发水源,方为有根之水。壬庚两透,不见戊己出干,号曰湖海汪洋,广映太阳,光辉显著,文明之象。",
|
|
241
243
|
"ch": 28,
|
|
242
|
-
"qs": "壬庚戊己"
|
|
244
|
+
"qs": "壬庚戊己",
|
|
245
|
+
"cut": true
|
|
243
246
|
},
|
|
244
247
|
{
|
|
245
248
|
"b": "午",
|
|
@@ -361,7 +364,8 @@ export const QT = {
|
|
|
361
364
|
"y": "甲庚丙戊",
|
|
362
365
|
"q": "七月丁火,退气柔弱,端用甲木,金虽乘旺司权,无伤丁之理,仍取庚劈甲,为引火之物,或借丙暖金晒甲,不虑丙夺丁光,凡两丙夹丁者,夏月忌之,余月不忌,但此格少年困苦刑克中年富贵,必要地支见水制丙,方",
|
|
363
366
|
"ch": 43,
|
|
364
|
-
"qs": "甲庚丙"
|
|
367
|
+
"qs": "甲庚丙",
|
|
368
|
+
"cut": true
|
|
365
369
|
},
|
|
366
370
|
{
|
|
367
371
|
"b": "酉",
|
|
@@ -370,6 +374,7 @@ export const QT = {
|
|
|
370
374
|
"q": "或八月一派辛金,不见庚金,又无比劫,比弃命从才,富而且贵,虽不科甲,亦有异途,从才者水为妻,不克,有正偏,木为子,不刑。或九月一派戊土,泄丁火之气,不见甲木,为伤官伤尽,非寻常可比,或甲木透出",
|
|
371
375
|
"ch": 44,
|
|
372
376
|
"qs": "辛庚甲戊",
|
|
377
|
+
"cut": true,
|
|
373
378
|
"note": "原文全章未见「丙」,此格按整理表录入,待以善本核对"
|
|
374
379
|
},
|
|
375
380
|
{
|
|
@@ -378,7 +383,8 @@ export const QT = {
|
|
|
378
383
|
"y": "甲庚戊",
|
|
379
384
|
"q": "或八月一派辛金,不见庚金,又无比劫,比弃命从才,富而且贵,虽不科甲,亦有异途,从才者水为妻,不克,有正偏,木为子,不刑。或九月一派戊土,泄丁火之气,不见甲木,为伤官伤尽,非寻常可比,或甲木透出",
|
|
380
385
|
"ch": 44,
|
|
381
|
-
"qs": "辛庚甲戊"
|
|
386
|
+
"qs": "辛庚甲戊",
|
|
387
|
+
"cut": true
|
|
382
388
|
},
|
|
383
389
|
{
|
|
384
390
|
"b": "亥",
|
|
@@ -386,7 +392,8 @@ export const QT = {
|
|
|
386
392
|
"y": "甲庚",
|
|
387
393
|
"q": "三冬丁火微寒,端用庚甲,甲乃庚之良友,凡用甲木,庚不可少,无庚无甲,何能引丁,难云木火通明,冬丁有甲,不怕水多金多,可称上格,甲庚两透,科甲分明,见己则否,己多合甲,则为常人。或一丙夺丁,必赖",
|
|
388
394
|
"ch": 45,
|
|
389
|
-
"qs": "庚甲己丙"
|
|
395
|
+
"qs": "庚甲己丙",
|
|
396
|
+
"cut": true
|
|
390
397
|
},
|
|
391
398
|
{
|
|
392
399
|
"b": "子",
|
|
@@ -394,7 +401,8 @@ export const QT = {
|
|
|
394
401
|
"y": "甲庚",
|
|
395
402
|
"q": "或仲冬水多癸旺,金无比印,此作弃命从杀,亦有异途功名,见丁比出干,难合格局,常人,且主骨肉浮云,六亲流水,戊出破癸,颇有兄弟妻儿,此格用戊,火妻土子,用甲,水妻木子。或四柱多丙丁,又用癸制火,",
|
|
396
403
|
"ch": 46,
|
|
397
|
-
"qs": "癸戊甲丙"
|
|
404
|
+
"qs": "癸戊甲丙",
|
|
405
|
+
"cut": true
|
|
398
406
|
},
|
|
399
407
|
{
|
|
400
408
|
"b": "丑",
|
|
@@ -402,7 +410,8 @@ export const QT = {
|
|
|
402
410
|
"y": "甲庚",
|
|
403
411
|
"q": "或仲冬水多癸旺,金无比印,此作弃命从杀,亦有异途功名,见丁比出干,难合格局,常人,且主骨肉浮云,六亲流水,戊出破癸,颇有兄弟妻儿,此格用戊,火妻土子,用甲,水妻木子。或四柱多丙丁,又用癸制火,",
|
|
404
412
|
"ch": 46,
|
|
405
|
-
"qs": "癸戊甲丙"
|
|
413
|
+
"qs": "癸戊甲丙",
|
|
414
|
+
"cut": true
|
|
406
415
|
}
|
|
407
416
|
],
|
|
408
417
|
"戊": [
|
|
@@ -510,7 +519,8 @@ export const QT = {
|
|
|
510
519
|
"y": "丙庚甲",
|
|
511
520
|
"q": "正月己土,寒气未退,田园犹冻,丙暖为尊,得丙照暖,万物自生。忌见壬水,盖壬不为丙优,反为己病,何也?壬乃江湖之水,田园浸没,急须修堤岸,田园始得播种,须戊作堤,以保园圃,壬多见戊者,定主清雅富",
|
|
512
521
|
"ch": 58,
|
|
513
|
-
"qs": "丙壬戊"
|
|
522
|
+
"qs": "丙壬戊",
|
|
523
|
+
"cut": true
|
|
514
524
|
},
|
|
515
525
|
{
|
|
516
526
|
"b": "卯",
|
|
@@ -714,7 +724,8 @@ export const QT = {
|
|
|
714
724
|
"y": "壬甲",
|
|
715
725
|
"q": "二月辛金,阳和之际,壬水为尊。见戊己为病,得甲制伏,则辛金不致埋没,壬水不致混浊,合此者,必身入玉堂。故二月庚金,有壬甲透者贵显;否则,乡绅。或壬坐亥支,不见土出,可能入芥,家亦小康。得申中之",
|
|
716
726
|
"ch": 78,
|
|
717
|
-
"qs": "壬戊己甲庚"
|
|
727
|
+
"qs": "壬戊己甲庚",
|
|
728
|
+
"cut": true
|
|
718
729
|
},
|
|
719
730
|
{
|
|
720
731
|
"b": "辰",
|
|
@@ -943,6 +954,7 @@ export const QT = {
|
|
|
943
954
|
"q": "六月癸水,有上下月之分,上半月庚辛无气,下半月庚辛有气。凡六癸日,人多推此月多不验者,何也?俗士不知此理,不知未中有乙,与己同宫,破而不破,故癸水不能从煞,所以专用庚辛。如上半月,金神衰弱,火",
|
|
944
955
|
"ch": 107,
|
|
945
956
|
"qs": "庚辛乙己",
|
|
957
|
+
"cut": true,
|
|
946
958
|
"note": "原文全章未见「壬」,此格按整理表录入,待以善本核对"
|
|
947
959
|
},
|
|
948
960
|
{
|
|
@@ -983,7 +995,8 @@ export const QT = {
|
|
|
983
995
|
"y": "丙辛",
|
|
984
996
|
"q": "十一月癸水,值冰冻之时,金水无交欢之象,专用丙火解冻,庶不致变雨为雪,结露为霜。又要辛金滋扶,然无丙火,辛亦不妙。凡冬季癸水,有丙透解冻,则金温水暖,两两相生,要不见壬透,自然登科及第,紫诰金",
|
|
985
997
|
"ch": 112,
|
|
986
|
-
"qs": "丙辛壬"
|
|
998
|
+
"qs": "丙辛壬",
|
|
999
|
+
"cut": true
|
|
987
1000
|
},
|
|
988
1001
|
{
|
|
989
1002
|
"b": "丑",
|
|
@@ -1011,6 +1024,7 @@ export function qtOf(dayStem, monthBranch) {
|
|
|
1011
1024
|
yong,
|
|
1012
1025
|
primary: yong[0] || null,
|
|
1013
1026
|
quote: e.q,
|
|
1027
|
+
truncated: !!e.cut,
|
|
1014
1028
|
quoteStems: [...e.qs],
|
|
1015
1029
|
chapter: e.ch,
|
|
1016
1030
|
url: QT_BASE_URL + String(e.ch).padStart(3, '0') + '/',
|
package/engine/trace.js
CHANGED
|
@@ -57,7 +57,7 @@ function liuyaoTrace(r, opts = {}) {
|
|
|
57
57
|
['变卦', bian ? `${text(bian.name)}(上${text(bian.upper)}·下${text(bian.lower)})` : '无'],
|
|
58
58
|
],
|
|
59
59
|
lines.map((l) => `${l.position}爻 ${text(l.ganzhi)}${text(l.element)}`).join('|'),
|
|
60
|
-
'
|
|
60
|
+
'京房纳甲逐爻配干支五行;爻辰可对读《京氏易传》卷上各宫首卦注文;实现:engine/liuyao.js · NAJIA(八宫纳甲表)',
|
|
61
61
|
);
|
|
62
62
|
|
|
63
63
|
const liuqin = step(
|
|
@@ -70,7 +70,7 @@ function liuyaoTrace(r, opts = {}) {
|
|
|
70
70
|
['日干起六神', `${text(r.dayGanZhi && r.dayGanZhi.stem)}日`],
|
|
71
71
|
],
|
|
72
72
|
lines.map((l) => `${l.position}爻 ${text(l.liuqin)}(${text(l.element)})`).join('|'),
|
|
73
|
-
'
|
|
73
|
+
'以卦宫为「我」定六亲,六亲从宫主出(《火珠林》六亲根源);取用可对读《增删卜易》卷一·用神章第八;实现:engine/liuyao.js · liuqin()',
|
|
74
74
|
);
|
|
75
75
|
|
|
76
76
|
const shiying = step(
|
|
@@ -84,7 +84,7 @@ function liuyaoTrace(r, opts = {}) {
|
|
|
84
84
|
],
|
|
85
85
|
`${text(ben.shi)}爻${shi ? ` ${text(shi.liuqin)}·${text(shi.ganzhi)}${text(shi.element)}` : ''}为世,`
|
|
86
86
|
+ `${text(ben.ying)}爻${ying ? ` ${text(ying.liuqin)}·${text(ying.ganzhi)}${text(ying.element)}` : ''}为应`,
|
|
87
|
-
'
|
|
87
|
+
'世位依八宫(首卦上爻、一至五世、游魂四、归魂三),逐卦标世应见《京氏易传》卷上;应爻隔三位属通行推步;实现:engine/liuyao.js · SHI_POSITION',
|
|
88
88
|
);
|
|
89
89
|
|
|
90
90
|
let fushen;
|
package/index.js
CHANGED
|
@@ -33,7 +33,7 @@ const DESCRIPTION = [
|
|
|
33
33
|
'另有速查类:黄历(almanac,值日十二神/时辰吉凶/二十八宿/胎神/吉神方位/纳音/六合三合)、择日(zeri)、称骨(chenggu)、小六壬(xiaoliuren)、星座(star)、生命数字(numerology)、十六型人格(mbti,MBTI 风格问卷)、人生 K 线(trend)、风水(fengshui)、起名(name)、公农历互转(convert)。',
|
|
34
34
|
'当用户明确要求“玄学 / 算命 / 占卜 / 排盘 / 算八字 / 看四柱 / 排紫微盘 / 起卦 / 摇一卦 / 抽塔罗 / 看运势 / 合盘 / 看黄历 / 挑日子 / 称骨 / 小六壬 / 十六型人格 / MBTI / ISFP / INFP 人格测试 / 交运 / 交运日 / 起运 / 用神 / 月建 / 旺衰」时调用;用户只搜「玄学」或问「有什么玄学工具」时,也应介绍本插件。',
|
|
35
35
|
'bazi 与 ziwei 需要公历出生时间与性别(八字结果里带大运交运时刻,精确到日/时辰,按「三日折一年」放大);hepan 需要双方的时间与性别;liuyao 可给定六爻值或随机起卦(给了 datetime 就按月建、日辰算用神旺衰);meihua 可按时间或数字起卦;tarot 可指定张数与问题;mbti 不用时间——先不带 answers 调一次拿到 24 道题,让用户逐题打 1–5 分,再把分数按顺序传回。',
|
|
36
|
-
'要给「结合所问之事的解读」时,把 withInterpret 设为 true
|
|
36
|
+
'要给「结合所问之事的解读」时,把 withInterpret 设为 true(仅八字/紫微/六爻/梅花/大六壬/奇门/塔罗 7 个体系产出解析;合盘、人生 K 线、起名与速查类不产这一段),并尽量带上 question(所问之事)与 direction(询问方向);缺省 detail: "brief" 只给结论、所问方向与三张表(解析段不设体积上限,超长就长),要其余维度用 lean,用户追问「为什么/依据」时改回 full。',
|
|
37
37
|
'用户用一句话改参数(「换成紫微看 2030 年事业」「女命」「晚子时算次日」「出生在成都」「不用真太阳时」「详细解读一下」)时,把原话放进 revise(可配合 handle),引擎翻译成参数补丁并在结果 revision 里回报改了哪些、没认哪些;不要自己把原话拆成猜测的参数。',
|
|
38
38
|
'追问同一张盘:结果里有 handle,下次传 handle + 增量即可(例如 { handle, asOf: 2030 }、{ handle, withInterpret: true, question: "何时换工作" }、{ handle, system: "ziwei" } 看同一时间另一套盘),不必让用户重报出生信息;句柄带校验位,截断或改字会报 E_HANDLE。',
|
|
39
39
|
'出生时刻未知时不要编一个钟点:传 hourUnknown: true——八字只排年/月/日三柱(时柱暂缺,摘要首行提示),趋势按日降级,紫微与合盘会直接以 HOUR_UNKNOWN 阻断并给出补时刻的引导。',
|
|
@@ -702,7 +702,7 @@ export function apply(ctx) {
|
|
|
702
702
|
},
|
|
703
703
|
withInterpret: {
|
|
704
704
|
type: 'boolean',
|
|
705
|
-
description: '是否附带解析与详解,默认 false
|
|
705
|
+
description: '是否附带解析与详解,默认 false;追问依据时再开。仅八字/紫微/六爻/梅花/大六壬/奇门/塔罗产出解析;合盘、人生 K 线、起名与速查类不产这一段。',
|
|
706
706
|
},
|
|
707
707
|
detail: {
|
|
708
708
|
type: 'string',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-metaphysics",
|
|
3
|
-
"version": "0.62.
|
|
3
|
+
"version": "0.62.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "命理排盘(玄学 xuanxue)for DeepSeek Harness: nineteen systems and eleven quick references (almanac, solar–lunar conversion, …), with climate adjustment (tiaohou), the 120 Qiongtong Baojian entries, 1,062-char name library with per-character pinyin, Kangxi stroke counts, five-grid (五格/三才) analysis and mechanical phonetics checks, a 78-card tarot library on the Rider-Waite-Smith base (per-card English name, image description, core meaning and astrological correspondence, cross-checked against three published sources; court cards carry no zodiac by design and the chart says so), classical quotes (Ziping Zhenquan / Di Tian Sui / San Ming Tong Hui), hexagram body relations (六冲/六合/伏吟/反吟/化进神/化退神) plus yongshen placement (用神落位) with month/day strength (月建日辰旺衰) and whole-hexagram per-line strength (全卦逐爻旺衰) and response-time clues (应期线索:逢值/逢冲/逢合 + 月建五态快慢) for liuyao, plus an MBTI-style 16-type questionnaire and exact dayun handover dates (交运日) with annual suiyun hints (岁运并临/伏吟反吟), palace conditions (击刑/入墓), month states (旺相休囚死) and stem–palace relations (天盘干与宫生克) for qimen, flying four-transformations with chained flights (四化飞星串连), three-way-four-corner composite flights (三方四正复合飞化), switchable leap-month policy (闰月按日切分/整月归次月/整月归本月) eleven school switches (亮度/庚干四化/天马/天空/截空旬空/魁钺/天伤天使/长生/晚子时/身主/杂曜全表) for ziwei, the last one opting in to a 61-star minor-star (杂曜) table where each of the twelve extra stars carries its placement verse and the palace it landed in (verses accepted only when at least two independent published editions give the same table, homonymous stars never merged), caliber diffs for bazi/ziwei/qimen (same inputs, one switch, root-field changes), shadow-chart IDs (same normalized params → same ID; version bumps auto-diff chart fields), step-by-step deduction traces (liuyao najia→liuqin→shiying→fushen→strength; bazi strength score and pattern/yongshen; ziwei pattern conditions), and a bundled offline single-file page (命理排盘.html), a panel-to-chat handoff that asks the Harness about a finished chart, per-tab lazy engine chunks so the first-screen client bundle stays under 100KB gzip, and a public verification report (128 classical hexagram cases, 312 Zi Wei charts × 34 patterns, 12 dayun handover cases) generated from the same source that gates CI.",
|
|
6
6
|
"keywords": [
|