@edxeth/fff-node 0.7.2-edxeth.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/src/binary.d.ts +22 -0
- package/dist/src/binary.d.ts.map +1 -0
- package/dist/src/binary.js +135 -0
- package/dist/src/binary.js.map +1 -0
- package/dist/src/ffi.d.ts +133 -0
- package/dist/src/ffi.d.ts.map +1 -0
- package/dist/src/ffi.js +1141 -0
- package/dist/src/ffi.js.map +1 -0
- package/dist/src/finder.d.ts +313 -0
- package/dist/src/finder.d.ts.map +1 -0
- package/dist/src/finder.js +423 -0
- package/dist/src/finder.js.map +1 -0
- package/dist/src/index.d.ts +47 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +47 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/platform.d.ts +27 -0
- package/dist/src/platform.d.ts.map +1 -0
- package/dist/src/platform.js +117 -0
- package/dist/src/platform.js.map +1 -0
- package/dist/src/types.d.ts +462 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +19 -0
- package/dist/src/types.js.map +1 -0
- package/package.json +76 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/platform.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C;;GAEG;AACH,MAAM,UAAU,SAAS;IACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAClC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAE1B,IAAI,MAAc,CAAC;IACnB,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC1B,MAAM,GAAG,cAAc,CAAC;IAC1B,CAAC;SAAM,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QAChC,MAAM,GAAG,eAAe,EAAE,CAAC;IAC7B,CAAC;SAAM,IAAI,QAA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C,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AACnD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAC9B,MAAM,GAAG,GAAG,eAAe,EAAE,CAAC;IAC9B,OAAO,GAAG,MAAM,SAAS,GAAG,EAAE,CAAC;AACjC,CAAC;AAED;;;;GAIG;AACH,MAAM,qBAAqB,GAA2B;IACpD,sBAAsB,EAAE,8BAA8B;IACtD,qBAAqB,EAAE,4BAA4B;IACnD,0BAA0B,EAAE,+BAA+B;IAC3D,2BAA2B,EAAE,iCAAiC;IAC9D,2BAA2B,EAAE,gCAAgC;IAC7D,4BAA4B,EAAE,kCAAkC;IAChE,wBAAwB,EAAE,2BAA2B;IACrD,yBAAyB,EAAE,6BAA6B;CACzD,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,WAAW,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAClD,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,0CAA0C,MAAM,EAAE,CAAC,CAAC;IACtE,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result type for all operations - follows the Result pattern
|
|
3
|
+
*/
|
|
4
|
+
export type Result<T> = {
|
|
5
|
+
ok: true;
|
|
6
|
+
value: T;
|
|
7
|
+
} | {
|
|
8
|
+
ok: false;
|
|
9
|
+
error: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Helper to create a successful result
|
|
13
|
+
*/
|
|
14
|
+
export declare function ok<T>(value: T): Result<T>;
|
|
15
|
+
/**
|
|
16
|
+
* Helper to create an error result
|
|
17
|
+
*/
|
|
18
|
+
export declare function err<T>(error: string): Result<T>;
|
|
19
|
+
/**
|
|
20
|
+
* Initialization options for the file finder
|
|
21
|
+
*/
|
|
22
|
+
export interface InitOptions {
|
|
23
|
+
/** Base directory to index (required) */
|
|
24
|
+
basePath: string;
|
|
25
|
+
/** Path to frecency database (optional, omit to skip frecency initialization) */
|
|
26
|
+
frecencyDbPath?: string;
|
|
27
|
+
/** Path to query history database (optional, omit to skip query tracker initialization) */
|
|
28
|
+
historyDbPath?: string;
|
|
29
|
+
/** Use unsafe no-lock mode for databases (optional, defaults to false) */
|
|
30
|
+
useUnsafeNoLock?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Disable mmap cache warmup after the initial scan. When mmap cache is
|
|
33
|
+
* enabled (the default), the first grep search is as fast as subsequent
|
|
34
|
+
* ones at the cost of a longer scan time and higher initial memory usage.
|
|
35
|
+
* (default: false)
|
|
36
|
+
*/
|
|
37
|
+
disableMmapCache?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Disable the content index built after the initial scan.
|
|
40
|
+
* Content indexing enables faster content-aware filtering during grep.
|
|
41
|
+
* When omitted, follows `disableMmapCache` for backward compatibility.
|
|
42
|
+
* (default: follows `disableMmapCache`)
|
|
43
|
+
*/
|
|
44
|
+
disableContentIndexing?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Disable the background file-system watcher. When the watcher is
|
|
47
|
+
* disabled, files are scanned once but not monitored for changes.
|
|
48
|
+
* (default: false)
|
|
49
|
+
*/
|
|
50
|
+
disableWatch?: boolean;
|
|
51
|
+
/** enables optimizations for AI agent assistants. Provide as true if running via mcp/agent */
|
|
52
|
+
aiMode?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Path to the tracing log file. When set, the shared FFF tracing subscriber
|
|
55
|
+
* is installed on first init and file output is written here. Omit to leave
|
|
56
|
+
* logging uninitialized.
|
|
57
|
+
*/
|
|
58
|
+
logFilePath?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Log level for the tracing subscriber: "trace", "debug", "info", "warn",
|
|
61
|
+
* or "error". Defaults to "info". Ignored when `logFilePath` is not set.
|
|
62
|
+
*/
|
|
63
|
+
logLevel?: "trace" | "debug" | "info" | "warn" | "error";
|
|
64
|
+
/**
|
|
65
|
+
* Override for the content cache file-count cap. When omitted, the picker
|
|
66
|
+
* auto-sizes the budget from the final scanned file count.
|
|
67
|
+
*/
|
|
68
|
+
cacheBudgetMaxFiles?: number;
|
|
69
|
+
/** Override for the content cache byte cap. See `cacheBudgetMaxFiles`. */
|
|
70
|
+
cacheBudgetMaxBytes?: number;
|
|
71
|
+
/** Override for the per-file byte cap in the content cache. */
|
|
72
|
+
cacheBudgetMaxFileSize?: number;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Search options for fuzzy file search
|
|
76
|
+
*/
|
|
77
|
+
export interface SearchOptions {
|
|
78
|
+
/** Maximum threads for parallel search (0 = auto) */
|
|
79
|
+
maxThreads?: number;
|
|
80
|
+
/** Current file path (for deprioritization in results) */
|
|
81
|
+
currentFile?: string;
|
|
82
|
+
/** Combo boost score multiplier (default: 100) */
|
|
83
|
+
comboBoostMultiplier?: number;
|
|
84
|
+
/** Minimum combo count for boost (default: 3) */
|
|
85
|
+
minComboCount?: number;
|
|
86
|
+
/** Page index for pagination (default: 0) */
|
|
87
|
+
pageIndex?: number;
|
|
88
|
+
/** Page size for pagination (default: 100) */
|
|
89
|
+
pageSize?: number;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* A file item in search results
|
|
93
|
+
*/
|
|
94
|
+
export interface FileItem {
|
|
95
|
+
/** Path relative to the indexed directory */
|
|
96
|
+
relativePath: string;
|
|
97
|
+
/** File name only */
|
|
98
|
+
fileName: string;
|
|
99
|
+
/** File size in bytes */
|
|
100
|
+
size: number;
|
|
101
|
+
/** Last modified timestamp (Unix seconds) */
|
|
102
|
+
modified: number;
|
|
103
|
+
/** Frecency score based on access patterns */
|
|
104
|
+
accessFrecencyScore: number;
|
|
105
|
+
/** Frecency score based on modification time */
|
|
106
|
+
modificationFrecencyScore: number;
|
|
107
|
+
/** Combined frecency score */
|
|
108
|
+
totalFrecencyScore: number;
|
|
109
|
+
/** Git status: 'clean', 'modified', 'untracked', 'staged_new', etc. */
|
|
110
|
+
gitStatus: string;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Score breakdown for a search result
|
|
114
|
+
*/
|
|
115
|
+
export interface Score {
|
|
116
|
+
/** Total combined score */
|
|
117
|
+
total: number;
|
|
118
|
+
/** Base fuzzy match score */
|
|
119
|
+
baseScore: number;
|
|
120
|
+
/** Bonus for filename match */
|
|
121
|
+
filenameBonus: number;
|
|
122
|
+
/** Bonus for special filenames (index.ts, main.rs, etc.) */
|
|
123
|
+
specialFilenameBonus: number;
|
|
124
|
+
/** Boost from frecency */
|
|
125
|
+
frecencyBoost: number;
|
|
126
|
+
/** Penalty for distance in path */
|
|
127
|
+
distancePenalty: number;
|
|
128
|
+
/** Penalty if this is the current file */
|
|
129
|
+
currentFilePenalty: number;
|
|
130
|
+
/** Boost from query history combo matching */
|
|
131
|
+
comboMatchBoost: number;
|
|
132
|
+
/** Whether this was an exact match */
|
|
133
|
+
exactMatch: boolean;
|
|
134
|
+
/** Type of match: 'fuzzy', 'exact', 'prefix', etc. */
|
|
135
|
+
matchType: string;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Location in file (from query like "file.ts:42")
|
|
139
|
+
*/
|
|
140
|
+
export type Location = {
|
|
141
|
+
type: "line";
|
|
142
|
+
line: number;
|
|
143
|
+
} | {
|
|
144
|
+
type: "position";
|
|
145
|
+
line: number;
|
|
146
|
+
col: number;
|
|
147
|
+
} | {
|
|
148
|
+
type: "range";
|
|
149
|
+
start: {
|
|
150
|
+
line: number;
|
|
151
|
+
col: number;
|
|
152
|
+
};
|
|
153
|
+
end: {
|
|
154
|
+
line: number;
|
|
155
|
+
col: number;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Search result from fuzzy file search
|
|
160
|
+
*/
|
|
161
|
+
export interface SearchResult {
|
|
162
|
+
/** Matched file items */
|
|
163
|
+
items: FileItem[];
|
|
164
|
+
/** Corresponding scores for each item */
|
|
165
|
+
scores: Score[];
|
|
166
|
+
/** Total number of files that matched */
|
|
167
|
+
totalMatched: number;
|
|
168
|
+
/** Total number of indexed files */
|
|
169
|
+
totalFiles: number;
|
|
170
|
+
/** Location parsed from query (e.g., "file.ts:42:10") */
|
|
171
|
+
location?: Location;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* A directory item in search results
|
|
175
|
+
*/
|
|
176
|
+
export interface DirItem {
|
|
177
|
+
/** Path relative to the indexed directory (e.g., "src/components/") */
|
|
178
|
+
relativePath: string;
|
|
179
|
+
/** Last path segment (e.g., "components/" for "src/components/") */
|
|
180
|
+
dirName: string;
|
|
181
|
+
/** Maximum access frecency score among direct child files */
|
|
182
|
+
maxAccessFrecency: number;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Search options for directory search (subset of SearchOptions)
|
|
186
|
+
*/
|
|
187
|
+
export interface DirSearchOptions {
|
|
188
|
+
/** Maximum threads for parallel search (0 = auto) */
|
|
189
|
+
maxThreads?: number;
|
|
190
|
+
/** Current file path (for distance scoring) */
|
|
191
|
+
currentFile?: string;
|
|
192
|
+
/** Page index for pagination (default: 0) */
|
|
193
|
+
pageIndex?: number;
|
|
194
|
+
/** Page size for pagination (default: 100) */
|
|
195
|
+
pageSize?: number;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Search result from fuzzy directory search
|
|
199
|
+
*/
|
|
200
|
+
export interface DirSearchResult {
|
|
201
|
+
/** Matched directory items */
|
|
202
|
+
items: DirItem[];
|
|
203
|
+
/** Corresponding scores for each item */
|
|
204
|
+
scores: Score[];
|
|
205
|
+
/** Total number of directories that matched */
|
|
206
|
+
totalMatched: number;
|
|
207
|
+
/** Total number of indexed directories */
|
|
208
|
+
totalDirs: number;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* A single item in a mixed (files + directories) search result
|
|
212
|
+
*/
|
|
213
|
+
export type MixedItem = {
|
|
214
|
+
type: "file";
|
|
215
|
+
item: FileItem;
|
|
216
|
+
} | {
|
|
217
|
+
type: "directory";
|
|
218
|
+
item: DirItem;
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* Search result from mixed (files + directories) fuzzy search.
|
|
222
|
+
* Items are interleaved by total score in descending order.
|
|
223
|
+
*/
|
|
224
|
+
export interface MixedSearchResult {
|
|
225
|
+
/** Matched items (files and directories interleaved by score) */
|
|
226
|
+
items: MixedItem[];
|
|
227
|
+
/** Corresponding scores for each item */
|
|
228
|
+
scores: Score[];
|
|
229
|
+
/** Total number of items (files + dirs) that matched */
|
|
230
|
+
totalMatched: number;
|
|
231
|
+
/** Total number of indexed files */
|
|
232
|
+
totalFiles: number;
|
|
233
|
+
/** Total number of indexed directories */
|
|
234
|
+
totalDirs: number;
|
|
235
|
+
/** Location parsed from query */
|
|
236
|
+
location?: Location;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Scan progress information
|
|
240
|
+
*/
|
|
241
|
+
export interface ScanProgress {
|
|
242
|
+
/** Number of files scanned so far */
|
|
243
|
+
scannedFilesCount: number;
|
|
244
|
+
/** Whether a scan is currently in progress */
|
|
245
|
+
isScanning: boolean;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Database health information
|
|
249
|
+
*/
|
|
250
|
+
export interface DbHealth {
|
|
251
|
+
/** Path to the database */
|
|
252
|
+
path: string;
|
|
253
|
+
/** Size of the database on disk in bytes */
|
|
254
|
+
diskSize: number;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Health check result
|
|
258
|
+
*/
|
|
259
|
+
export interface HealthCheck {
|
|
260
|
+
/** Library version */
|
|
261
|
+
version: string;
|
|
262
|
+
/** Git integration status */
|
|
263
|
+
git: {
|
|
264
|
+
/** Whether git2 library is available */
|
|
265
|
+
available: boolean;
|
|
266
|
+
/** Whether a git repository was found */
|
|
267
|
+
repositoryFound: boolean;
|
|
268
|
+
/** Git working directory path */
|
|
269
|
+
workdir?: string;
|
|
270
|
+
/** libgit2 version string */
|
|
271
|
+
libgit2Version: string;
|
|
272
|
+
/** Error message if git detection failed */
|
|
273
|
+
error?: string;
|
|
274
|
+
};
|
|
275
|
+
/** File picker status */
|
|
276
|
+
filePicker: {
|
|
277
|
+
/** Whether the file picker is initialized */
|
|
278
|
+
initialized: boolean;
|
|
279
|
+
/** Base path being indexed */
|
|
280
|
+
basePath?: string;
|
|
281
|
+
/** Whether a scan is in progress */
|
|
282
|
+
isScanning?: boolean;
|
|
283
|
+
/** Number of indexed files */
|
|
284
|
+
indexedFiles?: number;
|
|
285
|
+
/** Error message if there's an issue */
|
|
286
|
+
error?: string;
|
|
287
|
+
};
|
|
288
|
+
/** Frecency database status */
|
|
289
|
+
frecency: {
|
|
290
|
+
/** Whether frecency tracking is initialized */
|
|
291
|
+
initialized: boolean;
|
|
292
|
+
/** Database health information */
|
|
293
|
+
dbHealthcheck?: DbHealth;
|
|
294
|
+
/** Error message if there's an issue */
|
|
295
|
+
error?: string;
|
|
296
|
+
};
|
|
297
|
+
/** Query tracker status */
|
|
298
|
+
queryTracker: {
|
|
299
|
+
/** Whether query tracking is initialized */
|
|
300
|
+
initialized: boolean;
|
|
301
|
+
/** Database health information */
|
|
302
|
+
dbHealthcheck?: DbHealth;
|
|
303
|
+
/** Error message if there's an issue */
|
|
304
|
+
error?: string;
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Grep search mode
|
|
309
|
+
*/
|
|
310
|
+
export type GrepMode = "plain" | "regex" | "fuzzy";
|
|
311
|
+
/**
|
|
312
|
+
* Opaque pagination cursor for grep results.
|
|
313
|
+
* Pass this to `GrepOptions.cursor` to fetch the next page.
|
|
314
|
+
* Do not construct or modify this — use the `nextCursor` from a previous `GrepResult`.
|
|
315
|
+
*/
|
|
316
|
+
export interface GrepCursor {
|
|
317
|
+
/** @internal */
|
|
318
|
+
readonly __brand: "GrepCursor";
|
|
319
|
+
/** @internal */
|
|
320
|
+
readonly _offset: number;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* @internal Create a GrepCursor from a raw file offset.
|
|
324
|
+
*/
|
|
325
|
+
export declare function createGrepCursor(offset: number): GrepCursor;
|
|
326
|
+
/**
|
|
327
|
+
* Options for live grep (content search)
|
|
328
|
+
*
|
|
329
|
+
* Files are searched sequentially in frecency order (most recently/frequently
|
|
330
|
+
* accessed first). The engine returns a `nextCursor` for fetching the next page.
|
|
331
|
+
*/
|
|
332
|
+
export interface GrepOptions {
|
|
333
|
+
/** Maximum file size to search in bytes. Files larger than this are skipped. (default: 10MB) */
|
|
334
|
+
maxFileSize?: number;
|
|
335
|
+
/** Maximum matching lines to collect from a single file (default: 200) */
|
|
336
|
+
maxMatchesPerFile?: number;
|
|
337
|
+
/** Smart case: case-insensitive when the query is all lowercase, case-sensitive otherwise (default: true) */
|
|
338
|
+
smartCase?: boolean;
|
|
339
|
+
/**
|
|
340
|
+
* Pagination cursor from a previous `GrepResult.nextCursor`.
|
|
341
|
+
* Omit (or pass `null`) for the first page.
|
|
342
|
+
*/
|
|
343
|
+
cursor?: GrepCursor | null;
|
|
344
|
+
/** Search mode (default: "plain") */
|
|
345
|
+
mode?: GrepMode;
|
|
346
|
+
/**
|
|
347
|
+
* Maximum wall-clock time in milliseconds to spend searching before returning
|
|
348
|
+
* partial results. 0 = unlimited. (default: 0)
|
|
349
|
+
*/
|
|
350
|
+
timeBudgetMs?: number;
|
|
351
|
+
/** Number of context lines to include before each match (default: 0) */
|
|
352
|
+
beforeContext?: number;
|
|
353
|
+
/** Number of context lines to include after each match (default: 0) */
|
|
354
|
+
afterContext?: number;
|
|
355
|
+
/**
|
|
356
|
+
* When true, classify each match line as a code definition (struct/fn/class/...)
|
|
357
|
+
* and expose it via `GrepMatch.isDefinition`. Let callers re-rank defs first
|
|
358
|
+
* without a TS-side regex port. (default: false)
|
|
359
|
+
*/
|
|
360
|
+
classifyDefinitions?: boolean;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* A single grep match with file and line information
|
|
364
|
+
*/
|
|
365
|
+
export interface GrepMatch {
|
|
366
|
+
/** Path relative to the indexed directory */
|
|
367
|
+
relativePath: string;
|
|
368
|
+
/** File name only */
|
|
369
|
+
fileName: string;
|
|
370
|
+
/** Git status */
|
|
371
|
+
gitStatus: string;
|
|
372
|
+
/** File size in bytes */
|
|
373
|
+
size: number;
|
|
374
|
+
/** Last modified timestamp (Unix seconds) */
|
|
375
|
+
modified: number;
|
|
376
|
+
/** Whether the file is binary */
|
|
377
|
+
isBinary: boolean;
|
|
378
|
+
/** Combined frecency score */
|
|
379
|
+
totalFrecencyScore: number;
|
|
380
|
+
/** Access-based frecency score */
|
|
381
|
+
accessFrecencyScore: number;
|
|
382
|
+
/** Modification-based frecency score */
|
|
383
|
+
modificationFrecencyScore: number;
|
|
384
|
+
/** 1-based line number of the match */
|
|
385
|
+
lineNumber: number;
|
|
386
|
+
/** 0-based byte column of first match start */
|
|
387
|
+
col: number;
|
|
388
|
+
/** Absolute byte offset of the matched line from file start */
|
|
389
|
+
byteOffset: number;
|
|
390
|
+
/** The matched line text (may be truncated) */
|
|
391
|
+
lineContent: string;
|
|
392
|
+
/** Byte offset pairs [start, end] within lineContent for highlighting */
|
|
393
|
+
matchRanges: [number, number][];
|
|
394
|
+
/** Fuzzy match score (only in fuzzy mode) */
|
|
395
|
+
fuzzyScore?: number;
|
|
396
|
+
/** Lines before the match (context). Empty array when context is 0. */
|
|
397
|
+
contextBefore?: string[];
|
|
398
|
+
/** Lines after the match (context). Empty array when context is 0. */
|
|
399
|
+
contextAfter?: string[];
|
|
400
|
+
/** Whether this line is a code definition (only populated when `classifyDefinitions: true`). */
|
|
401
|
+
isDefinition?: boolean;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Result from a grep search
|
|
405
|
+
*/
|
|
406
|
+
export interface GrepResult {
|
|
407
|
+
/** Matched items with file and line information. At most `max_matches_per_file`. */
|
|
408
|
+
items: GrepMatch[];
|
|
409
|
+
/** Total number of matches collected (always equal to items.length). */
|
|
410
|
+
totalMatched: number;
|
|
411
|
+
/** Number of files actually opened and searched in this call */
|
|
412
|
+
totalFilesSearched: number;
|
|
413
|
+
/** Total number of indexed files (before any filtering) */
|
|
414
|
+
totalFiles: number;
|
|
415
|
+
/** Number of files eligible for search after filtering out binary files, oversized files, and constraint mismatches */
|
|
416
|
+
filteredFileCount: number;
|
|
417
|
+
/**
|
|
418
|
+
* Cursor for the next page, or `null` if all eligible files have been searched.
|
|
419
|
+
* Pass this as `GrepOptions.cursor` to continue from where this call left off.
|
|
420
|
+
*/
|
|
421
|
+
nextCursor: GrepCursor | null;
|
|
422
|
+
/** When regex mode fails to compile the pattern, the engine falls back to literal matching and this field contains the compilation error */
|
|
423
|
+
regexFallbackError?: string;
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Options for multi-pattern grep (Aho-Corasick multi-needle search)
|
|
427
|
+
*
|
|
428
|
+
* Searches for lines matching ANY of the provided patterns using
|
|
429
|
+
* SIMD-accelerated Aho-Corasick multi-pattern matching.
|
|
430
|
+
*/
|
|
431
|
+
export interface MultiGrepOptions {
|
|
432
|
+
/** Patterns to search for (OR logic — matches lines containing any pattern) */
|
|
433
|
+
patterns: string[];
|
|
434
|
+
/** File constraints like "*.rs" or "/src/" */
|
|
435
|
+
constraints?: string;
|
|
436
|
+
/** Maximum file size to search in bytes (default: 10MB) */
|
|
437
|
+
maxFileSize?: number;
|
|
438
|
+
/** Maximum matching lines to collect from a single file (default: 0 = unlimited) */
|
|
439
|
+
maxMatchesPerFile?: number;
|
|
440
|
+
/** Smart case: case-insensitive when all patterns are lowercase (default: true) */
|
|
441
|
+
smartCase?: boolean;
|
|
442
|
+
/**
|
|
443
|
+
* Pagination cursor from a previous `GrepResult.nextCursor`.
|
|
444
|
+
* Omit (or pass `null`) for the first page.
|
|
445
|
+
*/
|
|
446
|
+
cursor?: GrepCursor | null;
|
|
447
|
+
/**
|
|
448
|
+
* Maximum wall-clock time in milliseconds to spend searching before returning
|
|
449
|
+
* partial results. 0 = unlimited. (default: 0)
|
|
450
|
+
*/
|
|
451
|
+
timeBudgetMs?: number;
|
|
452
|
+
/** Number of context lines to include before each match (default: 0) */
|
|
453
|
+
beforeContext?: number;
|
|
454
|
+
/** Number of context lines to include after each match (default: 0) */
|
|
455
|
+
afterContext?: number;
|
|
456
|
+
/**
|
|
457
|
+
* When true, classify each match line as a code definition (struct/fn/class/...)
|
|
458
|
+
* and expose it via `GrepMatch.isDefinition`. (default: false)
|
|
459
|
+
*/
|
|
460
|
+
classifyDefinitions?: boolean;
|
|
461
|
+
}
|
|
462
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9E;;GAEG;AACH,wBAAgB,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAEzC;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAE/C;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2FAA2F;IAC3F,aAAa,C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EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oFAAoF;IACpF,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mFAAmF;IACnF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper to create a successful result
|
|
3
|
+
*/
|
|
4
|
+
export function ok(value) {
|
|
5
|
+
return { ok: true, value };
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Helper to create an error result
|
|
9
|
+
*/
|
|
10
|
+
export function err(error) {
|
|
11
|
+
return { ok: false, error };
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @internal Create a GrepCursor from a raw file offset.
|
|
15
|
+
*/
|
|
16
|
+
export function createGrepCursor(offset) {
|
|
17
|
+
return { __brand: "GrepCursor", _offset: offset };
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,UAAU,EAAE,CAAI,KAAQ;IAC5B,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AAC7B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,GAAG,CAAI,KAAa;IAClC,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAC9B,CAAC;AAmTD;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAc;IAC7C,OAAO,EAAE,OAAO,EAAE,YAAqB,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;AAC7D,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@edxeth/fff-node",
|
|
3
|
+
"version": "0.7.2-edxeth.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "High-performance fuzzy file finder for Node.js - perfect for LLM agent tools",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "dist/src/index.js",
|
|
8
|
+
"types": "dist/src/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/src/index.js",
|
|
12
|
+
"types": "./dist/src/index.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc",
|
|
20
|
+
"test": "node test/e2e.mjs",
|
|
21
|
+
"typecheck": "tsc --noEmit"
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=18.0.0"
|
|
25
|
+
},
|
|
26
|
+
"os": [
|
|
27
|
+
"darwin",
|
|
28
|
+
"linux",
|
|
29
|
+
"win32"
|
|
30
|
+
],
|
|
31
|
+
"cpu": [
|
|
32
|
+
"x64",
|
|
33
|
+
"arm64"
|
|
34
|
+
],
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/edxeth/fff.git",
|
|
38
|
+
"directory": "packages/fff-node"
|
|
39
|
+
},
|
|
40
|
+
"keywords": [
|
|
41
|
+
"file-finder",
|
|
42
|
+
"fuzzy-search",
|
|
43
|
+
"node",
|
|
44
|
+
"ffi",
|
|
45
|
+
"llm-tools",
|
|
46
|
+
"agent-tools",
|
|
47
|
+
"fast",
|
|
48
|
+
"rust"
|
|
49
|
+
],
|
|
50
|
+
"author": "edxeth",
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public"
|
|
54
|
+
},
|
|
55
|
+
"bugs": {
|
|
56
|
+
"url": "https://github.com/edxeth/fff/issues"
|
|
57
|
+
},
|
|
58
|
+
"homepage": "https://github.com/edxeth/fff#readme",
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"ffi-rs": "^1.0.0"
|
|
61
|
+
},
|
|
62
|
+
"optionalDependencies": {
|
|
63
|
+
"@edxeth/fff-bin-darwin-arm64": "0.7.2-edxeth.0",
|
|
64
|
+
"@edxeth/fff-bin-darwin-x64": "0.7.2-edxeth.0",
|
|
65
|
+
"@edxeth/fff-bin-linux-x64-gnu": "0.7.2-edxeth.0",
|
|
66
|
+
"@edxeth/fff-bin-linux-arm64-gnu": "0.7.2-edxeth.0",
|
|
67
|
+
"@edxeth/fff-bin-linux-x64-musl": "0.7.2-edxeth.0",
|
|
68
|
+
"@edxeth/fff-bin-linux-arm64-musl": "0.7.2-edxeth.0",
|
|
69
|
+
"@edxeth/fff-bin-win32-x64": "0.7.2-edxeth.0",
|
|
70
|
+
"@edxeth/fff-bin-win32-arm64": "0.7.2-edxeth.0"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"typescript": "^5.0.0",
|
|
74
|
+
"@types/node": "^22.0.0"
|
|
75
|
+
}
|
|
76
|
+
}
|