raggrep 0.1.6 → 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.
Files changed (23) hide show
  1. package/dist/app/indexer/index.d.ts +2 -2
  2. package/dist/cli/main.js +683 -489
  3. package/dist/cli/main.js.map +17 -16
  4. package/dist/{introspection/conventions/types.d.ts → domain/entities/conventions.d.ts} +6 -5
  5. package/dist/domain/entities/index.d.ts +2 -0
  6. package/dist/{introspection → domain/services}/conventions/configFiles.d.ts +1 -1
  7. package/dist/{introspection → domain/services}/conventions/entryPoints.d.ts +1 -1
  8. package/dist/{introspection → domain/services}/conventions/frameworks/convex.d.ts +1 -1
  9. package/dist/{introspection → domain/services}/conventions/frameworks/index.d.ts +1 -1
  10. package/dist/{introspection → domain/services}/conventions/frameworks/nextjs.d.ts +1 -1
  11. package/dist/{introspection → domain/services}/conventions/index.d.ts +5 -5
  12. package/dist/domain/services/introspection.d.ts +31 -0
  13. package/dist/index.js +646 -465
  14. package/dist/index.js.map +16 -16
  15. package/dist/{introspection/index.d.ts → infrastructure/introspection/IntrospectionIndex.d.ts} +3 -14
  16. package/dist/infrastructure/introspection/index.d.ts +9 -0
  17. package/dist/{introspection → infrastructure/introspection}/projectDetector.d.ts +3 -12
  18. package/dist/types.d.ts +4 -4
  19. package/package.json +1 -1
  20. package/dist/introspection/fileIntrospector.d.ts +0 -14
  21. /package/dist/{introspection/types.d.ts → domain/entities/introspection.d.ts} +0 -0
  22. /package/dist/{introspection → domain/services}/conventions/conventions.test.d.ts +0 -0
  23. /package/dist/{introspection → domain/services}/introspection.test.d.ts +0 -0
@@ -1,8 +1,13 @@
1
1
  /**
2
- * Types for File Conventions
2
+ * Convention Types
3
3
  *
4
4
  * Defines patterns for recognizing special files and their semantic meaning.
5
+ * Used by the conventions service to add semantic keywords to the search index.
5
6
  */
7
+ /**
8
+ * Categories for organizing conventions.
9
+ */
10
+ export type ConventionCategory = "entry-point" | "configuration" | "framework" | "types" | "test" | "documentation" | "build" | "deployment";
6
11
  /**
7
12
  * A file convention pattern that matches files and provides keywords.
8
13
  */
@@ -33,10 +38,6 @@ export interface FileConvention {
33
38
  */
34
39
  dynamicKeywords?: (filepath: string) => string[];
35
40
  }
36
- /**
37
- * Categories for organizing conventions.
38
- */
39
- export type ConventionCategory = "entry-point" | "configuration" | "framework" | "types" | "test" | "documentation" | "build" | "deployment";
40
41
  /**
41
42
  * A framework convention provider.
42
43
  * Frameworks can register their own conventions.
@@ -12,3 +12,5 @@ export type { SearchResult, SearchOptions, SearchContributions, CoreContribution
12
12
  export { DEFAULT_SEARCH_OPTIONS } from "./searchResult";
13
13
  export type { Config, ModuleConfig } from "./config";
14
14
  export { DEFAULT_IGNORE_PATHS, DEFAULT_EXTENSIONS, createDefaultConfig, } from "./config";
15
+ export type { FileIntrospection, ProjectStructure, Project, ProjectType, Scope, IntrospectionConfig, } from "./introspection";
16
+ export type { FileConvention, ConventionCategory, FrameworkConventions, ConventionMatch, } from "./conventions";
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Patterns for recognizing common configuration files.
5
5
  */
6
- import type { FileConvention } from "./types";
6
+ import type { FileConvention } from "../../entities/conventions";
7
7
  /**
8
8
  * Configuration file conventions.
9
9
  */
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Patterns for recognizing module entry points and barrel files.
5
5
  */
