dsh-metaphysics 0.34.0 → 0.46.5

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/index.js CHANGED
@@ -92,8 +92,10 @@ export function apply(ctx) {
92
92
  if (next.system === 'xiaoliuren' && next.mode !== 'number' && !next.datetime && !next.date) {
93
93
  next.datetime = `${today}T${pad(now.getHours())}:${pad(now.getMinutes())}`;
94
94
  }
95
- // 风水 natal 的流年飞星默认看今年;显式给了 fortuneYear 就按给的算
96
- if (next.system === 'fengshui' && next.action !== 'advise' && next.fortuneYear === undefined) {
95
+ // 风水 natal 的流年飞星默认看今年;玄空由 period / fortuneYear 自定,不补默认年份,
96
+ // 否则缺省会悄悄把「默认九运」变成「按今年定运」。
97
+ if (next.system === 'fengshui' && (next.action === undefined || next.action === 'natal')
98
+ && next.fortuneYear === undefined) {
97
99
  next.fortuneYear = now.getFullYear();
98
100
  }
99
101
  return compute(next);
@@ -108,7 +110,7 @@ export function apply(ctx) {
108
110
  system: {
109
111
  type: 'string',
110
112
  enum: ['bazi', 'ziwei', 'liuyao', 'tarot', 'meihua', 'daliuren', 'hepan', 'qimen', 'almanac', 'zeri', 'chenggu', 'xiaoliuren', 'star', 'numerology', 'mbti', 'trend', 'fengshui', 'name', 'convert'],
111
- description: 'bazi = 四柱八字(含调候寒暖与《穷通宝鉴》120 格用神);ziwei = 紫微斗数;liuyao = 六爻(纳甲、卦体关系、用神落位与月建日辰旺衰);tarot = 塔罗;meihua = 梅花易数;daliuren = 大六壬;hepan = 合盘(合婚),需同时给 partner;qimen = 奇门遁甲(时家转盘,拆补法);almanac = 黄历(某日宜忌/冲煞/建除/节气);zeri = 择日(某事项在日期区间内逐日打分排序);chenggu = 袁天罡称骨(骨重 + 通行本称骨歌原文 + 白话释义);xiaoliuren = 小六壬(时间或报数起课);star = 星座当日基调;numerology = 生命数字;mbti = 十六型人格(MBTI 风格 24 题问卷:给 answers 出类型,不给则先返回题目);trend = 人生 K 线(大运/流年走势可视化);fengshui = 风水(八宅命卦/流年飞星/门主灶布局);name = 起名(391 字库的用字五行评估与候选生成;未收录字可传 charElements 指定五行);convert = 公农历互转(solar2lunar 公历转农历 / lunar2solar 农历转公历)。',
113
+ description: 'bazi = 四柱八字(含调候寒暖与《穷通宝鉴》120 格用神);ziwei = 紫微斗数;liuyao = 六爻(纳甲、卦体关系、用神落位与月建日辰旺衰);tarot = 塔罗;meihua = 梅花易数;daliuren = 大六壬;hepan = 合盘(合婚),需同时给 partner;qimen = 奇门遁甲(时家转盘,拆补法);almanac = 黄历(某日宜忌/冲煞/建除/节气);zeri = 择日(某事项在日期区间内逐日打分排序);chenggu = 袁天罡称骨(骨重 + 通行本称骨歌原文 + 白话释义);xiaoliuren = 小六壬(时间或报数起课);star = 星座当日基调;numerology = 生命数字;mbti = 十六型人格(MBTI 风格 24 题问卷:给 answers 出类型,不给则先返回题目);trend = 人生 K 线(大运/流年走势可视化);fengshui = 风水(八宅命卦/流年飞星/门主灶布局/玄空下卦,action 三选一);name = 起名(391 字库的用字五行评估与候选生成;未收录字可传 charElements 指定五行);convert = 公农历互转(solar2lunar 公历转农历 / lunar2solar 农历转公历)。',
112
114
  },
113
115
  datetime: {
114
116
  type: 'string',
@@ -275,24 +277,78 @@ export function apply(ctx) {
275
277
  enum: [1, 3, 5],
276
278
  description: '塔罗张数:1 单张指引、3 过去现在未来、5 十字牌阵。默认 3。',
277
279
  },
280
+ leapMonth: {
281
+ type: 'string',
282
+ enum: ['split', 'next', 'prev'],
283
+ description: '紫微斗数:闰月口径。split(默认,按日切分:1–15 归本月、16 起归次月,主流排盘口径)、next(整月归次月)、prev(整月归本月)。',
284
+ },
278
285
  leapAsNext: {
279
286
  type: 'boolean',
280
- description: '紫微斗数:闰月是否按次月起盘(默认按本月起盘)。',
287
+ description: '紫微斗数:旧写法,true 等同 leapMonth: next。',
288
+ },
289
+ brightnessSchool: {
290
+ type: 'string',
291
+ enum: ['default', 'QS', 'XD1', 'ZZ', 'XD2'],
292
+ description: '紫微斗数:星曜亮度流派。default 用内置通行表;QS/XD1 为全书派/现代派七档,ZZ/XD2 为五档。只影响十四主星的庙旺得利平不陷。',
293
+ },
294
+ gengYearSihua: {
295
+ type: 'string',
296
+ enum: ['GYWYT', 'GYWTY', 'GYWFT', 'GYWFX', 'GYWTX'],
297
+ description: '紫微斗数:庚干四化变体,默认 GYWYT(阳武阴同)。仅作用于生年四化。',
298
+ },
299
+ tianmaSchool: {
300
+ type: 'string',
301
+ enum: ['year-branch', 'month-branch'],
302
+ description: '紫微斗数:天马安法。year-branch(默认)按年支三合,month-branch 改按生月三合。',
303
+ },
304
+ tiankongSchool: {
305
+ type: 'string',
306
+ enum: ['off', 'normal', 'shun-jia-shi'],
307
+ description: '紫微斗数:天空安法。off(默认不排)、normal(年支顺行一位)、shun-jia-shi(年支加生时)。',
308
+ },
309
+ jiekongSchool: {
310
+ type: 'string',
311
+ enum: ['off', 'double', 'single', 'zhanyan'],
312
+ description: '紫微斗数:截空/旬空安法。off(默认不排)、single 单星、double 正副双星、zhanyan 占验派;非 off 时同时排旬空、副旬。',
313
+ },
314
+ kuiyueSchool: {
315
+ type: 'string',
316
+ enum: ['qs1', 'qs2', 'zhong-yiming', 'network'],
317
+ description: '紫微斗数:天魁天钺安法,默认 qs1(全书理解一),差异集中在庚辛壬癸年。',
318
+ },
319
+ tianshiTianshang: {
320
+ type: 'string',
321
+ enum: ['normal', 'zhongzhou'],
322
+ description: '紫微斗数:天伤天使安法。normal(默认,天伤交友、天使疾厄)、zhongzhou(阴男阳女互换)。',
323
+ },
324
+ changshengSchool: {
325
+ type: 'string',
326
+ enum: ['yin-yang-shun-ni', 'shui-tu', 'huo-tu'],
327
+ description: '紫微斗数:长生十二神起点流派。默认 yin-yang-shun-ni;huo-tu 把土五局起点从申改寅;shui-tu 与默认同。',
328
+ },
329
+ lateZishi: {
330
+ type: 'string',
331
+ enum: ['current-day', 'next-day', 'all-current', 'day-cur-time-next'],
332
+ description: '紫微斗数:晚子时口径。current-day(默认,23:00 后仍按当日)、next-day(起盘日顺延次日);另两个别名保留为兼容值。',
281
333
  },
282
334
  action: {
283
335
  type: 'string',
284
- enum: ['natal', 'advise', 'assess', 'generate'],
285
- description: '子动作。fengshui:natal(默认,算八宅命卦+流年飞星,需生日与性别)、advise(算宅卦门主灶布局,需 sitting 或 facing,出生信息可选);name:assess(默认,评估已有名字,需 surname + givenName)、generate(生成候选名,需生辰,可选 surname / limit)。',
336
+ enum: ['natal', 'advise', 'xuankong', 'assess', 'generate'],
337
+ description: '子动作。fengshui:natal(默认,算八宅命卦+流年飞星,需生日与性别)、advise(算宅卦门主灶布局,需 sitting 或 facing,出生信息可选)、xuankong(玄空下卦九宫盘,需 sitting 或 facing,运由 period 或 fortuneYear 定,缺省九运并注明);name:assess(默认,评估已有名字,需 surname + givenName)、generate(生成候选名,需生辰,可选 surname / limit)。',
286
338
  },
287
339
  toAge: {
288
340
  type: 'number',
289
341
  description: '仅 trend 使用:算到几岁(10–100,默认 100)。',
290
342
  },
291
- sitting: { type: 'string', description: '仅 fengshui advise:坐山(24 山之一,如 子/午/乾)。与 facing 至少给一个。' },
292
- facing: { type: 'string', description: '仅 fengshui advise:向山(24 山之一)。缺 sitting 时按对宫反推。' },
343
+ sitting: { type: 'string', description: '仅 fengshui advise / xuankong:坐山(24 山之一,如 子/午/乾)。与 facing 至少给一个(玄空按坐向定山盘/向盘)。' },
344
+ facing: { type: 'string', description: '仅 fengshui advise / xuankong:向山(24 山之一)。缺 sitting 时按对宫反推。' },
293
345
  fortuneYear: {
294
346
  type: 'number',
295
- description: '仅 fengshui natal:流年九宫飞星的目标年份,省略则不算飞星(只算命卦与八星)。',
347
+ description: '仅 fengshui natal / xuankong:natal 用它定流年九宫飞星(省略则按今年);xuankong 用它定三元九运(省略按九运)。',
348
+ },
349
+ period: {
350
+ type: 'number',
351
+ description: '仅 fengshui xuankong:三元九运的运(1–9)。优先于 fortuneYear;省略时按 fortuneYear 定,再缺省按九运(2024–2043)并注明。',
296
352
  },
297
353
  surname: { type: 'string', description: '仅 name 使用:姓氏,如「李」(复姓整体写,如「欧阳」)。' },
298
354
  givenName: { type: 'string', description: '仅 name assess 使用:名(1–2 个汉字)。' },
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "命理排盘(玄学)· 八字紫微六爻梅花六壬奇门合盘塔罗",
4
- "description": "玄学命理排盘:十九套体系一站排盘——既有的八套排盘(八字、紫微、六爻、梅花、大六壬、奇门、合盘、塔罗)之外,另有十一套速查(黄历、农历互转、择日、称骨、小六壬、星座、生命数字、人生K线、风水、起名、十六型人格):八字(藏干十神、十二长生、42 神煞、旺衰、格局用神、大运流年吉凶评分)、紫微斗数(49 星曜与主星庙旺、四层十二神、34 格局、大限、流年流月流日流时四化)、六爻纳甲、梅花易数、大六壬(天地盘/四课/三传)、奇门遁甲(拆补/超神接气/置闰三派取局)、合盘(八字与紫微两套)与塔罗;另有所问之事驱动的解析与详解。纯本地计算、默认不联网,作为 Agent 工具供对话调用,并提供可切换本命/大限/流年视图的 Web 面板。"
4
+ "description": "玄学命理排盘:十九套体系一站排盘——既有的八套排盘(八字、紫微、六爻、梅花、大六壬、奇门、合盘、塔罗)之外,另有十一套速查(黄历、农历互转、择日、称骨、小六壬、星座、生命数字、人生K线、风水、起名、十六型人格):八字(藏干十神、十二长生、42 神煞、旺衰、格局用神、大运流年吉凶评分)、紫微斗数(49 星曜与主星庙旺、四层十二神、34 格局、大限、流年流月流日流时四化)、六爻纳甲、梅花易数、大六壬(天地盘/四课/三传)、奇门遁甲(拆补/超神接气/置闰三派取局)、合盘(八字与紫微两套)与塔罗;另有所问之事驱动的解析与详解。纯本地计算、默认不联网,作为 Agent 工具供对话调用,并提供可切换本命/大限/流年视图的 Web 面板。紫微含飞星串连与三方四正复合飞化,六爻含用神旺衰与全卦逐爻旺衰。"
5
5
  }
6
6
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "dsh-metaphysics",
3
- "version": "0.34.0",
3
+ "version": "0.46.5",
4
4
  "type": "module",
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, 391-char name library, classical quotes (Ziping Zhenquan / Di Tian Sui), hexagram body relations (六冲/六合/伏吟/反吟/化进神/化退神) plus yongshen placement (用神落位) with month/day strength (月建日辰旺衰) for liuyao, plus an MBTI-style 16-type questionnaire and exact dayun handover dates (交运日), palace conditions (击刑/入墓), month states (旺相休囚死) and stem–palace relations (天盘干与宫生克) for qimen, flying four-transformations (四化飞星串连) for ziwei, and a bundled offline single-file page (命理排盘.html).",
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, 391-char name library with per-character pinyin, Kangxi stroke counts, five-grid (五格/三才) analysis and mechanical phonetics checks, 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 (全卦逐爻旺衰) 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 (闰月按日切分/整月归次月/整月归本月) and nine school switches (亮度/庚干四化/天马/天空/截空旬空/魁钺/天伤天使/长生/晚子时) for ziwei, and a bundled offline single-file page (命理排盘.html), and a panel-to-chat handoff that asks the Harness about a finished chart.",
6
6
  "keywords": [
7
7
  "玄学",
8
8
  "玄学排盘",
@@ -60,6 +60,18 @@
60
60
  "node": ">=18",
61
61
  "dsh": ">=0.2.0"
62
62
  },
63
+ "scripts": {
64
+ "build": "node tools/build-client.mjs",
65
+ "build:html": "node tools/build-html.mjs",
66
+ "build:desktop": "node tools/build-html.mjs --desktop",
67
+ "test": "node tools/test-all.mjs",
68
+ "test:ci": "node tools/build-client.mjs && node tools/check-bundle.mjs && node tools/test-all.mjs && node tools/check-assertions.mjs && node tools/verify-tests-can-fail.mjs && node tools/check-html-sinks.mjs && node tools/check-patterns.mjs",
69
+ "test:baseline": "node tools/check-assertions.mjs --update",
70
+ "check:html": "node tools/check-html-sinks.mjs",
71
+ "check:bundle": "node tools/check-bundle.mjs",
72
+ "check:patterns": "node tools/check-patterns.mjs",
73
+ "release": "node tools/release.mjs"
74
+ },
63
75
  "exports": {
64
76
  ".": "./index.js",
65
77
  "./client": "./client.js",
@@ -78,6 +90,7 @@
78
90
  "icon.svg",
79
91
  "README.md",
80
92
  "CHANGELOG.md",
93
+ "docs/assets",
81
94
  "LICENSE"
82
95
  ],
83
96
  "dsh": {
@@ -89,16 +102,5 @@
89
102
  "immediately": true,
90
103
  "inject": []
91
104
  }
92
- },
93
- "scripts": {
94
- "build": "node tools/build-client.mjs",
95
- "build:html": "node tools/build-html.mjs",
96
- "test": "node tools/test-all.mjs",
97
- "test:ci": "node tools/build-client.mjs && node tools/check-bundle.mjs && node tools/test-all.mjs && node tools/check-assertions.mjs && node tools/verify-tests-can-fail.mjs && node tools/check-html-sinks.mjs && node tools/check-patterns.mjs",
98
- "test:baseline": "node tools/check-assertions.mjs --update",
99
- "check:html": "node tools/check-html-sinks.mjs",
100
- "check:bundle": "node tools/check-bundle.mjs",
101
- "check:patterns": "node tools/check-patterns.mjs",
102
- "release": "node tools/release.mjs"
103
105
  }
104
- }
106
+ }