raggrep 0.2.3 → 0.4.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/app/indexer/index.d.ts +30 -4
- package/dist/app/search/index.d.ts +1 -1
- package/dist/cli/main.js +427 -115
- package/dist/cli/main.js.map +18 -15
- package/dist/domain/entities/searchResult.d.ts +11 -0
- package/dist/domain/ports/embedding.d.ts +4 -1
- package/dist/domain/ports/index.d.ts +2 -1
- package/dist/domain/ports/logger.d.ts +66 -0
- package/dist/index.d.ts +45 -8
- package/dist/index.js +601 -71
- package/dist/index.js.map +17 -14
- package/dist/infrastructure/embeddings/transformersEmbedding.d.ts +1 -1
- package/dist/infrastructure/index.d.ts +1 -0
- package/dist/infrastructure/logger/index.d.ts +6 -0
- package/dist/infrastructure/logger/loggers.d.ts +75 -0
- package/dist/modules/language/typescript/index.d.ts +1 -0
- package/dist/tests/ranking.test.d.ts +12 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EmbeddingModelName } from "../../domain/ports";
|
|
1
|
+
import type { EmbeddingModelName, Logger } from "../../domain/ports";
|
|
2
2
|
export interface IndexResult {
|
|
3
3
|
moduleId: string;
|
|
4
4
|
indexed: number;
|
|
@@ -12,6 +12,8 @@ export interface IndexOptions {
|
|
|
12
12
|
verbose?: boolean;
|
|
13
13
|
/** Suppress most output (for use during query) */
|
|
14
14
|
quiet?: boolean;
|
|
15
|
+
/** Logger for progress reporting. If not provided, uses console by default (quiet mode uses silent logger) */
|
|
16
|
+
logger?: Logger;
|
|
15
17
|
}
|
|
16
18
|
export interface EnsureFreshResult {
|
|
17
19
|
/** Number of files indexed (new or modified) */
|
|
@@ -50,6 +52,23 @@ export interface IndexStatus {
|
|
|
50
52
|
* Index a directory using all enabled modules
|
|
51
53
|
*/
|
|
52
54
|
export declare function indexDirectory(rootDir: string, options?: IndexOptions): Promise<IndexResult[]>;
|
|
55
|
+
/**
|
|
56
|
+
* Result of a reset operation
|
|
57
|
+
*/
|
|
58
|
+
export interface ResetResult {
|
|
59
|
+
/** Whether the reset was successful */
|
|
60
|
+
success: boolean;
|
|
61
|
+
/** The index directory that was removed */
|
|
62
|
+
indexDir: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Reset (delete) the index for a directory.
|
|
66
|
+
*
|
|
67
|
+
* @param rootDir - Root directory of the project
|
|
68
|
+
* @returns ResetResult with success status
|
|
69
|
+
* @throws Error if no index exists
|
|
70
|
+
*/
|
|
71
|
+
export declare function resetIndex(rootDir: string): Promise<ResetResult>;
|
|
53
72
|
/**
|
|
54
73
|
* Ensure the index is fresh by checking for changes and updating incrementally.
|
|
55
74
|
* This function is designed to be called before search to transparently manage the index.
|
|
@@ -65,15 +84,22 @@ export declare function indexDirectory(rootDir: string, options?: IndexOptions):
|
|
|
65
84
|
* @returns Statistics about what was updated
|
|
66
85
|
*/
|
|
67
86
|
export declare function ensureIndexFresh(rootDir: string, options?: IndexOptions): Promise<EnsureFreshResult>;
|
|
87
|
+
/**
|
|
88
|
+
* Options for cleanup operation
|
|
89
|
+
*/
|
|
90
|
+
export interface CleanupOptions {
|
|
91
|
+
/** Show detailed progress */
|
|
92
|
+
verbose?: boolean;
|
|
93
|
+
/** Logger for progress reporting */
|
|
94
|
+
logger?: Logger;
|
|
95
|
+
}
|
|
68
96
|
/**
|
|
69
97
|
* Clean up stale index entries for files that no longer exist
|
|
70
98
|
* @param rootDir - Root directory of the project
|
|
71
99
|
* @param options - Cleanup options
|
|
72
100
|
* @returns Array of cleanup results per module
|
|
73
101
|
*/
|
|
74
|
-
export declare function cleanupIndex(rootDir: string, options?:
|
|
75
|
-
verbose?: boolean;
|
|
76
|
-
}): Promise<CleanupResult[]>;
|
|
102
|
+
export declare function cleanupIndex(rootDir: string, options?: CleanupOptions): Promise<CleanupResult[]>;
|
|
77
103
|
/**
|
|
78
104
|
* Get the current status of the index
|
|
79
105
|
* @param rootDir - Root directory of the project
|