6
- import type { FileConvention } from "./types";
6
+ import type { FileConvention } from "../../entities/conventions";
7
7
  /**
8
8
  * Entry point conventions for JavaScript/TypeScript projects.
9
9
  */
@@ -4,7 +4,7 @@
4
4
  * Patterns for recognizing Convex backend files and structures.
5
5
  * Convex is a backend platform with real-time sync.
6
6
  */
7
- import type { FrameworkConventions } from "../types";
7
+ import type { FrameworkConventions } from "../../../entities/conventions";
8
8
  /**
9
9
  * Convex framework conventions provider.
10
10
  */
@@ -4,7 +4,7 @@
4
4
  * Central registry for framework-specific conventions.
5
5
  * Add new frameworks here to extend convention support.
6
6
  */
7
- import type { FrameworkConventions } from "../types";
7
+ import type { FrameworkConventions } from "../../../entities/conventions";
8
8
  /**
9
9
  * All registered framework convention providers.
10
10
  * Add new frameworks to this array.
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Patterns for recognizing Next.js specific files and structures.
5
5
  */
6
- import type { FrameworkConventions } from "../types";
6
+ import type { FrameworkConventions } from "../../../entities/conventions";
7
7
  /**
8
8
  * Next.js framework conventions provider.
9
9
  */
@@ -1,8 +1,8 @@
1
1
  /**
2
- * File Conventions Module
2
+ * File Conventions Service
3
3
  *
4
- * Provides semantic keywords for files based on common conventions.
5
- * This helps improve search relevance by recognizing special file patterns.
4
+ * Pure functions for matching files against conventions and extracting keywords.
5
+ * No I/O operations - all functions operate on file paths.
6
6
  *
7
7
  * Categories:
8
8
  * - Entry Points: index.ts, main.ts, App.tsx, etc.
@@ -14,8 +14,8 @@
14
14
  * - Add new conventions to entryPoints.ts or configFiles.ts
15
15
  * - Add new frameworks in the frameworks/ directory
16
16
  */
17
- import type { FileConvention, ConventionMatch } from "./types";
18
- export type { FileConvention, ConventionCategory, ConventionMatch, FrameworkConventions, } from "./types";
17
+ import type { FileConvention, ConventionMatch } from "../../entities/conventions";
18
+ export type { FileConvention, ConventionCategory, ConventionMatch, FrameworkConventions, } from "../../entities/conventions";
19
19
  /**
20
20
  * Get all conventions including built-in ones.
21
21
  */
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Introspection Service
3
+ *
4
+ * Pure functions for extracting file metadata from paths and content.
5
+ * No I/O operations - all functions operate on provided data.
6
+ */
7
+ import type { FileIntrospection, Project, ProjectStructure, Scope } from "../entities/introspection";
8
+ /**
9
+ * Extract introspection metadata for a file.
10
+ *
11
+ * @param filepath - Relative file path
12
+ * @param structure - Project structure (from detectProjectStructure)
13
+ * @param fileContent - Optional file content for framework detection
14
+ */
15
+ export declare function introspectFile(filepath: string, structure: ProjectStructure, fileContent?: string): FileIntrospection;
16
+ /**
17
+ * Extract keywords from introspection for search boosting.
18
+ */
19
+ export declare function introspectionToKeywords(intro: FileIntrospection): string[];
20
+ /**
21
+ * Detect scope from project name.
22
+ */
23
+ export declare function detectScopeFromName(name: string): Scope;
24
+ /**
25
+ * Find which project a file belongs to.
26
+ */
27
+ export declare function findProjectForFile(filepath: string, structure: ProjectStructure): Project;
28
+ /**
29
+ * Calculate search boost based on introspection and query.
30
+ */
31
+ export declare function calculateIntrospectionBoost(intro: FileIntrospection, query: string): number;