@specverse/engines 6.21.0 → 6.21.1
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.
|
@@ -18,11 +18,17 @@ export type BackendName = 'codegraph' | 'gitnexus' | 'grep-only' | 'auto';
|
|
|
18
18
|
/**
|
|
19
19
|
* Select a backend by name, or auto-pick a sensible default.
|
|
20
20
|
*
|
|
21
|
-
* `auto` semantics:
|
|
22
|
-
* -
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
21
|
+
* `auto` semantics (engines 6.21.x onward):
|
|
22
|
+
* - GitNexus available → GitNexus. Richest, empirically validated
|
|
23
|
+
* across twenty + idle_meta cases. Slightly heavier index step
|
|
24
|
+
* than CodeGraph but produces better cluster quality for behavior
|
|
25
|
+
* extraction (#27 substrate).
|
|
26
|
+
* - CodeGraph + sqlite3 available → CodeGraph as fallback. Recent
|
|
27
|
+
* CodeGraph CLI releases (≥0.7) changed the edges-table schema
|
|
28
|
+
* (`source`/`target` cols replacing `from_id`/`to_id`); our
|
|
29
|
+
* queries don't yet handle the new shape, so it errors loudly on
|
|
30
|
+
* fresh databases. GitNexus is the better default.
|
|
31
|
+
* - Otherwise → grep-only (always works, no external tools).
|
|
26
32
|
*/
|
|
27
33
|
export declare function selectBackend(name?: BackendName): StructuralPrepass;
|
|
28
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/analyse-prepass/backends/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC;AAE9D,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,CAAC;AAE1E
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/analyse-prepass/backends/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC;AAE9D,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,CAAC;AAE1E;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,IAAI,GAAE,WAAoB,GAAG,iBAAiB,CA6B3E"}
|
|
@@ -5,11 +5,17 @@ export { GrepOnlyBackend, CodeGraphBackend, GitNexusBackend };
|
|
|
5
5
|
/**
|
|
6
6
|
* Select a backend by name, or auto-pick a sensible default.
|
|
7
7
|
*
|
|
8
|
-
* `auto` semantics:
|
|
9
|
-
* -
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
8
|
+
* `auto` semantics (engines 6.21.x onward):
|
|
9
|
+
* - GitNexus available → GitNexus. Richest, empirically validated
|
|
10
|
+
* across twenty + idle_meta cases. Slightly heavier index step
|
|
11
|
+
* than CodeGraph but produces better cluster quality for behavior
|
|
12
|
+
* extraction (#27 substrate).
|
|
13
|
+
* - CodeGraph + sqlite3 available → CodeGraph as fallback. Recent
|
|
14
|
+
* CodeGraph CLI releases (≥0.7) changed the edges-table schema
|
|
15
|
+
* (`source`/`target` cols replacing `from_id`/`to_id`); our
|
|
16
|
+
* queries don't yet handle the new shape, so it errors loudly on
|
|
17
|
+
* fresh databases. GitNexus is the better default.
|
|
18
|
+
* - Otherwise → grep-only (always works, no external tools).
|
|
13
19
|
*/
|
|
14
20
|
export function selectBackend(name = 'auto') {
|
|
15
21
|
if (name === 'codegraph') {
|
|
@@ -27,7 +33,11 @@ export function selectBackend(name = 'auto') {
|
|
|
27
33
|
if (name === 'grep-only') {
|
|
28
34
|
return new GrepOnlyBackend();
|
|
29
35
|
}
|
|
30
|
-
// auto — prefer
|
|
36
|
+
// auto — prefer GitNexus (richest + empirically validated); fall back
|
|
37
|
+
// to CodeGraph (with caveat noted in the docstring); fall back to grep.
|
|
38
|
+
if (GitNexusBackend.isAvailable()) {
|
|
39
|
+
return new GitNexusBackend();
|
|
40
|
+
}
|
|
31
41
|
if (CodeGraphBackend.isAvailable()) {
|
|
32
42
|
return new CodeGraphBackend();
|
|
33
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/analyse-prepass/backends/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC;AAI9D
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/analyse-prepass/backends/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC;AAI9D;;;;;;;;;;;;;;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