raggrep 0.1.5 → 0.1.7
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 +23 -9
- package/dist/app/indexer/index.d.ts +2 -2
- package/dist/cli/main.js +1964 -918
- package/dist/cli/main.js.map +21 -14
- package/dist/domain/entities/conventions.d.ts +63 -0
- package/dist/domain/entities/index.d.ts +2 -0
- package/dist/domain/services/conventions/configFiles.d.ts +10 -0
- package/dist/domain/services/conventions/conventions.test.d.ts +4 -0
- package/dist/domain/services/conventions/entryPoints.d.ts +10 -0
- package/dist/domain/services/conventions/frameworks/convex.d.ts +11 -0
- package/dist/domain/services/conventions/frameworks/index.d.ts +22 -0
- package/dist/domain/services/conventions/frameworks/nextjs.d.ts +10 -0
- package/dist/domain/services/conventions/index.d.ts +39 -0
- package/dist/domain/services/introspection.d.ts +31 -0
- package/dist/index.js +1452 -416
- package/dist/index.js.map +20 -14
- package/dist/infrastructure/config/configLoader.d.ts +22 -3
- package/dist/infrastructure/config/index.d.ts +1 -1
- package/dist/{introspection/index.d.ts → infrastructure/introspection/IntrospectionIndex.d.ts} +3 -14
- package/dist/infrastructure/introspection/index.d.ts +9 -0
- package/dist/{introspection → infrastructure/introspection}/projectDetector.d.ts +3 -12
- package/dist/tests/integration.test.d.ts +9 -0
- package/dist/types.d.ts +4 -4
- package/package.json +1 -1
- package/dist/introspection/fileIntrospector.d.ts +0 -14
- /package/dist/{introspection/types.d.ts → domain/entities/introspection.d.ts} +0 -0
- /package/dist/{introspection → domain/services}/introspection.test.d.ts +0 -0
|
@@ -11,9 +11,27 @@ export declare const DEFAULT_CONFIG: Config;
|
|
|
11
11
|
/** Available embedding models (for validation) */
|
|
12
12
|
export declare const EMBEDDING_MODELS: Record<EmbeddingModelName, string>;
|
|
13
13
|
/**
|
|
14
|
-
* Get the
|
|
14
|
+
* Get the index storage directory path.
|
|
15
|
+
*
|
|
16
|
+
* Index data is stored in a system temp directory to avoid cluttering
|
|
17
|
+
* the user's project with index files. The temp path is derived from
|
|
18
|
+
* a hash of the project's absolute path to ensure uniqueness.
|
|
19
|
+
*
|
|
20
|
+
* Structure: {tmpdir}/raggrep-indexes/{hash}/
|
|
21
|
+
*
|
|
22
|
+
* @param rootDir - Absolute path to the project root
|
|
23
|
+
* @returns Absolute path to the index storage directory
|
|
24
|
+
*/
|
|
25
|
+
export declare function getRaggrepDir(rootDir: string, _config?: Config): string;
|
|
26
|
+
/**
|
|
27
|
+
* Get the index storage path and also return useful metadata.
|
|
28
|
+
* Helpful for debugging and user feedback.
|
|
15
29
|
*/
|
|
16
|
-
export declare function
|
|
30
|
+
export declare function getIndexLocation(rootDir: string): {
|
|
31
|
+
indexDir: string;
|
|
32
|
+
projectRoot: string;
|
|
33
|
+
projectHash: string;
|
|
34
|
+
};
|
|
17
35
|
/**
|
|
18
36
|
* Get the index data directory for a specific module
|
|
19
37
|
*/
|
|
@@ -27,7 +45,8 @@ export declare function getModuleManifestPath(rootDir: string, moduleId: string,
|
|
|
27
45
|
*/
|
|
28
46
|
export declare function getGlobalManifestPath(rootDir: string, config?: Config): string;
|
|
29
47
|
/**
|
|
30
|
-
* Get the config file path
|
|
48
|
+
* Get the config file path.
|
|
49
|
+
* Note: Config is still stored in the temp index directory, not the project.
|
|
31
50
|
*/
|
|
32
51
|
export declare function getConfigPath(rootDir: string, config?: Config): string;
|
|
33
52
|
/**
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Handles loading and saving RAGgrep configuration from the filesystem.
|
|
5
5
|
*/
|
|
6
|
-
export { DEFAULT_CONFIG, EMBEDDING_MODELS, getRaggrepDir, getModuleIndexPath, getModuleManifestPath, getGlobalManifestPath, getConfigPath, loadConfig, saveConfig, getModuleConfig, getEmbeddingConfigFromModule, } from "./configLoader";
|
|
6
|
+
export { DEFAULT_CONFIG, EMBEDDING_MODELS, getRaggrepDir, getIndexLocation, getModuleIndexPath, getModuleManifestPath, getGlobalManifestPath, getConfigPath, loadConfig, saveConfig, getModuleConfig, getEmbeddingConfigFromModule, } from "./configLoader";
|
package/dist/{introspection/index.d.ts → infrastructure/introspection/IntrospectionIndex.d.ts}
RENAMED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Introspection
|
|
2
|
+
* Introspection Index Storage
|
|
3
3
|
*
|
|
4
4
|
* Manages file metadata for context-aware search boosting.
|
|
5
|
+
* Handles saving and loading introspection data to/from disk.
|
|
5
6
|
*/
|
|
6
|
-
import type { FileIntrospection, ProjectStructure } from "
|
|
7
|
-
import type { Config } from "../domain/entities";
|
|
8
|
-
export type { FileIntrospection, ProjectStructure, Project, Scope, ProjectType } from "./types";
|
|
9
|
-
export { introspectFile, introspectionToKeywords } from "./fileIntrospector";
|
|
10
|
-
export { detectProjectStructure, detectScopeFromName } from "./projectDetector";
|
|
7
|
+
import type { FileIntrospection, ProjectStructure, Config } from "../../domain/entities";
|
|
11
8
|
/**
|
|
12
9
|
* Introspection index for a workspace.
|
|
13
10
|
*/
|
|
@@ -58,11 +55,3 @@ export declare class IntrospectionIndex {
|
|
|
58
55
|
*/
|
|
59
56
|
clear(): void;
|
|
60
57
|
}
|
|
61
|
-
/**
|
|
62
|
-
* Calculate search boost based on introspection and query.
|
|
63
|
-
*
|
|
64
|
-
* @param intro - File introspection
|
|
65
|
-
* @param query - Search query
|
|
66
|
-
* @returns Boost multiplier (1.0 = no boost, >1.0 = positive boost)
|
|
67
|
-
*/
|
|
68
|
-
export declare function calculateIntrospectionBoost(intro: FileIntrospection, query: string): number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Introspection Infrastructure
|
|
3
|
+
*
|
|
4
|
+
* File I/O operations for introspection:
|
|
5
|
+
* - Project structure detection (filesystem scanning)
|
|
6
|
+
* - Introspection index storage (save/load)
|
|
7
|
+
*/
|
|
8
|
+
export { IntrospectionIndex } from "./IntrospectionIndex";
|
|
9
|
+
export { detectProjectStructure } from "./projectDetector";
|
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
* Auto-detects monorepo structure and project types from:
|
|
5
5
|
* - Folder layout (apps/, packages/, etc.)
|
|
6
6
|
* - package.json files (for TypeScript/JavaScript projects)
|
|
7
|
+
*
|
|
8
|
+
* This module performs file I/O to scan the filesystem.
|
|
7
9
|
*/
|
|
8
|
-
import type {
|
|
9
|
-
/**
|
|
10
|
-
* Detect scope from project name.
|
|
11
|
-
*/
|
|
12
|
-
export declare function detectScopeFromName(name: string): Scope;
|
|
10
|
+
import type { ProjectStructure } from "../../domain/entities/introspection";
|
|
13
11
|
/**
|
|
14
12
|
* Detect project structure in a workspace.
|
|
15
13
|
*
|
|
@@ -18,10 +16,3 @@ export declare function detectScopeFromName(name: string): Scope;
|
|
|
18
16
|
* 2. package.json scanning for more accurate project boundaries
|
|
19
17
|
*/
|
|
20
18
|
export declare function detectProjectStructure(rootDir: string): Promise<ProjectStructure>;
|
|
21
|
-
/**
|
|
22
|
-
* Find which project a file belongs to.
|
|
23
|
-
*
|
|
24
|
-
* Matches against detected projects (from package.json and folder patterns).
|
|
25
|
-
* For nested projects, returns the most specific (deepest) match.
|
|
26
|
-
*/
|
|
27
|
-
export declare function findProjectForFile(filepath: string, structure: ProjectStructure): Project;
|
package/dist/types.d.ts
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* This file re-exports domain entities and defines module interfaces.
|
|
5
5
|
* For new code, prefer importing directly from 'domain/entities'.
|
|
6
6
|
*/
|
|
7
|
-
export type { Chunk, ChunkType, FileIndex, FileManifestEntry, ModuleManifest, GlobalManifest, FileSummary, Tier1Manifest, SearchResult, SearchOptions, SearchContributions, CoreContribution, LanguageContribution, IntrospectionContribution, Config, ModuleConfig, } from
|
|
8
|
-
export { createChunkId, DEFAULT_SEARCH_OPTIONS, DEFAULT_IGNORE_PATHS, DEFAULT_EXTENSIONS, createDefaultConfig, } from
|
|
9
|
-
import type { Config, FileIndex, SearchResult, SearchOptions, ModuleConfig } from
|
|
7
|
+
export type { Chunk, ChunkType, FileIndex, FileManifestEntry, ModuleManifest, GlobalManifest, FileSummary, Tier1Manifest, SearchResult, SearchOptions, SearchContributions, CoreContribution, LanguageContribution, IntrospectionContribution, Config, ModuleConfig, } from "./domain/entities";
|
|
8
|
+
export { createChunkId, DEFAULT_SEARCH_OPTIONS, DEFAULT_IGNORE_PATHS, DEFAULT_EXTENSIONS, createDefaultConfig, } from "./domain/entities";
|
|
9
|
+
import type { Config, FileIndex, SearchResult, SearchOptions, ModuleConfig } from "./domain/entities";
|
|
10
10
|
/**
|
|
11
11
|
* Context provided to modules during indexing
|
|
12
12
|
*/
|
|
13
|
-
import type { FileIntrospection } from
|
|
13
|
+
import type { FileIntrospection } from "./domain/entities/introspection";
|
|
14
14
|
export interface IndexContext {
|
|
15
15
|
rootDir: string;
|
|
16
16
|
config: Config;
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* File Introspection
|
|
3
|
-
*
|
|
4
|
-
* Extracts metadata from individual files for context-aware search.
|
|
5
|
-
*/
|
|
6
|
-
import type { FileIntrospection, ProjectStructure } from "./types";
|
|
7
|
-
/**
|
|
8
|
-
* Extract introspection metadata for a file.
|
|
9
|
-
*/
|
|
10
|
-
export declare function introspectFile(filepath: string, structure: ProjectStructure, fileContent?: string): FileIntrospection;
|
|
11
|
-
/**
|
|
12
|
-
* Extract keywords from introspection for search boosting.
|
|
13
|
-
*/
|
|
14
|
-
export declare function introspectionToKeywords(intro: FileIntrospection): string[];
|
|
File without changes
|
|
File without changes
|