import type { RandomOptions } from '../shared/random'; import type { CoreResultMeta } from '../shared/result'; import type { SolarTermEvidence } from '../calendar/solar-term-evidence'; import type { MoonPhaseEvidence } from '../calendar/moon-phase-evidence'; import type { SolarIlluminationEvidence } from '../calendar/solar-illumination-evidence'; import type { HistoricalTimezoneEvidence } from '../calendar/historical-timezone'; import type { TrueSolarTimeEvidenceFields } from '../calendar/true-solar-time'; import type { HuangjiJingshiResult } from '../huangji-jingshi'; import type { KongmingHexagramResult, ZhugeNumberResult } from '../name-number'; import type { WuyunLiuqiResult } from '../wuyun-liuqi'; import type { BirthProfileTimeRange } from '../profile/time-range'; import type { BirthProfile } from '../profile'; export type { RandomOptions, RandomSource } from '../shared/random'; export type { CoreResultMeta } from '../shared/result'; export type SixGod = '青龙' | '朱雀' | '勾陈' | '螣蛇' | '白虎' | '玄武'; export type DivinationType = 'liuyao' | 'meihua' | 'xiaoliuren' | 'jinkoujue' | 'qimen' | 'liuren' | 'tarot' | 'tarot_single' | 'ssgw' | 'zhuge' | 'kongming' | 'almanac' | 'lenormand' | 'astrolabe' | 'taiyi' | 'huangji' | 'wuyun'; export type MeihuaDivinationMethod = 'time' | 'number' | 'sound' | 'character' | 'direction' | 'random' | 'timeTrigram'; /** 梅花后天八卦方位;英文值便于 API/MCP 稳定传输。 */ export type MeihuaDirection = 'northwest' | 'west' | 'south' | 'east' | 'southeast' | 'north' | 'northeast' | 'southwest'; /** 梅花所见物类对应的八卦自然象。 */ export type MeihuaObjectType = 'heaven' | 'lake' | 'fire' | 'thunder' | 'wind' | 'water' | 'mountain' | 'earth'; export type XiaoliurenDivinationMethod = 'time'; export type XiaoliurenRule = 'common' | 'duoneng'; export interface MeihuaSettings extends RandomOptions { method?: MeihuaDivinationMethod; number?: number; /** 所闻声音的可回放计数。 */ soundCount?: number; /** 字占的原始文字;按 Unicode 字符计数。 */ characterText?: string; /** 字占的字符数;未提供 characterText 时使用。 */ characterCount?: number; /** 4—10 字时必须按传统平、上、去、入声类提供 1—4 数,不等同于普通话一至四声。 */ characterTones?: number[]; /** 2—3 字时按顺序提供每个字的人工笔画数,避免字体差异。 */ characterStrokeCounts?: number[]; /** 单字左右分笔时的左侧笔画数。 */ characterLeftStrokes?: number; /** 单字左右分笔时的右侧笔画数。 */ characterRightStrokes?: number; direction?: MeihuaDirection; objectType?: MeihuaObjectType; } export interface XiaoliurenPalaceDetail { name: '大安' | '留连' | '速喜' | '赤口' | '小吉' | '空亡'; index: number; verse: string; } export interface XiaoliurenData { rule?: XiaoliurenRule; ruleLabel?: string; meta?: CoreResultMeta; method: XiaoliurenDivinationMethod; methodLabel: string; timestamp: number; /** 真太阳时模式下用于节气与东八区民用农历日的实际占时戳(毫秒)。 */ termReferenceTimestamp?: number; lunarMonth: number; lunarDay: number; isLeapMonth: boolean; hourIndex: number; hourLabel: string; ganzhi: { year: string; month: string; day: string; hour: string; }; calculation: { lunarMonth: number; lunarDay: number; hourNumber: number; monthSeed: number; daySeed: number; hourSeed: number; monthPalaceIndex: number; dayPalaceIndex: number; hourPalaceIndex: number; dayBoundary: '东八区民用日零点换日'; leapMonthRule: '闰月沿用同名月序'; }; sequence: { month: XiaoliurenPalaceDetail; day: XiaoliurenPalaceDetail; hour: XiaoliurenPalaceDetail; }; palaceOrder: XiaoliurenPalaceDetail[]; primary: XiaoliurenPalaceDetail; evidenceAnalysis?: import('../divination/xiaoliuren-evidence').XiaoliurenEvidenceAnalysis; } export type JinkoujueDivinationMethod = 'time' | 'branch' | 'number' | 'random'; export type JinkoujuePositionName = '地分' | '将神' | '贵神' | '人元'; export type JinkoujueYinYang = '阳' | '阴'; export interface JinkoujueFourPosition { name: JinkoujuePositionName; role: string; branch: string; stem?: string; stemElement?: string; god?: string; element: string; elementBasis: '地分支' | '月将支' | '贵神本属' | '人元干'; yinYang: JinkoujueYinYang; seasonState: string; isVoid: boolean; support: string[]; constraints: string[]; promptText: string; } export interface JinkoujueMovement { category: '五动' | '三动'; name: '妻动' | '官动' | '贼动' | '财动' | '鬼动' | '父母动' | '子孙动' | '兄弟动'; from: JinkoujuePositionName; to: JinkoujuePositionName; relation: '克' | '生' | '比和'; trigger: string; source: string; } export interface JinkoujueData { meta?: CoreResultMeta; method: JinkoujueDivinationMethod; methodLabel: string; timestamp: number; /** 新盘记录四柱计算的当地时区偏移;旧盘可能没有此字段。 */ timezoneOffsetMinutes?: number; /** 真太阳时模式下用于节气、月建与月将的实际占时戳(毫秒)。 */ termReferenceTimestamp?: number; ganzhi: BaseGanZhi; dayNight: '昼占' | '夜占'; monthLeader: string; divinationBranch: string; noblemanBranch: string; xunKong: string[]; diFenBranch: string; positions: { diFen: JinkoujueFourPosition; jiangShen: JinkoujueFourPosition; guiShen: JinkoujueFourPosition; renYuan: JinkoujueFourPosition; }; relations: { guiToJiang: string; guiToRen: string; /** 新版生成时总会记录;旧版历史结果可按四位五行关系复算。 */ renToJiang?: string; jiangToDi: string; renToDi: string; guiToDi: string; }; yinYangUse: { pattern: '三阴一阳' | '三阳一阴' | '二阴二阳' | '纯阴' | '纯阳'; yinCount: number; yangCount: number; usePosition: JinkoujuePositionName; rule: string; isVoid: boolean; }; movements: JinkoujueMovement[]; mainLine: string; /** 四位比合条件:同五行的实际数量与位次;无同五行组合时为空字符串。 */ bihePoem?: string; calculation: { method: JinkoujueDivinationMethod; methodLabel: string; inputBase: number; inputBaseSource: '占时地支序数' | '指定地分' | '用户数字' | '随机数'; diFenNote: string; monthLeaderRule: string; yuanDunRule: string; dayNightRule: string; noblemanRule: string; noblemanDirection: '顺布' | '逆布'; guiShenRule: string; }; focusEvidence?: Array<{ target: string; role: string; level: '主证' | '辅证'; evidence: string[]; limitations: string[]; }>; summary: string; randomTrace?: import('../shared/random').RandomTrace; evidenceAnalysis?: import('../divination/jinkoujue-evidence').JinkoujueEvidenceAnalysis; } export interface BaseGanZhi { year: string; month: string; day: string; hour: string; } export interface BaseYaoDetail { position: number; yaoType: '阳' | '阴'; isChanging: boolean; } export type LiuyaoChangeRelation = '回头生' | '回头克' | '回头冲' | '化空' | '比和' | '化泄' | '化耗'; export interface LiuyaoYaoDetail extends BaseYaoDetail { rawValue: number; changeType: string; sixGod: string; sixRelative: string; najiaDizhi: string; wuxing: string; isWorld: boolean; isResponse: boolean; isVoid: boolean; /** 是否与日辰相冲;结合动静、月破、月令旺相和旬空冲起区分暗动、日破或动爻受冲。 */ isDayClash?: boolean; /** 静爻受日冲而未具暗动资格;暗动另核月破、月令旺相或旬空冲起,动爻受冲读取 isDayClash。 */ isDayBreak?: boolean; isMonthBreak?: boolean; /** 非月破静爻受日冲,且月令旺相或旬空冲起;旬空身份仍保留。 */ isHiddenMove?: boolean; seasonState?: '旺' | '相' | '休' | '囚' | '死' | '平'; changeDirection?: '化进神' | '化退神' | null; /** 旧版单值字段:变爻空亡时仍优先返回“化空”,新代码应读取 changeRelations。 */ changeRelation?: LiuyaoChangeRelation | null; /** 动变五行/冲关系与化空可以并见,按原关系在前、化空在后保存。 */ changeRelations?: LiuyaoChangeRelation[]; changedYao?: { dizhi: string; wuxing: string; liuqin: string; isVoid: boolean; } | null; isSanxing?: boolean; sanxingType?: string; isLiuhe?: boolean; liuhePartner?: string; isLiuhai?: boolean; isRuMu?: boolean; /** 本爻五行对日辰所处的十二长生阶段。 */ dayLifeStage?: string; /** 本爻五行对卦中明动爻地支所处的十二长生阶段。 */ movingLifeStages?: Array<{ position: number; branch: string; stage: string; }>; /** 本爻五行对自身变爻地支所处的十二长生阶段。 */ changedLifeStage?: string; /** 本爻是否入卦中明动墓库。 */ isDongMu?: boolean; /** 本爻发动后是否变入自身五行墓库。 */ isHuaMu?: boolean; shiErGong?: string; /** @deprecated 古籍三墓不含“月墓”;为兼容旧结构保留,始终为 false。 */ isYueMu?: boolean; isRiMu?: boolean; } export interface LiuyaoHiddenSpirit { sixRelative: string; position: number; najiaDizhi: string; wuxing: string; isVoid: boolean; underYao: { position: number; sixRelative: string; najiaDizhi: string; wuxing: string; }; /** 飞伏生克实效断语(依据《增删卜易·伏神章》与《卜筮正宗》) */ interactionEffect?: string; } export type LiuyaoHexagramRelation = '六合卦' | '六冲卦'; export interface LiuyaoHexagramRelations { /** 主卦是否为整卦六合或六冲 */ original: LiuyaoHexagramRelation | null; /** 有动爻时,变卦是否为整卦六合或六冲 */ changed: LiuyaoHexagramRelation | null; /** 如“六冲变六合”“六合变六冲” */ transition: string | null; } export type LiuyaoFanFuScope = '内卦' | '外卦' | '内外'; export type LiuyaoFanFuKind = '卦反吟' | '爻反吟' | '伏吟'; export interface LiuyaoFanFuRelationItem { /** 反吟/伏吟类型 */ kind: LiuyaoFanFuKind; /** 触发在内卦、外卦或内外皆见 */ scope: LiuyaoFanFuScope; /** 面向用户展示的简短标签 */ label: string; /** 触发依据说明 */ description: string; } export interface LiuyaoFanFuRelations { /** 反吟结构,可能同时存在内卦、外卦不同类型 */ fanyin: LiuyaoFanFuRelationItem[]; /** 伏吟结构,按动变后纳甲地支不变识别 */ fuyin: LiuyaoFanFuRelationItem[]; /** 便于前端与提示词直接展示的标签 */ labels: string[]; } export type LiuyaoPalaceStage = '首卦' | '一世' | '二世' | '三世' | '四世' | '五世' | '游魂' | '归魂'; export interface MeihuaYaoDetail extends BaseYaoDetail { tiYong: '体' | '用'; } export interface BaseHexagramData { meta?: CoreResultMeta; originalName: string; changedName?: string; interName?: string; ganzhi: BaseGanZhi; timestamp: number; } export interface LiuyaoData extends BaseHexagramData { /** 起卦时实际采用的民用时区偏移;旧盘未记录时保持原有结构核验。 */ timezoneOffsetMinutes?: number; /** 真太阳时模式下用于节气与月建的实际占时戳(毫秒)。 */ termReferenceTimestamp?: number; /** 用神候选、原神忌神仇神与逐爻支持/反证结构。 */ evidenceAnalysis?: import('../divination/liuyao-evidence').LiuyaoEvidenceAnalysis; /** 起卦来源与三钱投掷轨迹。 */ generation?: { method: 'time' | 'manual' | 'coins' | 'yarrow'; yarrow?: Omit; coinThrows?: Array<{ coins: [2 | 3, 2 | 3, 2 | 3]; total: 6 | 7 | 8 | 9; }>; }; /** 原始摇卦数字数组(6/7/8/9 分别代表老阴/少阳/少阴/老阳) */ yaoArray: number[]; /** 动爻详情:位置、是否变化、变化类型 */ changingYaos: Array<{ position: number; isChanging: boolean; type: string; }>; /** 六神排列(青龙、朱雀、勾陈…),基于起卦日干起 */ sixGods: string[]; /** 六亲排列(父母、兄弟、官鬼…),基于宫位五行定 */ sixRelatives: string[]; /** 纳甲地支:各爻对应的十二地支 */ najiaDizhi: string[]; /** 各爻的五行属性 */ wuxing: string[]; /** 世应位置:[世爻位置, 应爻位置] */ worldAndResponse: string[]; /** 旬空地支(日柱旬空) */ voidBranches: string[]; /** 所属卦宫(八宫之一) */ palace: { name: string; wuxing: string; }; /** 八宫卦序位置:首卦、一世至五世、游魂、归魂 */ palaceStage?: LiuyaoPalaceStage; /** 各爻的完整详情 */ yaosDetail: LiuyaoYaoDetail[]; /** 伏神(伏藏之爻) */ hiddenSpirits?: LiuyaoHiddenSpirit[]; /** 整卦六合/六冲及卦变关系 */ hexagramRelations?: LiuyaoHexagramRelations; /** 六爻卦变反吟/伏吟结构 */ fanfuRelations?: LiuyaoFanFuRelations; /** 特殊卦象标记:静卦、独静卦、全动卦、乾卦用九、坤卦用六 */ specialPattern?: '静卦' | '独静卦' | '全动卦' | '乾卦用九' | '坤卦用六'; specialAdvice?: string; isChaotic?: boolean; chaoticReason?: string; /** 与日支的三合局 */ sanheWithDay?: { group: string; members: string[]; description: string; } | null; /** 与月建的三合局 */ sanheWithMonth?: { group: string; members: string[]; description: string; } | null; /** 爻中的三刑 */ sanxingInYaos?: Array<{ branches: string[]; type: string; }>; /** 卦神(卦身)信息 */ guaShen?: { branch: string; sixRelative: string; position: number; } | null; } export interface MeihuaCalculation { method: string; numbers?: number[]; time?: string; number?: number; soundCount?: number; characterText?: string; characterCount?: number; characterTones?: number[]; characterStrokeCounts?: number[]; characterLeftStrokes?: number; characterRightStrokes?: number; characterUpperNumber?: number; characterLowerNumber?: number; characterRule?: string; direction?: MeihuaDirection; objectType?: MeihuaObjectType; objectTrigramIndex?: number; directionTrigramIndex?: number; totalWithTime?: number; month?: number; day?: number; yearZhi?: string; yearZhiIndex?: number; timeZhi?: string; timeZhiIndex?: number; /** 起卦时采用的民用时区偏移,用于从时间戳复核取数。 */ timezoneOffsetMinutes?: number; upperTrigramIndex?: number; lowerTrigramIndex?: number; movingYaoIndex?: number; methodKey?: MeihuaDivinationMethod; [key: string]: unknown; } export interface MeihuaData extends BaseHexagramData { /** 真太阳时模式下用于节气与月建的实际占时戳(毫秒)。 */ termReferenceTimestamp?: number; /** 主卦、互卦、变卦逐阶段体用关系与支持/限制证据。 */ evidenceAnalysis?: import('../divination/meihua-evidence').MeihuaEvidenceAnalysis; /** 体卦(代表问卦者) */ tiGua: { name: string; element: string; nature: string; }; /** 用卦(代表所问之事) */ yongGua: { name: string; element: string; nature: string; }; /** 变后的体卦(动爻变化导致) */ changedTiGua?: { name: string; element: string; nature: string; } | null; /** 变后的用卦 */ changedYongGua?: { name: string; element: string; nature: string; } | null; /** 互卦中与原体卦同处上/下方位的体互。 */ interTiGua?: { name: string; element: string; nature: string; } | null; /** 互卦中与原用卦同处上/下方位的用互。 */ interYongGua?: { name: string; element: string; nature: string; } | null; /** 动爻位置与描述 */ movingYao: { position: number; description: string; yaoName: string; }; /** 体用生克综合分析 */ analysis: { season: '春' | '夏' | '秋' | '冬'; /** 旺相休囚死采用的月建地支;旧结果可能缺失。 */ monthBranch?: string; /** 月建本气五行;旧结果可能缺失。 */ monthElement?: string; tiYongRelation: string; tiSeasonState: string; yongSeasonState: string; /** 体互与原体的五行关系;字段名为兼容既有结果保留。 */ inter1Relation: string; /** 用互与原体的五行关系;字段名为兼容既有结果保留。 */ inter2Relation: string; changedRelation: string; changedTiYongRelation: string; tiYongRaw?: string; /** 体用旺衰与生克综合断诀(《梅花易数·体用生克篇》) */ tiYongSeasonEvaluation?: string; /** 事态初中终三阶段推进演化趋势(依据《梅花易数·观梅数诀》) */ timelineTrend?: { trend: '先难后易' | '先顺后阻' | '始末顺畅' | '始终受制' | '中途多阻' | '未形成单向走势'; summary: string; }; yingQi?: string[]; }; /** 主卦信息 */ mainHexagram: { name: string; symbol: string; upper: string; lower: string; description: string; yaoCi?: string[]; movingYaoCi?: string; yongCi?: string; }; /** 互卦(代表过程) */ interHexagram?: { name: string; symbol: string; upper: string; lower: string; description: string; yaoCi?: string[]; yongCi?: string; } | null; /** 变卦(代表结果) */ changedHexagram?: { name: string; symbol: string; upper: string; lower: string; description: string; yaoCi?: string[]; yongCi?: string; } | null; /** 各爻详情 */ yaosDetail: MeihuaYaoDetail[]; /** 起卦计算过程 */ calculation?: MeihuaCalculation; } export interface QimenJiuGongGe { gong: number; name: string; direction: string; element: string; tianPan: { star: string; stem: string; /** 转盘法中天禽随天芮同宫时的随行星。 */ companionStar?: string; /** 随行星所携带的中宫地盘干。 */ companionStem?: string; }; diPan: { stem: string; }; renPan: { door: string; }; shenPan: { god: string; }; } export interface QimenSpecialConditions { isLiuJiaHour: boolean; isLiuGuiHour: boolean; isShiGanRuMu: boolean; isRiGanRuMu?: boolean; isWuBuYuShi: boolean; description: string; } export interface QimenTimeInfo { /** 排盘时刻实际所处的天文节气。 */ solarTerm: string; /** 时家/日家拆补或置闰法采用的定局节气;置闰法下可能与 solarTerm 不同。 */ juTerm?: string; epoch: string; [key: string]: string | undefined; } export interface QimenBranchPalace { branch: string; palace: number; name: string; } export interface QimenGanzhiInteraction { type: '六合' | '三合' | '半合' | '六冲' | '相刑' | '相害' | '天干五合' | '天干相冲'; pillars: string[]; values: string[]; description: string; } export interface QimenSeasonalityInfo { currentJieQi: string; seasonalElement: string; /** 交节后按自然日分段的节气内阶段,仅用于节令背景,不作为奇门正式定局三元。 */ jieQiPhase: { jieQi: string; phase: '上元' | '中元' | '下元'; phaseIndex: number; solarTermEvidence: SolarTermEvidence; }; dayStem: string; dayElement: string; seasonRelation: '得时' | '受生' | '受克' | '被耗' | '持平'; seasonRelationDescription: string; lunarPhase: '新月' | '上弦' | '满月' | '下弦'; lunarPhaseDetail: string; moonPhaseEvidence: MoonPhaseEvidence; lunarPhaseConsistency: boolean; dayOfficer: string; dayOfficerFortuneLabel: '吉' | '凶' | '平'; dayOfficerAdvice: string; ganzhiInteractions: QimenGanzhiInteraction[]; } export interface QimenPatternCombo { key: string; name: string; tone: 'super-good' | 'super-bad' | 'mixed'; summary: string; palace?: number; sources: string[]; } /** * 奇门遁甲排盘级别 * - hour: 时家奇门(精确到时辰,默认) * - day: 日家奇门(一日大势) * - month: 月家奇门(一月运势) * - year: 年家奇门(一年大势) */ export type QimenScope = 'hour' | 'day' | 'month' | 'year'; export interface QimenData { /** 本次排盘实际采用的民用钟表时区偏移(分钟);旧记录可缺省。 */ timezoneOffsetMinutes?: number; /** 真太阳时模式下用于节气、定局与月建的实际占时戳(毫秒)。 */ termReferenceTimestamp?: number; /** 用神宫候选、宫内组合、宫间作用、反证与触发条件。 */ evidenceAnalysis?: import('../divination/qimen-evidence').QimenEvidenceAnalysis; /** 九宫排布方法:zhuanpan=转盘法,feipan=飞盘法。旧结果未记录时按转盘法兼容。 */ method?: 'zhuanpan' | 'feipan'; /** 排盘级别:hour=时家, day=日家, month=月家, year=年家 */ scope?: QimenScope; /** 定局方法:chaibu=拆补法(默认),zhirun=置闰法。仅时家/日家生效。 */ juMethod?: 'chaibu' | 'zhirun'; /** 九宫格完整数据(1-9宫) */ jiuGongGe: QimenJiuGongGe[]; /** 四柱干支(年/月/日/时) */ ganzhi: BaseGanZhi; /** 是否为阳遁 */ isYangDun: boolean; /** 局数(1-9) */ juShu: number; /** 值符星名 */ zhiFu: string; /** 值使门名 */ zhiShi: string; /** 基础格局标签列表(如星伏吟、门迫、三奇得等) */ patternTags?: string[]; /** 格局标签的详细解释 */ patternDetails?: Array<{ tag: string; summary: string; }>; /** 各宫位综合洞察评估 */ palaceInsights?: Array<{ gong: number; name: string; level: '有利' | '风险' | '关注'; summary: string; }>; /** 空亡地支 */ voidBranches?: string[]; /** 空亡对应的宫位 */ voidPalaces?: QimenBranchPalace[]; /** 驿马(马星)信息 */ horseStar?: QimenBranchPalace & { sourceBranch: string; }; /** 排盘时间信息(节气、三元等) */ timeInfo: QimenTimeInfo; /** 特殊时辰检查(六甲时、六癸时、时干入墓、五不遇时) */ specialConditions?: QimenSpecialConditions; /** 节令背景(月相、建除、节气内自然日阶段、四柱互动等) */ seasonality?: QimenSeasonalityInfo; /** 经典格局(九遁、三奇得使、天乙等) */ classicPatterns?: Array<{ name: string; type: 'good' | 'bad' | 'neutral'; summary: string; palaces: number[]; }>; /** 各宫天地盘干关系(生克/合/墓/刑) */ stemRelations?: Array<{ gong: number; heavenStem: string; earthStem: string; relation: string; pattern?: string; }>; /** 复合格局(同宫叠加、吉凶混杂、吉格逢空等) */ patternCombos?: QimenPatternCombo[]; /** 方位吉凶建议 */ directions?: { goodDirections: Array<{ gong: number; name: string; direction: string; use: string; reasons: string[]; }>; avoidDirections: Array<{ gong: number; name: string; direction: string; use: string; reasons: string[]; }>; }; /** 应期证据(相对节奏、触发条件与限制;不机械换算固定天数) */ yingQi?: { minDays?: number; maxDays?: number; rhythm: '快' | '中' | '慢'; sources: string[]; triggerConditions: string[]; limitations: string[]; description: string; }; /** Unix 时间戳(毫秒) */ timestamp: number; } /** 奇门终身局人生主题枚举 */ export declare const QIMEN_LIFETIME_TOPICS: readonly ["career", "wealth", "marriage", "health", "academic", "relocation", "family", "children", "partnership"]; export type QimenTopic = (typeof QIMEN_LIFETIME_TOPICS)[number]; /** 奇门终身局阶段引擎策略配置 */ export interface QimenStagePolicy { /** 阶段划分:四柱分限(默认)、九宫巡行、符使交替十年分段、八字交节起运合参奇门本命宫。 */ model: 'pillarFourLimits' | 'palaceWalk' | 'fuShiHexagramOrbit' | 'decadalGanzhi'; /** 分段锚点:出生日期、当年立春当地日期或当年农历正月初一。十年干支大运独立按交节起运。 */ anchorRule?: 'birthInstant' | 'solarTermBoundary' | 'lunarNewYear'; /** 年龄计算体系:fullYears(周岁,默认) | nominalAge(虚岁) */ ageSystem?: 'fullYears' | 'nominalAge'; /** 九宫行限的每阶段跨度年数;十年干支大运固定为十年。 */ yearsPerStage?: number; } /** 奇门终身局输入契约 */ export interface QimenLifetimeInput { /** 出生时刻(ISO 8601 格式,如 "1990-05-15T14:30:00") */ birthDateTime: string; /** 完整出生半开区间;按整秒逐页读取,每页计算一个完整终身局。 */ birthTimeRange?: import('../profile/time-range').BirthProfileTimeRange; /** 区间中的整秒索引,默认从首秒开始。 */ birthRangeIndex?: number; /** IANA 时区标识符(如 "Asia/Shanghai") */ timeZoneId?: string; /** 固定 UTC 偏移(默认 8) */ timezone?: number; /** 出生地点与经纬度(真太阳时必须) */ location?: { longitude: number; latitude?: number; locationName?: string; }; /** 历法类型:solar(公历,默认) | lunar(农历) */ calendarType?: 'solar' | 'lunar'; /** 农历是否闰月 */ isLeapMonth?: boolean; /** 时间标准:civil(民用时间,默认) | trueSolar(真太阳时) */ timeStandard?: 'civil' | 'trueSolar'; /** 是否应用中国 1986-1991 历史夏令时(仅固定偏移模式有效,默认关闭) */ applyChinaDst?: boolean; /** 排盘方法:zhuanpan(转盘法,默认) | feipan(飞盘法) */ method?: 'zhuanpan' | 'feipan'; /** 时家/日家定局方法:chaibu(拆补法,默认) | zhirun(置闰法) */ juMethod?: 'chaibu' | 'zhirun'; /** 阶段划分引擎配置 */ stagePolicy?: QimenStagePolicy; /** 动态扫描的时间范围,未传入则仅返回基础局与阶段结构 */ periodRange?: { startDate: string; endDate: string; }; /** 重点关注的人生主题列表 */ topics?: QimenTopic[]; /** 姓名或代号(仅用于解读展示) */ name?: string; /** 性别(用于流派合参及部分运限顺逆判断) */ gender?: 'male' | 'female'; /** 门派或解读侧重:gongwei(宫位主客), geju(格局克应), zhuke(主客动静) */ schools?: readonly string[]; /** 输出明细级别:compact(默认精简) | full(完整证据链) */ detailMode?: 'compact' | 'full'; } /** 奇门终身局个人标记落宫事实 */ export interface QimenPersonalMarker { /** 标记类型 */ markerType: 'yearStem' | 'yearBranch' | 'dayStem' | 'hourStem' | 'zhiFuStar' | 'zhiShiDoor' | 'companionStem'; /** 干支、门星名称(如 "甲", "子", "天蓬", "开门") */ value: string; /** 所属九宫编号(1-9) */ palace: number; /** 宫位名称(如 "坎一宫") */ palaceName: string; /** 盘面层位 */ layer: 'tianPan' | 'diPan' | 'renPan' | 'shenPan' | 'baseGong'; /** 命理角色与传统意象说明 */ traditionalSignificance: string; } /** 奇门终身局主题宫候选 */ export interface QimenTopicCandidate { topic: QimenTopic; topicName: string; /** 主要候选宫编号 */ primaryPalaces: number[]; /** 辅助参考宫编号 */ secondaryPalaces: number[]; /** 依据来源:六亲生克、八门专司或神煞 */ basis: string; /** 盘面主要吉凶格局呈现 */ patternSummary: string[]; } /** 奇门终身局阶段卡 */ export interface QimenLifetimeStage { /** 阶段索引序号(0开始) */ stageIndex: number; /** 阶段名称(如 "初限·早年根基") */ title: string; /** 起始展示年龄 */ ageStart: number; /** 结束展示年龄 */ ageEnd: number; /** 实际起止公历日期时间 */ calendarStart: string; calendarEnd: string; /** 精确交运区间,起点包含、终点不包含,ISO 时间含时区偏移。 */ startDateTime?: string; endDateTimeExclusive?: string; /** 十年干支大运的本运干支,童限无此字段。 */ ganzhi?: string; /** 主导宫位列表 */ dominantPalaces: Array<{ palace: number; name: string; }>; /** 关联的基础局个人标记 */ associatedMarkers: string[]; /** 阶段核心主线判断 */ stageTheme: string; /** 阶段支持事实 */ supportFacts: string[]; /** 阶段制约与反证事实 */ constraintFacts: string[]; /** 包含的动态事件簇主键引用 */ eventClusterKeys?: string[]; /** 解释边界与限制 */ limitations: string[]; } /** 奇门终身局动态事件簇 */ export interface QimenEventCluster { /** 事件簇唯一标识 */ key: string; /** 归属阶段索引;日期超出已列阶段时为空,仍保留日期关系事实。 */ stageIndex?: number; /** 时间窗口涉及的全部阶段;交运日按精确交运时刻分段解读。 */ stageIndices?: number[]; /** 时间跨度描述(如 "2027年") */ timeSpan: string; /** 可复核的日期级触发事实;不包含评分或未计算的日盘结论。 */ triggerDates?: Array<{ date: string; dateTime?: string; /** 已计算到具体时刻的触发事实,Unix 毫秒;日期级事实省略。 */ timestamp?: number; ganzhi?: string; relation?: string; }>; /** 涉及的人生主题 */ topics: QimenTopic[]; /** 触发盘事实(如流年干支、定局、太岁落宫) */ triggerFact: string; /** 本命盘与动态盘叠合分析 */ interactionAnalysis: string; /** 支持性盘面证据 */ supportEvidence: string[]; /** 反证与制约证据 */ counterEvidence: string[]; /** 相对节奏评估 */ rhythm: '快' | '中' | '慢' | '待机'; /** 留待现实核验与行动复盘的具体问题 */ verificationQuestions: string[]; } /** 奇门终身局分层证据汇编 */ export interface QimenLifetimeEvidence { baseEvidenceAnalysis?: import('../divination/qimen-evidence').QimenEvidenceAnalysis; personalMarkerFacts: Array<{ markerType: string; value: string; palace: number; meaning: string; }>; stageFacts: Array<{ stageIndex: number; title: string; ageRange: string; dominantPalaceNames: string[]; summary: string; }>; dynamicClusterFacts?: Array<{ key: string; timeSpan: string; triggerFact: string; triggerDates?: QimenEventCluster['triggerDates']; rhythm: string; }>; limitations: string[]; } /** 奇门终身局完整输出结构 */ export interface QimenLifetimeData { schemaVersion: '1.0.0'; input: QimenLifetimeInput; /** 本页仅对应指定候选秒;完整来源与续取位置保留。 */ birthRange?: { source: import('../profile/time-range').BirthProfileTimeRange; index: number; timestamp: number; totalSamples: number; nextIndex: number | null; }; basis: { calendar: string; solarTerm: string; timeStandard: string; timeZoneUsed: string; trueSolarOffsetSeconds?: number; isDstApplied?: boolean; crossesDate?: boolean; method: 'zhuanpan' | 'feipan'; juMethod: 'chaibu' | 'zhirun'; stagePolicy: QimenStagePolicy; /** 十年干支大运的起运、顺逆与本命宫定位口径。 */ decadalLuck?: { direction: 'forward' | 'backward'; startDateTime: string; startAge: { years: number; months: number; days: number; hours: number; minutes: number; }; rule: string; mapping: string; }; }; baseChart: QimenData; personalMarkers: QimenPersonalMarker[]; topicCandidates: QimenTopicCandidate[]; stages: QimenLifetimeStage[]; eventClusters?: QimenEventCluster[]; evidenceAnalysis?: QimenLifetimeEvidence; prompt?: string; } export interface LiurenPlateItem { branch: string; under: string; god: string; } export interface LiurenLesson { name: '一课' | '二课' | '三课' | '四课'; upper: string; lower: string; god: string; relation: string; note: string; } export interface LiurenTransmission { stage: '初传' | '中传' | '末传'; branch: string; god: string; relation: string; note: string; wuxing?: string; seasonState?: '旺' | '相' | '休' | '囚' | '死'; isVoid?: boolean; dayRelation?: string; } export interface LiurenClassicalRule { source: string; rule: string; category: string; summary: string; } export type LiurenOrdinaryTransmissionStageId = 'directKe' | 'directBiYong' | 'directSheHai' | 'remoteKe' | 'remoteBiYong' | 'remoteSheHai'; export interface LiurenOrdinaryTransmissionCandidate { key: string; family: 'directKe' | 'remoteKe'; kind: '下贼上' | '上克下' | '蒿矢' | '弹射'; upper: string; sourceLessons: Array<{ position: number; name: LiurenLesson['name']; lower: string; }>; sameYinYangAsDayStem: boolean; harmAssessment?: { walkedBranches: string[]; depth: number; }; status: 'selected' | 'eligible' | 'excluded' | 'suppressedByPrior'; reasons: string[]; } export interface LiurenOrdinaryTransmissionStage { id: LiurenOrdinaryTransmissionStageId; order: number; status: 'selected' | 'matched' | 'notMatched' | 'notApplicable' | 'suppressedByPrior'; conditions: string[]; candidateKeys: string[]; selectedCandidateKey?: string; reason: string; sources: string[]; } export interface LiurenOrdinaryTransmissionAdjudication { key: 'liuren:ordinary-transmission-adjudication'; status: 'selected' | 'deferredToSpecial'; selectedRule: string | null; selectedInitial: string | null; selectedCandidateKey: string | null; candidates: LiurenOrdinaryTransmissionCandidate[]; stages: LiurenOrdinaryTransmissionStage[]; summary: string; sources: string[]; limitation: string; } export interface LiurenGuaTiFact { id: string; stableKey: string; name: string; category: '三传支类' | '三合成局' | '发用临地' | '岁将贵人' | '四课关系' | '贵人临地' | '三传冲合' | '传干生克' | '闭口发用'; branches: string[]; matchedConditions: string[]; sourceTitle: string; sourceUrl: string; sourceQuote: string; } export interface LiurenShenShaFact { name: string; target: string; targetType: '天干' | '地支'; category: '十天干神煞' | '十二地支神煞' | '逐月神煞' | '罗网神煞'; basis: '日干' | '日支' | '月建'; input: string; rule: string; sources: string[]; limitations: string[]; } export interface LiurenData { /** 四课取传、三传推进、旺衰空亡及反证限制。 */ evidenceAnalysis?: import('../divination/liuren-evidence').LiurenEvidenceAnalysis; /** 四柱干支(年/月/日/时) */ ganzhi: BaseGanZhi; /** Unix 时间戳(毫秒) */ timestamp: number; /** 本次起课实际采用的钟表时区偏移(分钟);旧记录可缺省。 */ timezoneOffsetMinutes?: number; /** 真太阳时模式下用于节气、年/月柱与月将的实际占时戳(毫秒)。 */ termReferenceTimestamp?: number; /** 昼夜占:昼占或夜占 */ dayNight?: '昼占' | '夜占'; /** 月将(所用太阳过宫) */ monthLeader: string; /** 占时地支(起课时辰) */ divinationBranch: string; /** @deprecated 旧版误设字段,无独立六壬含义;新结果不再生成。 */ dayOfficer?: string; /** 贵人临支 */ noblemanBranch?: string; /** 贵人所临地盘 */ noblemanGroundBranch?: string; /** 旬空地支 */ xunKong?: string[]; /** 发用规则名称(如涉害、遥克、昴星等九宗门) */ transmissionRule?: string; /** 普通宗门(贼克、比用、涉害、遥克)的候选与优先裁决轨迹 */ ordinaryTransmissionAdjudication?: LiurenOrdinaryTransmissionAdjudication; /** 三传特殊模式:伏吟/反吟/回环/递传 */ transmissionPattern?: '伏吟' | '反吟' | '回环' | '递传'; /** 三传详细说明 */ transmissionDetail?: string; /** 地盘十二支 */ earthlyPlate?: string[]; /** 日干寄宫 */ dayStemResidence?: string; /** 天盘(十二支加十二天将) */ heavenlyPlate: LiurenPlateItem[]; /** 四课 */ fourLessons: LiurenLesson[]; /** 三传(初传/中传/末传) */ threeTransmissions: LiurenTransmission[]; /** 课体标签 */ patternTags?: string[]; /** 经典课体 */ classicalRules?: LiurenClassicalRule[]; /** 四课概要总结 */ lessonSummary?: string; /** 三传概要总结 */ transmissionSummary?: string; /** 课体名称列表 */ guaTi?: string[]; /** 逐项登记、可复算且带固定古籍来源的课体事实 */ guaTiFacts?: LiurenGuaTiFact[]; /** 神煞汇总 */ shenShaSummary?: string[]; /** 可逐项复算的神煞定位事实 */ shenShaFacts?: LiurenShenShaFact[]; /** 天将属性详情 */ tianJiangProps?: Record; focusEvidence?: Array<{ target: string; role: string; level: '主证' | '辅证'; evidence: string[]; limitations: string[]; }>; timingEvidence?: string[]; } export interface TarotData { meta?: CoreResultMeta; spreadType: string; spreadName: string; cards: { id: number; name: string; position: string; reversed: boolean; keywords: string[]; element?: string; archetype?: string; }[]; draw?: { deckSize: number; method: 'Fisher-Yates洗牌后依牌位顺序取顶牌' | '用户按牌位手工录入' | '用户逐张触发前端随机抽取'; orientationRule: '每张牌独立取随机数,小于0.5为逆位,否则为正位' | '正逆位由用户逐张录入'; order: Array<{ index: number; position: string; cardId: number; cardName: string; orientation: '正位' | '逆位'; }>; }; timestamp: number; evidenceAnalysis?: import('../divination/tarot-evidence').TarotEvidenceAnalysis; } export type TarotSpreadType = 'single' | 'three' | 'love' | 'career' | 'decision' | 'celtic' | 'chakra' | 'year' | 'mindBodySpirit' | 'horseshoe' | 'holyTriangle' | 'universal' | 'fourElements' | 'hexagram' | 'relationship' | 'wealth' | 'problemSolving' | 'twelveHouses'; export type LiuyaoTemplateType = 'general' | 'ganqing' | 'shiye' | 'caifu' | 'guaishen'; export type LiurenTemplateType = 'general' | 'ganqing' | 'shiye' | 'caifu'; export type AlmanacTopic = 'marriage' | 'move' | 'opening' | 'contract' | 'travel' | 'medical' | 'study' | 'burial' | 'renovation' | 'custom'; export type AlmanacParticipantGender = '男' | '女' | ''; export type AlmanacWeekendPreference = 'any' | 'prefer' | 'avoid'; export type AlmanacTimePreference = 'work-hours' | 'morning' | 'afternoon'; export interface AlmanacParticipantInput { id: string; name: string; gender: AlmanacParticipantGender; year: string; month: string; day: string; timeIndex: string; dateType: 'solar' | 'lunar'; isLeapMonth?: boolean; /** 有精确出生时刻时保留原始钟表时间,避免案例回落到时辰中点。 */ birthHour?: string; birthMinute?: string; birthSecond?: string; birthPlace?: string; birthLongitude?: string; /** 原始当地钟表时间对应的固定 UTC 偏移。 */ timezone?: number; /** 原始当地钟表时间对应的 IANA 历史时区。 */ timeZoneId?: string; useTrueSolarTime?: boolean; /** 已校正展示字段对应的原始出生记录,供择日按真实瞬时计算节令。 */ originalTrueSolarProfile?: BirthProfile; /** 四柱反推得到的完整北京时间区间;必须与上面的区间起点标量字段一致。 */ birthTimeRange?: BirthProfileTimeRange & { pillars: BaseGanZhi; intervalStart?: string; intervalEnd?: string; }; } export interface AlmanacParticipantProfileSnapshot { id: string; name: string; gender: AlmanacParticipantGender; solarDate: string; lunarDate: string; zodiac: string; constellation: string; dayMaster: string; dayMasterElement: string; pillars: BaseGanZhi; /** 区间内司令变化保留为不同画像,即使增补喜忌同为待判。 */ monthCommander?: string; usefulGods: string[]; avoidGods: string[]; /** 增补喜忌可为空且待判;与原局格神功能分层。 */ incrementStatus?: '已判定' | '部分判定' | '待判'; } export interface AlmanacParticipantProfileRangeBranch { startTimestamp: number; endTimestamp: number; endExclusive: true; profile: AlmanacParticipantProfileSnapshot; } export interface AlmanacParticipantProfile extends AlmanacParticipantProfileSnapshot { birthTimeRange?: { source: BirthProfileTimeRange & { pillars: BaseGanZhi; }; status: 'stable' | 'conditional'; branches: AlmanacParticipantProfileRangeBranch[]; }; } export interface AlmanacAnnualDirectionGod { branch: string; direction: string; god: string; } export type AlmanacRuleFactStatus = '支持' | '限制' | '中性' | '未采用'; export interface AlmanacTopicMatchFact { key: string; scope: '候选日' | '时辰'; topic: AlmanacTopic; topicLabel: string; sourceType: '原始宜项' | '原始忌项' | '建除值日' | '十二神' | '值日神煞事项规则'; status: AlmanacRuleFactStatus; inputItems: string[]; keywords: string[]; matchedItems: string[]; promptText: string; sources: string[]; limitation: string; } export interface AlmanacGodFact { key: string; name: string; classification: '吉神' | '凶神' | '未分级'; status: '已读取'; promptText: string; sources: string[]; limitation: string; } export interface AlmanacParticipantRelationFact { key: string; participantId: string; participantName: string; scope: '候选日' | '时辰'; basis: '年支' | '日支' | '喜用五行' | '忌神五行' | '整体'; candidateValue: string; participantValues: string[]; relation: '冲' | '刑' | '害' | '破' | '命中' | '未命中' | '未见直接冲突' | '未采用'; status: AlmanacRuleFactStatus; detail?: string; promptText: string; sources: string[]; limitation: string; /** 条件范围表示这条关系只在列出的出生时间分支成立。 */ birthTimeRange?: { status: 'stable' | 'conditional'; intervals: Array<{ startTimestamp: number; endTimestamp: number; endExclusive: true; }>; }; } export interface AlmanacDayCandidate { date: string; /** 以该民用日期中国标准时间12:00为统一参照的月相事实,不参与传统宜忌评分。 */ moonPhaseEvidence?: MoonPhaseEvidence; weekday: string; lunarDate: string; ganzhi: { year: string; month: string; day: string; }; zodiac: string; dayOfficer: string; twelveStar: string; twentyEightStar: string; twentyEightStarDetail?: { fullName: string; sevenStar: string; animal: string; zone: string; fortune: string; source: string; } | null; nineStar: string; nineStarDetail?: { fullName: string; color: string; wuxing: string; dipper: string; direction: string; source: string; } | null; gods: string[]; recommends: string[]; avoids: string[]; pengZu: string; pengZuGan?: string; pengZuZhi?: string; clash: string; annualDirectionGods?: AlmanacAnnualDirectionGod[]; highlights: string[]; cautions: string[]; participantNotes: string[]; topicMatchFacts?: AlmanacTopicMatchFact[]; godFacts?: AlmanacGodFact[]; participantRelationFacts?: AlmanacParticipantRelationFact[]; hours?: AlmanacHourCandidate[]; } export interface AlmanacHourCandidate { name: string; range: string; ganzhi: string; branch: string; twelveStar: string; recommends?: string[]; avoids?: string[]; topicMatchFacts?: AlmanacTopicMatchFact[]; highlights: string[]; cautions: string[]; participantNotes: string[]; participantRelationFacts?: AlmanacParticipantRelationFact[]; } export interface AlmanacData { /** 日期约束、传统宜忌、参与人冲突、时辰条件与现实限制。 */ evidenceAnalysis?: import('../divination/almanac-evidence').AlmanacEvidenceAnalysis; topic: AlmanacTopic; topicLabel: string; startDate: string; endDate: string; weekendPreference?: AlmanacWeekendPreference; timePreferences?: AlmanacTimePreference[]; days: AlmanacDayCandidate[]; participants: AlmanacParticipantProfile[]; timestamp: number; } export type LenormandSpreadType = 'single' | 'three' | 'five' | 'relationship' | 'decision' | 'nine' | 'element' | 'grandTableau'; export type LenormandCombinationRelation = '牌序相邻' | '横向相邻' | '纵向相邻' | '对角相邻'; export interface LenormandData { meta?: CoreResultMeta; spreadType: LenormandSpreadType; spreadName: string; draw?: { deckSize: number; method: 'Fisher-Yates洗牌后依牌位顺序取顶牌' | '用户按牌位手工录入' | '用户逐张触发前端随机抽取'; order: Array<{ index: number; position: string; cardId: number; cardName: string; house?: string; row?: number; column?: number; }>; }; cards: { id: number; name: string; position: string; keywords: string[]; meaning: string; house?: string; row?: number; column?: number; }[]; combinations?: Array<{ card1: string; card2: string; position1?: string; position2?: string; relation?: LenormandCombinationRelation; rowDistance?: number; columnDistance?: number; meaning: string; source?: '固定组合' | '相邻牌义合读'; }>; layoutEvidence?: string[]; timestamp: number; evidenceAnalysis?: import('../divination/lenormand-evidence').LenormandEvidenceAnalysis; } export interface AstrolabeBirthInput { name: string; gender: AlmanacParticipantGender; year: string; month: string; day: string; hour: string; minute: string; /** 可选出生秒数;省略时按 0 秒计算。 */ second?: string; latitude: string; longitude: string; timezone?: string; timeZoneId?: string; locationName?: string; useTrueSolarTime?: boolean; /** 坐标精度来源:user-provided 为用户精确坐标,其余见出生地点解析登记 */ coordinateAccuracy?: string; } export interface AstrolabePoint { name: string; label: string; longitude: number; /** 底层星历位置的黄道纬度,单位为度;仅实体星体有真实值,节点、莉莉丝和衍生点不填。 */ latitude?: number; /** 底层星历位置的地心距离,单位为 AU;仅实体星体有真实值,节点、莉莉丝和衍生点不填。 */ distance?: number; /** 底层星历位置的黄经日运动,单位为度/日;仅底层提供运动速度的点位有此字段。 */ longitudeSpeed?: number; sign: string; degree: number; minute: number; /** 位置度分秒中的角秒,单位为角秒;四轴与宫头也可提供。 */ second?: number; house: number; formatted: string; retrograde?: boolean; /** 行星本征尊贵力量(入庙、曜升、落陷、坠落) */ dignity?: 'domicile' | 'exaltation' | 'detriment' | 'fall'; /** 行星本征尊贵力量中文标签(入庙、曜升、落陷、坠落) */ dignityLabel?: string; } export interface AstrolabeAspect { body1: string; body2: string; type: string; symbol: string; /** 相位类型的标准精确角。旧结果可能缺少。 */ exactAngle?: number; /** 两计算点黄经的实际最小夹角。旧结果可能缺少。 */ actualAngle?: number; orb: number; /** 底层相位筛选的原始强度(无单位,范围为 0-100);旧手工结果可缺省。 */ strength?: number; /** 本次相位筛选采用的允许容许度。旧结果可能缺少。 */ allowedOrb?: number; closeness?: '紧密' | '中等' | '宽松'; normalizedOrbRatio?: number; /** 是否为跨星座相位。旧结果可能缺少。 */ isOutOfSign?: boolean; source?: string; applying: boolean | null; } export interface AstrolabeData { houseSystem?: 'placidus' | 'whole_sign'; /** 本次排盘明确采用的月球交点模型;旧盘未记录时省略。 */ lunarNodeType?: 'true'; /** 与福点、精神点计算使用同一太阳地平线上下判定。 */ dayChart?: boolean; ephemerisWarnings?: string[]; /** 星体、四轴、相位、反证、计算链与解释限制。 */ evidenceAnalysis?: import('../divination/astrolabe-evidence').AstrolabeEvidenceAnalysis; birth: { name: string; gender: AlmanacParticipantGender; dateTime: string; /** 显式提供出生秒数时保留原始秒;旧的分钟输入继续省略。 */ second?: number; location: string; latitude?: number; longitude?: number; timezone: number; timeZoneId?: string; timezoneStatus?: 'unique' | 'ambiguous'; timezoneDiagnostics?: string[]; timezoneEvidence?: HistoricalTimezoneEvidence; standardDateTime?: string; trueSolarDateTime?: string; trueSolarEvidence?: TrueSolarTimeEvidenceFields; isTrueSolarTime?: boolean; /** 坐标精度来源,未提供时为 undefined */ coordinateAccuracy?: string; }; planets: AstrolabePoint[]; angles: AstrolabePoint[]; houses: AstrolabePoint[]; aspects: AstrolabeAspect[]; solarIllumination?: SolarIlluminationEvidence; summary: { elements: Record; modalities: Record; retrograde: string[]; patterns: string[]; /** 旧盘未记录格局是否经过当前相位清单核验。 */ patternBasis?: 'ten-main-bodies-selected-aspects'; }; timestamp: number; } export type AstrolabeSynastryAspectType = '合相' | '六合' | '刑相' | '拱相' | '冲相'; export interface AstrolabeSynastryAspect { key: string; status: '已命中'; person1: string; person2: string; point1Name: string; point2Name: string; point1: string; point2: string; type: AstrolabeSynastryAspectType; symbol: string; exactAngle: number; actualAngle: number; orb: number; allowedOrb: number; closeness: '紧密' | '中等' | '宽松'; orbRatio: number; source: string; sourcePointKey: string; targetPointKey: string; calculationStepKey: 'astrolabe:synastry:calculation:aspect-filter'; promptText: string; sources: string[]; limitation: '跨盘相位只证明双方计算点黄经最小夹角进入所设相位角与容许度范围;和谐或紧张标签不等于现实关系好坏、匹配程度、事件结果或发生概率'; tendency: '和谐' | '紧张' | '中性'; tags: string[]; } export interface AstrolabeHouseOverlay { key: string; status: '已定位'; ownerPerson: 'person1' | 'person2'; visitorPerson: 'person1' | 'person2'; owner: string; visitor: string; pointName: string; point: string; house: number; longitude: number; houseStart: number; houseEnd: number; ownerChartKey: string; visitorPointKey: string; calculationStepKey: 'astrolabe:synastry:calculation:house-overlays'; promptText: string; sources: string[]; limitation: '跨盘落宫只证明访客计算点黄经位于宫主本命盘某一宫头区间;不证明现实事件、关系角色、他人意图、匹配程度或固定应期'; } export interface AstrolabeSynastryCalculationStep { key: string; stage: '双盘输入校验' | '计算点筛选' | '跨盘角距计算' | '相位容许度筛选' | '宫头区间校验' | '跨盘落宫定位' | '证据汇总'; status: '已计算'; inputs: Record; result: Record; dependsOnStepKeys: string[]; promptText: string; sources: string[]; limitation: '计算步骤只证明双方本命计算点、黄经、容许度与宫头区间经过固定几何规则形成当前相位和落宫事实,不证明现实关系、匹配程度、事件概率或固定应期'; } export interface AstrolabeSynastryCounterEvidenceFact { key: string; type: '主要相位覆盖' | '跨盘落宫覆盖' | '关系类型覆盖' | '静态应期边界'; status: '有可用证据' | '未命中' | '已关闭' | '资料不足' | '存在多类关系' | '单一类型' | '固有限制'; ownerFactKeys: string[]; promptText: string; sources: string[]; limitation: '反证事实只记录主要相位、跨盘落宫、关系类型与静态应期的覆盖情况;未命中不等于关系有利或不利,命中也不证明现实结果'; } export interface AstrolabeSynastrySummaryFact { key: 'astrolabe:synastry:evidence-summary'; status: '相位与落宫均有证据' | '仅见相位证据' | '仅见落宫证据' | '未见已列交叉事实'; factKeys: string[]; selectedPointCount1: number; selectedPointCount2: number; evaluatedPairCount: number; matchedAspectCount: number; returnedAspectCount: number; truncatedAspectCount: number; houseOverlayCount: number; coreHouseOverlayCount: number; aspectTypeCounts: Partial>; tendencyCounts: Record<'和谐' | '紧张' | '中性', number>; promptText: string; sources: string[]; limitation: '双盘证据汇总只统计几何相位、容许度筛选与落宫定位事实,不得按数量生成匹配分、成功率、关系概率、吉凶结论或唯一应期'; } export interface AstrolabeSynastryLimitationFact { key: string; type: '相位几何边界' | '容许度与截断边界' | '落宫资料边界' | '关系类型边界' | '静态应期边界' | '高风险输出边界'; status: '适用'; ownerFactKeys: string[]; promptText: string; sources: string[]; limitation: '限制事实用于约束跨盘相位与落宫能够支持的解释范围,不得被反向当作现实关系结果、他人意图、吉凶概率或保证有效建议的证据'; } export interface AstrolabeSynastryData { key: 'astrolabe:synastry:evidence'; status: '已计算'; people: [string, string]; calculationSteps: AstrolabeSynastryCalculationStep[]; calculationChain: string[]; aspects: AstrolabeSynastryAspect[]; houseOverlays: AstrolabeHouseOverlay[]; receptions?: Array<{ type: '互溶' | '接纳'; person1Planet: string; person2Planet: string; person1PlanetLabel: string; person2PlanetLabel: string; sign1: string; sign2: string; summary: string; }>; receptionSummary?: string; summary: { totalAspects: number; harmonious: number; tense: number; neutral: number; tightAspects: number; closestAspects: AstrolabeSynastryAspect[]; }; counterEvidence: string[]; counterEvidenceFacts: AstrolabeSynastryCounterEvidenceFact[]; summaryFact: AstrolabeSynastrySummaryFact; limitations: string[]; limitationFacts: AstrolabeSynastryLimitationFact[]; evidence: import('../prompt-evidence/types').PromptEvidenceBundle; promptText: string; methodology: { aspectAngles: Record; defaultOrbs: Record; notes: string[]; }; timestamp: number; } export type TaiyiScope = 'year' | 'month' | 'day' | 'hour'; export interface TaiyiModelInfo { id: string; name: string; supportedScopes: TaiyiScope[]; precision: string; sources: { title: string; url: string; evidence: string; }[]; } export interface TaiyiResult { scope: TaiyiScope; ganZhi: string; dateTime: string; /** 真太阳时起局时,用于节气与年月干支的实际占时。 */ termReferenceDateTime?: string; accumulatedValue: number; accumulatedLabel: '积年' | '积月' | '积日' | '积时'; /** @deprecated 年家兼容字段;其他计式与 accumulatedValue 相同。 */ accumulatedYears: number; entryYears: number; /** @deprecated 360 周期内的 72 数段序号,不等同于已经统一版本口径的“元”。 */ yuan: number; /** @deprecated 360 周期内的 60 数段序号,不等同于已经统一版本口径的“纪”。 */ ji: number; yinYang: '阳遁' | '阴遁'; bureau: number; taiyiPosition: string; taiyiPalace: number; taiyiGua: string; taiyiDir: string; wenChangPosition: string; wenChangPalace: number; shiJiPosition: string; shiJiPalace: number; jiShenPosition: string; jiShenPalace: number; lordCount: number; guestCount: number; setCount: number; /** 主客定算策数定性(和数、纯阴、纯阳、杂阴阳等) */ countNatures?: { lord?: string; guest?: string; set?: string; }; /** 大局攻守与策数博弈定性 */ tacticGuidance?: string; lordGeneral: number; lordAssistant: number; guestGeneral: number; guestAssistant: number; setGeneral: number; setAssistant: number; sixteenGods: { branch: string; god: string; }[]; /** 三门、五将与阴阳和的盘面条件;只记录可复算关系,不生成成败分数。 */ conditions: import('../taiyi/conditions').TaiyiRuleConditions; judgments: string[]; model: TaiyiModelInfo; evidenceAnalysis: import('../taiyi/evidence').TaiyiEvidenceAnalysis; prompt: string; } export interface SsgwData { meta?: CoreResultMeta; number: number; title: string; poem: string; story?: string; details?: { [key: string]: string; }; timestamp: number; ganzhi: BaseGanZhi; draw?: { method?: 'random' | 'manual'; poolSize: number; selectedIndex: number | null; selectedNumber: number; }; } export type DivinationData = LiuyaoData | MeihuaData | XiaoliurenData | JinkoujueData | QimenData | LiurenData | TarotData | SsgwData | ZhugeNumberResult | KongmingHexagramResult | AlmanacData | LenormandData | AstrolabeData | TaiyiResult | HuangjiJingshiResult | WuyunLiuqiResult; export interface SupplementaryInfo { /** 求测人性别,用于补充解读背景,不参与起盘算法。 */ gender?: '男' | '女'; /** 求测人出生年份;奇门同时用于年命换算。 */ birthYear?: number; userSupplement?: string; currentSituation?: string; currentState?: string; knownFacts?: string; desiredOutcome?: string; constraints?: string; meihuaSettings?: MeihuaSettings; }