lmgrep 0.1.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/README.md +181 -0
- package/completions/_lmgrep +88 -0
- package/dist/chunker/context.d.ts +25 -0
- package/dist/chunker/context.js +204 -0
- package/dist/chunker/context.js.map +1 -0
- package/dist/chunker/index.d.ts +3 -0
- package/dist/chunker/index.js +145 -0
- package/dist/chunker/index.js.map +1 -0
- package/dist/chunker/languages.d.ts +15 -0
- package/dist/chunker/languages.js +251 -0
- package/dist/chunker/languages.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +69 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.js +31 -0
- package/dist/config.js.map +1 -0
- package/dist/embedder.d.ts +3 -0
- package/dist/embedder.js +55 -0
- package/dist/embedder.js.map +1 -0
- package/dist/index-cmd.d.ts +9 -0
- package/dist/index-cmd.js +250 -0
- package/dist/index-cmd.js.map +1 -0
- package/dist/mcp.d.ts +2 -0
- package/dist/mcp.js +80 -0
- package/dist/mcp.js.map +1 -0
- package/dist/providers.d.ts +1 -0
- package/dist/providers.js +43 -0
- package/dist/providers.js.map +1 -0
- package/dist/repair-cmd.d.ts +5 -0
- package/dist/repair-cmd.js +112 -0
- package/dist/repair-cmd.js.map +1 -0
- package/dist/search-cmd.d.ts +10 -0
- package/dist/search-cmd.js +60 -0
- package/dist/search-cmd.js.map +1 -0
- package/dist/serve-cmd.d.ts +1 -0
- package/dist/serve-cmd.js +139 -0
- package/dist/serve-cmd.js.map +1 -0
- package/dist/status-cmd.d.ts +5 -0
- package/dist/status-cmd.js +119 -0
- package/dist/status-cmd.js.map +1 -0
- package/dist/store.d.ts +25 -0
- package/dist/store.js +207 -0
- package/dist/store.js.map +1 -0
- package/dist/types.d.ts +40 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/walker.d.ts +3 -0
- package/dist/walker.js +90 -0
- package/dist/walker.js.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type LanguageId = "javascript" | "typescript" | "tsx" | "python" | "rust" | "go" | "ruby" | "c" | "cpp" | "swift" | "json" | "yaml" | "toml" | "lua" | "scala" | "zig";
|
|
2
|
+
export interface LanguageConfig {
|
|
3
|
+
id: LanguageId;
|
|
4
|
+
extensions: string[];
|
|
5
|
+
wasmFile: string;
|
|
6
|
+
/** AST node types that represent top-level or nestable definitions */
|
|
7
|
+
chunkTypes: string[];
|
|
8
|
+
/** AST node types that represent import/require statements */
|
|
9
|
+
importTypes: string[];
|
|
10
|
+
/** AST node types that represent class/struct/module wrappers */
|
|
11
|
+
scopeTypes: string[];
|
|
12
|
+
}
|
|
13
|
+
export declare const LANGUAGES: LanguageConfig[];
|
|
14
|
+
export declare function getLanguageForFile(filePath: string): LanguageConfig | undefined;
|
|
15
|
+
export declare function getWasmPath(lang: LanguageConfig): string | undefined;
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
const require = createRequire(import.meta.url);
|
|
3
|
+
export const LANGUAGES = [
|
|
4
|
+
{
|
|
5
|
+
id: "javascript",
|
|
6
|
+
extensions: [".js", ".jsx"],
|
|
7
|
+
wasmFile: "tree-sitter-javascript.wasm",
|
|
8
|
+
chunkTypes: [
|
|
9
|
+
"function_declaration",
|
|
10
|
+
"arrow_function",
|
|
11
|
+
"method_definition",
|
|
12
|
+
"class_declaration",
|
|
13
|
+
"export_statement",
|
|
14
|
+
"variable_declarator",
|
|
15
|
+
],
|
|
16
|
+
importTypes: ["import_statement", "call_expression"],
|
|
17
|
+
scopeTypes: ["class_declaration", "class_body"],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: "typescript",
|
|
21
|
+
extensions: [".ts"],
|
|
22
|
+
wasmFile: "tree-sitter-typescript.wasm",
|
|
23
|
+
chunkTypes: [
|
|
24
|
+
"function_declaration",
|
|
25
|
+
"arrow_function",
|
|
26
|
+
"method_definition",
|
|
27
|
+
"class_declaration",
|
|
28
|
+
"interface_declaration",
|
|
29
|
+
"type_alias_declaration",
|
|
30
|
+
"enum_declaration",
|
|
31
|
+
"export_statement",
|
|
32
|
+
"variable_declarator",
|
|
33
|
+
],
|
|
34
|
+
importTypes: ["import_statement"],
|
|
35
|
+
scopeTypes: [
|
|
36
|
+
"class_declaration",
|
|
37
|
+
"interface_declaration",
|
|
38
|
+
"module",
|
|
39
|
+
"namespace_declaration",
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: "tsx",
|
|
44
|
+
extensions: [".tsx"],
|
|
45
|
+
wasmFile: "tree-sitter-tsx.wasm",
|
|
46
|
+
chunkTypes: [
|
|
47
|
+
"function_declaration",
|
|
48
|
+
"arrow_function",
|
|
49
|
+
"method_definition",
|
|
50
|
+
"class_declaration",
|
|
51
|
+
"interface_declaration",
|
|
52
|
+
"type_alias_declaration",
|
|
53
|
+
"enum_declaration",
|
|
54
|
+
"export_statement",
|
|
55
|
+
"variable_declarator",
|
|
56
|
+
],
|
|
57
|
+
importTypes: ["import_statement"],
|
|
58
|
+
scopeTypes: [
|
|
59
|
+
"class_declaration",
|
|
60
|
+
"interface_declaration",
|
|
61
|
+
"module",
|
|
62
|
+
"namespace_declaration",
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "python",
|
|
67
|
+
extensions: [".py"],
|
|
68
|
+
wasmFile: "tree-sitter-python.wasm",
|
|
69
|
+
chunkTypes: [
|
|
70
|
+
"function_definition",
|
|
71
|
+
"class_definition",
|
|
72
|
+
"decorated_definition",
|
|
73
|
+
],
|
|
74
|
+
importTypes: ["import_statement", "import_from_statement"],
|
|
75
|
+
scopeTypes: ["class_definition", "module"],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: "rust",
|
|
79
|
+
extensions: [".rs"],
|
|
80
|
+
wasmFile: "tree-sitter-rust.wasm",
|
|
81
|
+
chunkTypes: [
|
|
82
|
+
"function_item",
|
|
83
|
+
"impl_item",
|
|
84
|
+
"struct_item",
|
|
85
|
+
"enum_item",
|
|
86
|
+
"trait_item",
|
|
87
|
+
"type_item",
|
|
88
|
+
"const_item",
|
|
89
|
+
"static_item",
|
|
90
|
+
"macro_definition",
|
|
91
|
+
],
|
|
92
|
+
importTypes: ["use_declaration"],
|
|
93
|
+
scopeTypes: ["impl_item", "trait_item", "mod_item"],
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: "go",
|
|
97
|
+
extensions: [".go"],
|
|
98
|
+
wasmFile: "tree-sitter-go.wasm",
|
|
99
|
+
chunkTypes: [
|
|
100
|
+
"function_declaration",
|
|
101
|
+
"method_declaration",
|
|
102
|
+
"type_declaration",
|
|
103
|
+
"const_declaration",
|
|
104
|
+
"var_declaration",
|
|
105
|
+
],
|
|
106
|
+
importTypes: ["import_declaration"],
|
|
107
|
+
scopeTypes: ["type_declaration"],
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: "ruby",
|
|
111
|
+
extensions: [".rb"],
|
|
112
|
+
wasmFile: "tree-sitter-ruby.wasm",
|
|
113
|
+
chunkTypes: ["method", "singleton_method", "class", "module"],
|
|
114
|
+
importTypes: ["call"],
|
|
115
|
+
scopeTypes: ["class", "module"],
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: "c",
|
|
119
|
+
extensions: [".c", ".h"],
|
|
120
|
+
wasmFile: "tree-sitter-c.wasm",
|
|
121
|
+
chunkTypes: [
|
|
122
|
+
"function_definition",
|
|
123
|
+
"struct_specifier",
|
|
124
|
+
"enum_specifier",
|
|
125
|
+
"type_definition",
|
|
126
|
+
"declaration",
|
|
127
|
+
],
|
|
128
|
+
importTypes: ["preproc_include"],
|
|
129
|
+
scopeTypes: ["struct_specifier"],
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: "cpp",
|
|
133
|
+
extensions: [".cpp", ".hpp", ".cc"],
|
|
134
|
+
wasmFile: "tree-sitter-cpp.wasm",
|
|
135
|
+
chunkTypes: [
|
|
136
|
+
"function_definition",
|
|
137
|
+
"class_specifier",
|
|
138
|
+
"struct_specifier",
|
|
139
|
+
"namespace_definition",
|
|
140
|
+
"template_declaration",
|
|
141
|
+
"enum_specifier",
|
|
142
|
+
],
|
|
143
|
+
importTypes: ["preproc_include", "using_declaration"],
|
|
144
|
+
scopeTypes: [
|
|
145
|
+
"class_specifier",
|
|
146
|
+
"struct_specifier",
|
|
147
|
+
"namespace_definition",
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
id: "swift",
|
|
152
|
+
extensions: [".swift"],
|
|
153
|
+
wasmFile: "tree-sitter-swift.wasm",
|
|
154
|
+
chunkTypes: [
|
|
155
|
+
"function_declaration",
|
|
156
|
+
"class_declaration",
|
|
157
|
+
"struct_declaration",
|
|
158
|
+
"enum_declaration",
|
|
159
|
+
"protocol_declaration",
|
|
160
|
+
"extension_declaration",
|
|
161
|
+
],
|
|
162
|
+
importTypes: ["import_declaration"],
|
|
163
|
+
scopeTypes: [
|
|
164
|
+
"class_declaration",
|
|
165
|
+
"struct_declaration",
|
|
166
|
+
"extension_declaration",
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: "json",
|
|
171
|
+
extensions: [".json"],
|
|
172
|
+
wasmFile: "tree-sitter-json.wasm",
|
|
173
|
+
chunkTypes: ["pair"],
|
|
174
|
+
importTypes: [],
|
|
175
|
+
scopeTypes: ["object"],
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
id: "yaml",
|
|
179
|
+
extensions: [".yaml", ".yml"],
|
|
180
|
+
wasmFile: "tree-sitter-yaml.wasm",
|
|
181
|
+
chunkTypes: ["block_mapping_pair"],
|
|
182
|
+
importTypes: [],
|
|
183
|
+
scopeTypes: ["block_mapping"],
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
id: "toml",
|
|
187
|
+
extensions: [".toml"],
|
|
188
|
+
wasmFile: "tree-sitter-toml.wasm",
|
|
189
|
+
chunkTypes: ["table", "pair"],
|
|
190
|
+
importTypes: [],
|
|
191
|
+
scopeTypes: ["table"],
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
id: "lua",
|
|
195
|
+
extensions: [".lua"],
|
|
196
|
+
wasmFile: "tree-sitter-lua.wasm",
|
|
197
|
+
chunkTypes: [
|
|
198
|
+
"function_declaration",
|
|
199
|
+
"local_function",
|
|
200
|
+
"function_definition",
|
|
201
|
+
],
|
|
202
|
+
importTypes: ["call"],
|
|
203
|
+
scopeTypes: [],
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
id: "scala",
|
|
207
|
+
extensions: [".scala"],
|
|
208
|
+
wasmFile: "tree-sitter-scala.wasm",
|
|
209
|
+
chunkTypes: [
|
|
210
|
+
"function_definition",
|
|
211
|
+
"val_definition",
|
|
212
|
+
"var_definition",
|
|
213
|
+
"class_definition",
|
|
214
|
+
"object_definition",
|
|
215
|
+
"trait_definition",
|
|
216
|
+
],
|
|
217
|
+
importTypes: ["import_declaration"],
|
|
218
|
+
scopeTypes: [
|
|
219
|
+
"class_definition",
|
|
220
|
+
"object_definition",
|
|
221
|
+
"trait_definition",
|
|
222
|
+
],
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
id: "zig",
|
|
226
|
+
extensions: [".zig"],
|
|
227
|
+
wasmFile: "tree-sitter-zig.wasm",
|
|
228
|
+
chunkTypes: ["FnProto", "VarDecl", "ContainerDecl", "TestDecl"],
|
|
229
|
+
importTypes: [],
|
|
230
|
+
scopeTypes: ["ContainerDecl"],
|
|
231
|
+
},
|
|
232
|
+
];
|
|
233
|
+
const extToLang = new Map();
|
|
234
|
+
for (const lang of LANGUAGES) {
|
|
235
|
+
for (const ext of lang.extensions) {
|
|
236
|
+
extToLang.set(ext, lang);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
export function getLanguageForFile(filePath) {
|
|
240
|
+
const ext = filePath.slice(filePath.lastIndexOf("."));
|
|
241
|
+
return extToLang.get(ext);
|
|
242
|
+
}
|
|
243
|
+
export function getWasmPath(lang) {
|
|
244
|
+
try {
|
|
245
|
+
return require.resolve(`tree-sitter-wasms/out/${lang.wasmFile}`);
|
|
246
|
+
}
|
|
247
|
+
catch {
|
|
248
|
+
return undefined;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
//# sourceMappingURL=languages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"languages.js","sourceRoot":"","sources":["../../src/chunker/languages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAgC/C,MAAM,CAAC,MAAM,SAAS,GAAqB;IAC1C;QACC,EAAE,EAAE,YAAY;QAChB,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;QAC3B,QAAQ,EAAE,6BAA6B;QACvC,UAAU,EAAE;YACX,sBAAsB;YACtB,gBAAgB;YAChB,mBAAmB;YACnB,mBAAmB;YACnB,kBAAkB;YAClB,qBAAqB;SACrB;QACD,WAAW,EAAE,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;QACpD,UAAU,EAAE,CAAC,mBAAmB,EAAE,YAAY,CAAC;KAC/C;IACD;QACC,EAAE,EAAE,YAAY;QAChB,UAAU,EAAE,CAAC,KAAK,CAAC;QACnB,QAAQ,EAAE,6BAA6B;QACvC,UAAU,EAAE;YACX,sBAAsB;YACtB,gBAAgB;YAChB,mBAAmB;YACnB,mBAAmB;YACnB,uBAAuB;YACvB,wBAAwB;YACxB,kBAAkB;YAClB,kBAAkB;YAClB,qBAAqB;SACrB;QACD,WAAW,EAAE,CAAC,kBAAkB,CAAC;QACjC,UAAU,EAAE;YACX,mBAAmB;YACnB,uBAAuB;YACv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C,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,CAAC;QAC/D,WAAW,EAAE,EAAE;QACf,UAAU,EAAE,CAAC,eAAe,CAAC;KAC7B;CACD,CAAC;AAEF,MAAM,SAAS,GAAG,IAAI,GAAG,EAA0B,CAAC;AACpD,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;IAC9B,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;QACnC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC1B,CAAC;AACF,CAAC;AAED,MAAM,UAAU,kBAAkB,CACjC,QAAgB;IAEhB,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;IACtD,OAAO,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAoB;IAC/C,IAAI,CAAC;QACJ,OAAO,OAAO,CAAC,OAAO,CAAC,yBAAyB,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,SAAS,CAAC;IAClB,CAAC;AACF,CAAC"}
|
package/dist/cli.d.ts
ADDED
package/dist/cli.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { indexCommand } from "./index-cmd.js";
|
|
4
|
+
import { repairCommand } from "./repair-cmd.js";
|
|
5
|
+
import { searchCommand } from "./search-cmd.js";
|
|
6
|
+
import { serveCommand } from "./serve-cmd.js";
|
|
7
|
+
import { statusCommand } from "./status-cmd.js";
|
|
8
|
+
const program = new Command();
|
|
9
|
+
program
|
|
10
|
+
.name("lmgrep")
|
|
11
|
+
.description("Semantic code search with any AI embedding provider")
|
|
12
|
+
.version("0.1.0");
|
|
13
|
+
program
|
|
14
|
+
.command("index")
|
|
15
|
+
.description("Index the current directory for semantic search")
|
|
16
|
+
.option("-r, --reset", "Reset and rebuild the entire index")
|
|
17
|
+
.option("-v, --verbose", "Show file-by-file progress")
|
|
18
|
+
.option("-s, --since <duration>", "Only consider files modified within duration (e.g. 10m, 2h, 1d)")
|
|
19
|
+
.option("-f, --force", "Force re-embed even if file hash unchanged (use with --since)")
|
|
20
|
+
.option("-d, --dry", "Show what would be indexed without actually doing it")
|
|
21
|
+
.action(async (opts) => {
|
|
22
|
+
const cwd = process.cwd();
|
|
23
|
+
await indexCommand(cwd, opts);
|
|
24
|
+
});
|
|
25
|
+
program
|
|
26
|
+
.command("search <query>")
|
|
27
|
+
.description("Search the codebase using natural language")
|
|
28
|
+
.option("-m, --limit <n>", "Max results", "25")
|
|
29
|
+
.option("--scores", "Show relevance scores")
|
|
30
|
+
.option("--compact", "Show file paths only")
|
|
31
|
+
.option("--min-score <n>", "Minimum score threshold")
|
|
32
|
+
.option("--file-prefix <prefix>", "Only search files matching this path prefix")
|
|
33
|
+
.option("--not <query>", "Exclude results similar to this query")
|
|
34
|
+
.action(async (query, opts) => {
|
|
35
|
+
const cwd = process.cwd();
|
|
36
|
+
await searchCommand(query, cwd, {
|
|
37
|
+
limit: Number.parseInt(opts.limit, 10),
|
|
38
|
+
scores: opts.scores,
|
|
39
|
+
compact: opts.compact,
|
|
40
|
+
minScore: opts.minScore ? Number.parseFloat(opts.minScore) : undefined,
|
|
41
|
+
filePrefix: opts.filePrefix,
|
|
42
|
+
not: opts.not,
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
program
|
|
46
|
+
.command("status")
|
|
47
|
+
.description("Show index stats and check embedding connectivity")
|
|
48
|
+
.option("-c, --changes", "Scan for changed files since last index")
|
|
49
|
+
.action(async (opts) => {
|
|
50
|
+
const cwd = process.cwd();
|
|
51
|
+
await statusCommand(cwd, opts);
|
|
52
|
+
});
|
|
53
|
+
program
|
|
54
|
+
.command("repair")
|
|
55
|
+
.description("Detect and fix index inconsistencies (orphaned/stale chunks)")
|
|
56
|
+
.option("-d, --dry", "Show what would be repaired without making changes")
|
|
57
|
+
.action(async (opts) => {
|
|
58
|
+
const cwd = process.cwd();
|
|
59
|
+
await repairCommand(cwd, opts);
|
|
60
|
+
});
|
|
61
|
+
program
|
|
62
|
+
.command("serve")
|
|
63
|
+
.description("Watch the current directory and re-index on changes")
|
|
64
|
+
.action(async () => {
|
|
65
|
+
const cwd = process.cwd();
|
|
66
|
+
await serveCommand(cwd);
|
|
67
|
+
});
|
|
68
|
+
program.parse();
|
|
69
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACL,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CAAC,qDAAqD,CAAC;KAClE,OAAO,CAAC,OAAO,CAAC,CAAC;AAEnB,OAAO;KACL,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,iDAAiD,CAAC;KAC9D,MAAM,CAAC,aAAa,EAAE,oCAAoC,CAAC;KAC3D,MAAM,CAAC,eAAe,EAAE,4BAA4B,CAAC;KACrD,MAAM,CAAC,wBAAwB,EAAE,iEAAiE,CAAC;KACnG,MAAM,CAAC,aAAa,EAAE,+DAA+D,CAAC;KACtF,M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AAM,CAAC,eAAe,EAAE,yCAAyC,CAAC;KAClE,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;IACtB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAC1B,MAAM,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAChC,CAAC,CAAC,CAAC;AAEJ,OAAO;KACL,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,8DAA8D,CAAC;KAC3E,MAAM,CAAC,WAAW,EAAE,oDAAoD,CAAC;KACzE,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;IACtB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAC1B,MAAM,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAChC,CAAC,CAAC,CAAC;AAEJ,OAAO;KACL,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,qDAAqD,CAAC;KAClE,MAAM,CAAC,KAAK,IAAI,EAAE;IAClB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAC1B,MAAM,YAAY,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC,CAAC,CAAC;AAEJ,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
package/dist/config.d.ts
ADDED
package/dist/config.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { readFileSync, existsSync } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { parse } from "yaml";
|
|
5
|
+
const DEFAULTS = {
|
|
6
|
+
model: "openai:text-embedding-3-small",
|
|
7
|
+
batchSize: 100,
|
|
8
|
+
};
|
|
9
|
+
const CONFIG_FILES = [".lmgrep.yml", ".lmgrep.yaml"];
|
|
10
|
+
export function loadConfig(cwd) {
|
|
11
|
+
// Project-local config
|
|
12
|
+
for (const name of CONFIG_FILES) {
|
|
13
|
+
const path = join(cwd, name);
|
|
14
|
+
if (existsSync(path)) {
|
|
15
|
+
const raw = readFileSync(path, "utf-8");
|
|
16
|
+
const parsed = parse(raw);
|
|
17
|
+
return { ...DEFAULTS, ...parsed };
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
// Global config (~/.lmgrep.yml)
|
|
21
|
+
for (const name of CONFIG_FILES) {
|
|
22
|
+
const path = join(homedir(), name);
|
|
23
|
+
if (existsSync(path)) {
|
|
24
|
+
const raw = readFileSync(path, "utf-8");
|
|
25
|
+
const parsed = parse(raw);
|
|
26
|
+
return { ...DEFAULTS, ...parsed };
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return { ...DEFAULTS };
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAG7B,MAAM,QAAQ,GAAiB;IAC9B,KAAK,EAAE,+BAA+B;IACtC,SAAS,EAAE,GAAG;CACd,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;AAErD,MAAM,UAAU,UAAU,CAAC,GAAW;IACrC,uBAAuB;IACvB,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;QACjC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC7B,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACtB,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YACxC,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAA0B,CAAC;YACnD,OAAO,EAAE,GAAG,QAAQ,EAAE,GAAG,MAAM,EAAE,CAAC;QACnC,CAAC;IACF,CAAC;IAED,gCAAgC;IAChC,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;QACjC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC;QACnC,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACtB,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YACxC,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAA0B,CAAC;YACnD,OAAO,EAAE,GAAG,QAAQ,EAAE,GAAG,MAAM,EAAE,CAAC;QACnC,CAAC;IACF,CAAC;IAED,OAAO,EAAE,GAAG,QAAQ,EAAE,CAAC;AACxB,CAAC"}
|
package/dist/embedder.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { embed, embedMany } from "ai";
|
|
2
|
+
import { createProviderRegistry } from "ai";
|
|
3
|
+
import { importProvider } from "./providers.js";
|
|
4
|
+
let cachedModel;
|
|
5
|
+
async function getModel(config) {
|
|
6
|
+
if (cachedModel)
|
|
7
|
+
return cachedModel;
|
|
8
|
+
const colonIdx = config.model.indexOf(":");
|
|
9
|
+
if (colonIdx === -1) {
|
|
10
|
+
throw new Error(`Model must be in "provider:model" format (e.g. "openai:text-embedding-3-small"). Got: "${config.model}"`);
|
|
11
|
+
}
|
|
12
|
+
const providerName = config.model.slice(0, colonIdx);
|
|
13
|
+
const pkg = config.provider ?? `@ai-sdk/${providerName}`;
|
|
14
|
+
const providerModule = await importProvider(pkg);
|
|
15
|
+
// Try named export first (e.g. `openai` from `@ai-sdk/openai`)
|
|
16
|
+
let providerInstance = providerModule[providerName];
|
|
17
|
+
// Fall back to create* factory (e.g. `createOpenAICompatible` from `@ai-sdk/openai-compatible`)
|
|
18
|
+
if (!providerInstance) {
|
|
19
|
+
const factoryKey = Object.keys(providerModule).find((k) => k.startsWith("create"));
|
|
20
|
+
if (factoryKey) {
|
|
21
|
+
const factory = providerModule[factoryKey];
|
|
22
|
+
providerInstance = factory({
|
|
23
|
+
name: providerName,
|
|
24
|
+
...(config.baseURL ? { baseURL: config.baseURL } : {}),
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (!providerInstance) {
|
|
29
|
+
throw new Error(`Package "${pkg}" has no usable provider export. Available exports: ${Object.keys(providerModule).join(", ")}`);
|
|
30
|
+
}
|
|
31
|
+
const registry = createProviderRegistry({
|
|
32
|
+
[providerName]: providerInstance,
|
|
33
|
+
});
|
|
34
|
+
cachedModel = registry.embeddingModel(config.model);
|
|
35
|
+
return cachedModel;
|
|
36
|
+
}
|
|
37
|
+
export async function embedTexts(texts, config) {
|
|
38
|
+
const model = await getModel(config);
|
|
39
|
+
const allEmbeddings = [];
|
|
40
|
+
const prefix = config.documentPrefix ?? "";
|
|
41
|
+
for (let i = 0; i < texts.length; i += config.batchSize) {
|
|
42
|
+
const batch = texts.slice(i, i + config.batchSize);
|
|
43
|
+
const values = prefix ? batch.map((t) => prefix + t) : batch;
|
|
44
|
+
const { embeddings } = await embedMany({ model, values });
|
|
45
|
+
allEmbeddings.push(...embeddings);
|
|
46
|
+
}
|
|
47
|
+
return allEmbeddings;
|
|
48
|
+
}
|
|
49
|
+
export async function embedQuery(query, config) {
|
|
50
|
+
const model = await getModel(config);
|
|
51
|
+
const prefix = config.queryPrefix ?? "";
|
|
52
|
+
const { embedding } = await embed({ model, value: prefix + query });
|
|
53
|
+
return embedding;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=embedder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embedder.js","sourceRoot":"","sources":["../src/embedder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAuB,MAAM,IAAI,CAAC;AAC3D,OAAO,EAAE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