dsh-metaphysics 0.74.0 → 0.75.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-metaphysics",
3
3
  "displayName": "烛微命盘",
4
- "version": "0.74.0",
4
+ "version": "0.75.0",
5
5
  "type": "module",
6
6
  "description": "烛微命盘(玄学 xuanxue)for DeepSeek Harness: twenty-two 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 110KB 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.",
7
7
  "keywords": [
@@ -361,7 +361,7 @@ h3::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,var(--li
361
361
  <div class="wrap">
362
362
  <header>
363
363
  <div class="brand-row">
364
- <div class="brand"><span class="seal" aria-hidden="true">微</span><span class="brand-txt">烛微命盘<span class="ver">v0.74.0</span><small>八字 · 紫微 · 六爻 · 梅花 · 六壬 · 奇门 · 合盘 · 塔罗 全部在本机计算</small></span></div>
364
+ <div class="brand"><span class="seal" aria-hidden="true">微</span><span class="brand-txt">烛微命盘<span class="ver">v0.75.0</span><small>八字 · 紫微 · 六爻 · 梅花 · 六壬 · 奇门 · 合盘 · 塔罗 全部在本机计算</small></span></div>
365
365
  <div class="view-switch">
366
366
  <span class="hint">熟练了可以换回平铺</span>
367
367
  <span class="seg" role="group" aria-label="首屏样式">
@@ -679,7 +679,7 @@ h3::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,var(--li
679
679
  <h3>对拍:把典籍当期望值</h3>
680
680
  <ul><li>六爻:京房八宫卦序与世应,64 卦全表;旬空六旬表</li><li>六壬:日干寄宫、中气换将;紫微:纳音定五行局、紫微天府相照</li><li>卦例:《增删卜易》9 条 +《卜筮正宗》128 条(93 成对 + 35 静卦),核本变卦 / 动爻数 / 卦宫 / 缺爻 / 旬空</li><li>奇门:20 个时辰 × 9 宫,核四柱 / 局数 / 值符 / 值使 / 星门神 / 天盘干</li></ul>
681
681
  <h3>工程验证</h3>
682
- <ul><li>测试:177 个测试文件 / 10091 条断言;七道闸(回归 · 断言基线 · 测试可失败自检 · HTML 注入面 · 工程约定 · 产物宿主形态 · 随机扫射)</li><li>可复现:seed / asOf 显式;同一输入同一输出</li><li>口径:晚子时、真太阳时、奇门三流派、闰月归月都可切换,并有字段级差异对照</li></ul>
682
+ <ul><li>测试:177 个测试文件 / 10106 条断言;七道闸(回归 · 断言基线 · 测试可失败自检 · HTML 注入面 · 工程约定 · 产物宿主形态 · 随机扫射)</li><li>可复现:seed / asOf 显式;同一输入同一输出</li><li>口径:晚子时、真太阳时、奇门三流派、闰月归月都可切换,并有字段级差异对照</li></ul>
683
683
 
684
684
  <h3>已知边界(不猜)</h3>
685
685
  <ul><li>六爻应期(具体哪天应验)不做;卦例只录动爻个数,不录爻位</li><li>财富/健康只给结构判断与档位,不给金额区间、不作诊断</li><li>紫微飞星已做「单一支化逐宫追到成环」与「三方四正 16 条按落宫归堆」,但都未叠大限流年四化、不折吉凶;八字交运日已能算到日/时,但未与第三方排盘案例批量对拍</li></ul>
@@ -31990,7 +31990,7 @@ return { interpret, DIRECTIONS, DIRECTION_DEFAULT, BRIGHTNESS, flowOf, parseDate
31990
31990
  })();
31991
31991
 
31992
31992
  window.Engine = __mods.index;
31993
- window.__MP_VER = "0.74.0";
31993
+ window.__MP_VER = "0.75.0";
31994
31994
  </script>
31995
31995
  <script>
31996
31996
  // 两个 UI 共用的表单规则:宿主面板(src/app.js)与独立页(src/web-ui.js)。
@@ -36017,6 +36017,42 @@ window.__MP_VER = "0.74.0";
36017
36017
  })).join('\n');
36018
36018
  };
36019
36019
 
