@lmzhen/dsh-evolution-merge-engine 0.29.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 CHANGED
@@ -31,5 +31,18 @@ export declare function probe(cfg?: EngineCfg): {
31
31
  ranker: string
32
32
  onnx: boolean
33
33
  }
34
- export declare function ensureModels(): Promise<never>
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
+ }
35
48
  export declare function selectCandidates(report: Record<string, unknown>): unknown
package/lib/index.js CHANGED
@@ -1888,7 +1888,7 @@ function validateRegistry(reg) {
1888
1888
  return reg;
1889
1889
  }
1890
1890
  function defaultRegistryPath() {
1891
- return path6.join(__dirname, "..", "..", "models", "registry.json");
1891
+ return path6.join(__dirname, "vendor", "skill-merge-pipeline", "models", "registry.json");
1892
1892
  }
1893
1893
  function loadRegistry(file) {
1894
1894
  const f = file || defaultRegistryPath();
@@ -5701,8 +5701,10 @@ function probe(cfgInput) {
5701
5701
  const models = int8 && pca && existsSync(int8) && existsSync(pca) ? "ok" : "missing";
5702
5702
  return { models, judge: cfg.judge === "deepseek" ? "platform" : "stub", ranker: cfg.rank_mode === "vec" ? "vec" : "auto", onnx: false };
5703
5703
  }
5704
- async function ensureModels2() {
5705
- throw new Error("ensureModels is implemented in G3");
5704
+ async function ensureModels2(cfgInput) {
5705
+ const cfg = makeConfig(cfgInput ?? {});
5706
+ const resolved = await resolveModels({ cfg, rootDir: cfg.models_dir || void 0 });
5707
+ return { ok: true, models: "ok", dirs: resolved.dirs };
5706
5708
  }
5707
5709
 
5708
5710
  // dsh-evolution-mirror/packages/evolution-merge-engine/src/report-map.js
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-merge-engine",
3
3
  "description": "Vendored skill-merge Node pipeline engine (byte-identical upstream) for DSH evolution-merge (community build)",
4
- "version": "0.29.0",
4
+ "version": "0.30.0",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",