@lmzhen/dsh-evolution-merge-engine 0.0.0 → 0.30.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/lib/index.d.ts ADDED
@@ -0,0 +1,48 @@
1
+ export interface EngineCfg {
2
+ [key: string]: unknown
3
+ }
4
+ export interface ScreenInput {
5
+ corpusDir: string
6
+ outDir: string
7
+ cfg?: EngineCfg
8
+ signal?: AbortSignal
9
+ onProgress?: (p: { stage: string; done?: number; total?: number }) => void
10
+ runner?: (prompt: string, cfg?: Record<string, unknown>) => Promise<string>
11
+ onUsage?: (u: unknown) => void
12
+ }
13
+ export interface EngineReport {
14
+ reportDoc: Record<string, unknown>
15
+ sections: Record<string, unknown>
16
+ degradation: unknown
17
+ strictFail: boolean
18
+ envelope: Record<string, unknown>
19
+ }
20
+ export type ScreenResult =
21
+ | { ok: true; report: EngineReport }
22
+ | { ok: false; error: { code: string; stage?: string; retryable?: boolean; detail?: string; exitCode?: number } }
23
+ export declare function runPipeline(input: Record<string, unknown>): Promise<unknown>
24
+ export declare function buildScanStages(): unknown[]
25
+ export declare function makeConfig(overrides?: Record<string, unknown>): Record<string, unknown>
26
+ export declare function runScan(input: Record<string, unknown>): Promise<unknown>
27
+ export declare function screen(input: ScreenInput): Promise<ScreenResult>
28
+ export declare function probe(cfg?: EngineCfg): {
29
+ models: 'ok' | 'missing' | 'partial'
30
+ judge: string
31
+ ranker: string
32
+ onnx: boolean
33
+ }
34
+ export declare function ensureModels(cfg?: EngineCfg): Promise<{ ok: true; models: 'ok'; dirs: Record<string, string> }>
35
+ export declare function pairKeyOf(a: string, b: string): string
36
+ export declare function toEngineCandidate(
37
+ p: Record<string, unknown>,
38
+ fallback?: string,
39
+ ): {
40
+ readonly a: string
41
+ readonly b: string
42
+ readonly score?: number
43
+ readonly arms: readonly unknown[]
44
+ readonly reason?: string
45
+ readonly source: string
46
+ readonly gate?: unknown
47
+ }
48
+ export declare function selectCandidates(report: Record<string, unknown>): unknown