36020
+ // 脱敏导出用:日期只留月日 / 时刻整点化 / 地址直接去掉 —— 足够按盘对账,拼不回一个人
36021
+ const MASK_DATE = /^(\d{4})-(\d{2})-(\d{2})$/;
36022
+ const MASK_TIME = /^(\d{1,2}):(\d{2})(:\d{2})?$/;
36023
+
36024
+ function maskDate(v) {
36025
+ const m = isStr(v) && MASK_DATE.exec(v.trim());
36026
+ return m ? m[2] + '-' + m[3] : '';
36027
+ }
36028
+
36029
+ function maskTime(v) {
36030
+ const m = isStr(v) && MASK_TIME.exec(v.trim());
36031
+ return m ? m[1] + ':00' : '';
36032
+ }
36033
+
36034
+ /** 脱敏导出:去出生年份(只留月日)、时刻整点化、去出生地与备注里的自由文本;保留结果结论字段 */
36035
+ pp.casesExportMasked = function (list) {
36036
+ const src = Array.isArray(list) ? list : pp.casesLoad();
36037
+ return src.map((x) => {
36038
+ const e = x.entry || {};
36039
+ const params = {};
36040
+ Object.keys(e).forEach((k) => {
36041
+ if (k === 'address') return; // 出生地直接去掉
36042
+ if (k === 'date') { const v = maskDate(e[k]); if (v) params.date = v; return; }
36043
+ if (k === 'time') { const v = maskTime(e[k]); if (v) params.time = v; return; }
36044
+ if (k === 'question') { return; } // 所问之事常带隐私,脱敏版不带
36045
+ params[k] = e[k];
36046
+ });
36047
+ return JSON.stringify({
36048
+ id: x.id, kind: e.kind || '',
36049
+ label: isStr(e.label) ? e.label : '',
36050
+ status: x.status, note: '',
36051
+ params,
36052
+ });
36053
+ }).join('\n');
36054
+ };
36055
+
36020
36056
  /** 把旧的「最近排过」并进来(幂等:迁过的 id 带 h- 前缀) */
36021
36057
  pp.casesMigrate = function (histList) {
36022
36058
  const src = Array.isArray(histList) ? histList : [];
@@ -37534,15 +37570,57 @@ document.head.appendChild(Object.assign(document.createElement('style'), { textC
37534
37570
  <button type="button" data-act="md">导出 .md</button>
37535
37571
  <button type="button" data-act="png">存为摘要长图</button>
37536
37572
  <button type="button" data-act="link" title="把这张盘的参数编进链接:打开就还原同一张盘,也能直接发给别人">复制深链</button>
37573
+ <button type="button" data-act="case" title="把这张盘存进本机卦例库,日后可回看">存入卦例库</button>
37574
+ <button type="button" data-act="hit" title="觉得这张盘说得准:记一条「应验」进卦例库">记准</button>
37575
+ <button type="button" data-act="miss" title="觉得这张盘不准:记一条「未应」进卦例库">记不准</button>
37537
37576
  <span class="hint">长图是 PNG 摘要卡(一页读懂 + 首张表);.md 存档;深链还原同一张盘(编码不是加密,别公开贴)</span>
37538
37577
  </div>`;
37539
37578
  }
37540
37579
 
37580
+ /** 从 last 与表单拼卦例 entry:只存参数,不存盘面(与面板卦例库同构) */
37581
+ function caseEntryFromLast() {
37582
+ if (!last || !last.r) return null;
37583
+ const hu = el('hourunknown');
37584
+ return {
37585
+ kind: last.tab || '',
37586
+ date: last.date || '',
37587
+ // 时辰未知时 time 是占位值,不能存成假正午
37588
+ time: hu && hu.checked ? '' : (last.time || ''),
37589
+ hourUnknown: !!(hu && hu.checked),
37590
+ gender: last.gender || '',
37591
+ address: last.address || '',
37592
+ trueSolar: last.trueSolar !== false,
37593
+ lateZi: last.lateZi !== false,
37594
+ at: Date.now(),
37595
+ };
37596
+ }
37597
+
37598
+ function caseMark(btn, act) {
37599
+ const PP = window.__PP;
37600
+ if (!PP || !PP.casesAdd || !btn) return;
37601
+ const entry = caseEntryFromLast();
37602
+ if (!entry) return;
37603
+ const status = act === 'hit' ? 'hit' : act === 'miss' ? 'miss' : 'pending';
37604
+ const done = act === 'hit' ? '已记「准」' : act === 'miss' ? '已记「不准」' : '已存卦例库';
37605
+ const idle = act === 'hit' ? '记准' : act === 'miss' ? '记不准' : '存入卦例库';
37606
+ let okSaved = false;
37607
+ try {
37608
+ const r = PP.casesAdd(entry, { status });
37609
+ okSaved = !!(r && r.ok);
37610
+ } catch (e) { /* 存储被禁用也不打断排盘 */ }
37611
+ btn.textContent = okSaved ? done : '存储不可用';
37612
+ setTimeout(() => { btn.textContent = idle; }, 1600);
37613
+ }
37614
+
37541
37615
  function onExportClick(e) {
37542
37616
  const b = e.target && e.target.closest ? e.target.closest('.exp [data-act]') : null;
37543
37617
  if (!b) return;
37544
37618
  if (b.dataset.act === 'md') { downloadReport(); return; }
37545
37619
  if (b.dataset.act === 'png') { downloadCard(); return; }
37620
+ if (b.dataset.act === 'case' || b.dataset.act === 'hit' || b.dataset.act === 'miss') {
37621
+ caseMark(b, b.dataset.act);
37622
+ return;
37623
+ }
37546
37624
  if (b.dataset.act === 'link') {
37547
37625
  const pkg = bridgePackages();
37548
37626
  if (!pkg || !pkg.link) {