/** * streaming-analyzer — 流式全局分析引擎(v6.74.0) * * 把"四层批处理"升级为"七阶段流处理": * Phase 0: 快速全局扫描(所有端并行索引) * Phase 1: 后端拓扑排序分析(从依赖源头开始,逐模块深入) * Phase 2: 后端完成后全局实时更新 * Phase 3: 前端逐个分析 * Phase 4: 横向关联检查(前后端字段/接口一致性) * Phase 5: 纵向关联检查(功能模块跨端完整性) * Phase 6: 最终核对检查(完整性 + 一致性 + 遗漏检测) * * 核心机制: * - 每 Phase 产出写入文件,作为后续 Phase 的输入 * - 实时关联调整:当前 Phase 发现与前期文档冲突时,提示回退修正 * - 知识图谱实时刷新:每 Phase 完成后刷新图谱 */ export type AnalyzePhase = 'phase0-scan' | 'phase1-backend' | 'phase2-global-update' | 'phase3-frontend' | 'phase4-cross-check' | 'phase5-vertical-check' | 'phase6-final-audit'; export interface PhaseContext { iteration: string; phase: AnalyzePhase; platforms: string[]; platformTypes: Map; completedPhases: AnalyzePhase[]; backtrackNeeded?: boolean; backtrackTargets?: string[]; auditIssues?: AuditIssue[]; } export interface AuditIssue { severity: 'error' | 'warning' | 'info'; category: 'missing-doc' | 'inconsistent-field' | 'missing-api' | 'missing-test' | 'orphan-code' | 'stale-global'; description: string; affectedFiles: string[]; suggestion: string; } export interface StreamingConfig { enableRealtimeUpdate: boolean; enableBacktrack: boolean; enableFinalAudit: boolean; backendFirst: boolean; } export declare const DEFAULT_STREAMING_CONFIG: StreamingConfig; /** * 生成指定 Phase 的 Prompt */ export declare function buildPhasePrompt(ctx: PhaseContext): Promise; /** * 检测当前分析结果是否需要回退修正已分析的文档 */ export declare function detectBacktrackingNeeds(iterDir: string, currentPhase: AnalyzePhase): Promise<{ needed: boolean; targets: string[]; reasons: string[]; }>; /** * 执行最终核对检查,返回发现的问题列表 */ export declare function runFinalAudit(iterDir: string): Promise; /** * 获取 Phase 顺序 */ export declare function getPhaseSequence(): AnalyzePhase[]; /** * 获取 Phase 的中文名称 */ export declare function getPhaseDisplayName(phase: AnalyzePhase): string; /** * 检测后端端之间的依赖拓扑顺序 * 简化版:基于 FUNCTION_MAP.md 中的依赖关系排序 */ export declare function detectBackendDependencyOrder(iterDir: string, backendPlatforms: string[]): Promise; //# sourceMappingURL=streaming-analyzer.d.ts.map