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.
@@ -4,7 +4,7 @@
4
4
  * Implements the EmbeddingProvider port using Transformers.js for local embeddings.
5
5
  * Models are automatically downloaded and cached on first use.
6
6
  */
7
- import type { EmbeddingProvider, EmbeddingConfig, EmbeddingModelName } from '../../domain/ports';
7
+ import type { EmbeddingProvider, EmbeddingConfig, EmbeddingModelName } from "../../domain/ports";
8
8
  /** Available embedding models and their Hugging Face IDs */
9
9
  export declare const EMBEDDING_MODELS: Record<EmbeddingModelName, string>;
10
10
  /**
@@ -8,3 +8,4 @@ export { NodeFileSystem, nodeFileSystem } from "./filesystem";
8
8
  export { TransformersEmbeddingProvider, getCacheDir, isModelCached, } from "./embeddings";
9
9
  export { FileIndexStorage, SymbolicIndex, getSymbolicPath } from "./storage";
10
10
  export { DEFAULT_CONFIG, EMBEDDING_MODELS, getRaggrepDir, getModuleIndexPath, getModuleManifestPath, getGlobalManifestPath, getConfigPath, loadConfig, saveConfig, getModuleConfig, getEmbeddingConfigFromModule, } from "./config";
11
+ export { ConsoleLogger, InlineProgressLogger, SilentLogger, createLogger, createInlineLogger, createSilentLogger, } from "./logger";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Logger Infrastructure
3
+ *
4
+ * Implements the Logger port with various logging strategies.
5
+ */
6
+ export { ConsoleLogger, InlineProgressLogger, SilentLogger, createLogger, createInlineLogger, createSilentLogger, } from "./loggers";
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Logger Implementations
3
+ *
4
+ * Provides different logging strategies for various use cases:
5
+ * - ConsoleLogger: Standard console output (default for SDK)
6
+ * - InlineProgressLogger: Progress with inline replacement (for CLI)
7
+ * - SilentLogger: No output (for quiet mode)
8
+ */
9
+ import type { Logger } from "../../domain/ports";
10
+ /**
11
+ * Logger options
12
+ */
13
+ export interface LoggerOptions {
14
+ /** Show debug messages */
15
+ verbose?: boolean;
16
+ }
17
+ /**
18
+ * Standard console logger.
19
+ * Logs messages normally without inline replacement.
20
+ * Default for SDK usage.
21
+ */
22
+ export declare class ConsoleLogger implements Logger {
23
+ private verbose;
24
+ constructor(options?: LoggerOptions);
25
+ info(message: string): void;
26
+ warn(message: string): void;
27
+ error(message: string): void;
28
+ debug(message: string): void;
29
+ progress(message: string): void;
30
+ clearProgress(): void;
31
+ }
32
+ /**
33
+ * CLI logger with inline progress replacement.
34
+ * Uses carriage return to overwrite progress lines in place.
35
+ * Best for terminal environments with stdout/stderr.
36
+ */
37
+ export declare class InlineProgressLogger implements Logger {
38
+ private verbose;
39
+ private lastProgressLength;
40
+ private hasProgress;
41
+ constructor(options?: LoggerOptions);
42
+ info(message: string): void;
43
+ warn(message: string): void;
44
+ error(message: string): void;
45
+ debug(message: string): void;
46
+ progress(message: string): void;
47
+ clearProgress(): void;
48
+ }
49
+ /**
50
+ * Silent logger that produces no output.
51
+ * Used for quiet mode or testing.
52
+ */
53
+ export declare class SilentLogger implements Logger {
54
+ info(): void;
55
+ warn(): void;
56
+ error(): void;
57
+ debug(): void;
58
+ progress(): void;
59
+ clearProgress(): void;
60
+ }
61
+ /**
62
+ * Create a standard console logger.
63
+ * Default for SDK usage.
64
+ */
65
+ export declare function createLogger(options?: LoggerOptions): Logger;
66
+ /**
67
+ * Create an inline progress logger for CLI usage.
68
+ * Progress messages replace the current line.
69
+ */
70
+ export declare function createInlineLogger(options?: LoggerOptions): Logger;
71
+ /**
72
+ * Create a silent logger.
73
+ * Produces no output.
74
+ */
75
+ export declare function createSilentLogger(): Logger;
@@ -31,6 +31,7 @@ export declare class TypeScriptModule implements IndexModule {
31
31
  private symbolicIndex;
32
32
  private pendingSummaries;
33
33
  private rootDir;
34
+ private logger;
34
35
  initialize(config: ModuleConfig): Promise<void>;
35
36
  indexFile(filepath: string, content: string, ctx: IndexContext): Promise<FileIndex | null>;
36
37
  /**
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Ranking Quality Tests
3
+ *
4
+ * These tests verify that search results are ranked appropriately.
5
+ * They serve as regression tests when making ranking improvements.
6
+ *
7
+ * Test structure:
8
+ * - Each test specifies a query and expected ranking criteria
9
+ * - Tests check relative ordering, not absolute scores
10
+ * - Tests use the scenarios/basic folder
11
+ */
12
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "raggrep",
3
- "version": "0.2.3",
3
+ "version": "0.4.0",
4
4
  "description": "Local filesystem-based RAG system for codebases - semantic search using local embeddings",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",