@aligndottech/cli 0.60.0 → 0.61.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/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/capture.js +8 -0
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +26 -9
- package/dist/commands/import.js.map +1 -1
- package/dist/lib/approve-suggestions.d.ts +26 -0
- package/dist/lib/approve-suggestions.d.ts.map +1 -0
- package/dist/lib/approve-suggestions.js +39 -0
- package/dist/lib/approve-suggestions.js.map +1 -0
- package/dist/lib/gateway-client.d.ts.map +1 -1
- package/dist/lib/gateway-client.js +15 -6
- package/dist/lib/gateway-client.js.map +1 -1
- package/dist/lib/hybrid-rank.d.ts +20 -0
- package/dist/lib/hybrid-rank.d.ts.map +1 -0
- package/dist/lib/hybrid-rank.js +30 -0
- package/dist/lib/hybrid-rank.js.map +1 -0
- package/dist/lib/lexical-store.d.ts +29 -0
- package/dist/lib/lexical-store.d.ts.map +1 -0
- package/dist/lib/lexical-store.js +143 -0
- package/dist/lib/lexical-store.js.map +1 -0
- package/dist/lib/lexical-terms.d.ts +28 -0
- package/dist/lib/lexical-terms.d.ts.map +1 -0
- package/dist/lib/lexical-terms.js +89 -0
- package/dist/lib/lexical-terms.js.map +1 -0
- package/dist/lib/lexical-text.d.ts +19 -0
- package/dist/lib/lexical-text.d.ts.map +1 -0
- package/dist/lib/lexical-text.js +40 -0
- package/dist/lib/lexical-text.js.map +1 -0
- package/dist/lib/llm-trace.d.ts +15 -0
- package/dist/lib/llm-trace.d.ts.map +1 -0
- package/dist/lib/llm-trace.js +37 -0
- package/dist/lib/llm-trace.js.map +1 -0
- package/dist/lib/local-db-migrate.d.ts.map +1 -1
- package/dist/lib/local-db-migrate.js +7 -0
- package/dist/lib/local-db-migrate.js.map +1 -1
- package/dist/lib/local-db.d.ts +3 -0
- package/dist/lib/local-db.d.ts.map +1 -1
- package/dist/lib/local-db.js +6 -0
- package/dist/lib/local-db.js.map +1 -1
- package/dist/lib/local-gateway-client.d.ts.map +1 -1
- package/dist/lib/local-gateway-client.js +28 -6
- package/dist/lib/local-gateway-client.js.map +1 -1
- package/dist/lib/local-llm.d.ts +4 -13
- package/dist/lib/local-llm.d.ts.map +1 -1
- package/dist/lib/local-llm.js +30 -1
- package/dist/lib/local-llm.js.map +1 -1
- package/dist/lib/local-thresholds.d.ts +8 -0
- package/dist/lib/local-thresholds.d.ts.map +1 -1
- package/dist/lib/local-thresholds.js +8 -0
- package/dist/lib/local-thresholds.js.map +1 -1
- package/dist/lib/query-expand.d.ts +13 -0
- package/dist/lib/query-expand.d.ts.map +1 -0
- package/dist/lib/query-expand.js +21 -0
- package/dist/lib/query-expand.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Query understanding without a model (ALI-1749). Turns a question into weighted lexical terms:
|
|
3
|
+
* every content word at weight 1 (scaffolding such as "why was" is dropped by `tokenize`), and a
|
|
4
|
+
* quoted phrase or a backticked identifier at double weight, because the user marked it as the
|
|
5
|
+
* thing they mean.
|
|
6
|
+
*
|
|
7
|
+
* Verb synonyms ("dropped" also searches remove/delete/retire) were built and measured on the
|
|
8
|
+
* 9-repo eval, and they lowered recall@3 and MRR, so they are not here: the title rerank and the
|
|
9
|
+
* dense ranking already carry the verb. Do not add them back without a harness run that beats it.
|
|
10
|
+
*/
|
|
11
|
+
export declare const QUOTED_WEIGHT = 2;
|
|
12
|
+
export declare function expandedTerms(query: string): Map<string, number>;
|
|
13
|
+
//# sourceMappingURL=query-expand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-expand.d.ts","sourceRoot":"","sources":["../../src/lib/query-expand.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAMhE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { queryTerms, tokenize } from './lexical-terms.js';
|
|
2
|
+
/**
|
|
3
|
+
* Query understanding without a model (ALI-1749). Turns a question into weighted lexical terms:
|
|
4
|
+
* every content word at weight 1 (scaffolding such as "why was" is dropped by `tokenize`), and a
|
|
5
|
+
* quoted phrase or a backticked identifier at double weight, because the user marked it as the
|
|
6
|
+
* thing they mean.
|
|
7
|
+
*
|
|
8
|
+
* Verb synonyms ("dropped" also searches remove/delete/retire) were built and measured on the
|
|
9
|
+
* 9-repo eval, and they lowered recall@3 and MRR, so they are not here: the title rerank and the
|
|
10
|
+
* dense ranking already carry the verb. Do not add them back without a harness run that beats it.
|
|
11
|
+
*/
|
|
12
|
+
export const QUOTED_WEIGHT = 2;
|
|
13
|
+
export function expandedTerms(query) {
|
|
14
|
+
const terms = queryTerms(query);
|
|
15
|
+
for (const m of query.matchAll(/`([^`]+)`|"([^"]+)"/g)) {
|
|
16
|
+
for (const t of tokenize(m[1] ?? m[2] ?? ''))
|
|
17
|
+
terms.set(t, QUOTED_WEIGHT);
|
|
18
|
+
}
|
|
19
|
+
return terms;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=query-expand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-expand.js","sourceRoot":"","sources":["../../src/lib/query-expand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC;AAE/B,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IAChC,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,CAAC;QACvD,KAAK,MAAM,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YAAE,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;IAC5E,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|