/** * 八字根气与直接六冲事实。 * * 该模块只收集可由四柱、藏干和公共六冲表直接证明的事实: * - 同类藏干根来自哪一柱、哪一支、哪一层; * - 该根所在支是否被外柱对冲; * - 对冲来源的实际柱位和地支。 * * 不在此处判定身强身弱、拔根程度、格局成败或合会是否成化。 */ import type { HiddenStems, Wuxing } from './baziTypes'; export declare const ROOT_PILLAR_POSITIONS: readonly ["year", "month", "day", "hour"]; export type RootPillarPosition = (typeof ROOT_PILLAR_POSITIONS)[number]; export type RootPillars = Record; export type RootHiddenRole = '本气' | '中气' | '余气'; export type RootTraditionalKind = '本气' | '生禄' | '余气' | '正库' | '弱藏'; export interface RootClashSource { position: RootPillarPosition; branch: string; relation: '六冲'; } export interface SameElementRootFact { position: RootPillarPosition; branch: string; stem: string; hiddenIndex: number; hiddenRole: RootHiddenRole; /** * 仅表示该根没有直接六冲来源;不是“根气未失效”的最终裁决。 */ stable: boolean; clashSources: RootClashSource[]; } export type RootSemanticFact = Pick; /** 长生、临官、帝旺仍是化气返性所用的强根阶段门槛。 */ export declare function hasStrongRootStage(root: Pick): boolean; /** * 数组中的本气/中气/余气是固定位置标签;传统根类另按实际支藏身份与十二长生判定。 * 四库第二项为季余气、末项为对应五行正库,不能按数组第二、第三项直接互换概念。 */ export declare function getRootTraditionalKind(root: RootSemanticFact): RootTraditionalKind; /** 格局与扶抑链可采用的结构根;冲后能否作用仍由上层 actionable 裁决。 */ export declare function isStructuralRoot(root: RootSemanticFact): boolean; /** * 返回某根支遭遇的所有直接六冲来源;同一支的重复出现按柱位分别保留。 */ export declare function getDirectClashSources(branch: string, ownPosition: RootPillarPosition, pillars: RootPillars): RootClashSource[]; /** * 收集指定五行在四支藏干中的全部根事实。 * * 同一地支的本气、中气、余气都各自保留,调用者可按旧契约选择是否把 * 本气单独映射为明根;这里不做权重、去重或强弱裁决。 */ export declare function collectSameElementRootFacts(pillars: RootPillars, hiddenStems: HiddenStems, targetElement: Wuxing, getWuxing: (value: string) => string): SameElementRootFact[];