@git.zone/tsdoc 1.5.2 → 1.6.1

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.
@@ -58,6 +58,72 @@ export interface IContextConfig {
58
58
  };
59
59
  /** Trimming configuration */
60
60
  trimming?: ITrimConfig;
61
+ /** Cache configuration */
62
+ cache?: ICacheConfig;
63
+ /** Analyzer configuration */
64
+ analyzer?: IAnalyzerConfig;
65
+ /** Prioritization weights */
66
+ prioritization?: IPrioritizationWeights;
67
+ /** Tier configuration for adaptive trimming */
68
+ tiers?: ITierConfig;
69
+ }
70
+
71
+ /**
72
+ * Cache configuration
73
+ */
74
+ export interface ICacheConfig {
75
+ /** Whether caching is enabled */
76
+ enabled?: boolean;
77
+ /** Time-to-live in seconds */
78
+ ttl?: number;
79
+ /** Maximum cache size in MB */
80
+ maxSize?: number;
81
+ /** Cache directory path */
82
+ directory?: string;
83
+ }
84
+
85
+ /**
86
+ * Analyzer configuration
87
+ * Note: Smart analysis is always enabled; this config only controls advanced options
88
+ */
89
+ export interface IAnalyzerConfig {
90
+ /** Whether to use AI refinement for selection (advanced, disabled by default) */
91
+ useAIRefinement?: boolean;
92
+ /** AI model to use for refinement */
93
+ aiModel?: string;
94
+ }
95
+
96
+ /**
97
+ * Weights for file prioritization
98
+ */
99
+ export interface IPrioritizationWeights {
100
+ /** Weight for dependency centrality */
101
+ dependencyWeight?: number;
102
+ /** Weight for task relevance */
103
+ relevanceWeight?: number;
104
+ /** Weight for token efficiency */
105
+ efficiencyWeight?: number;
106
+ /** Weight for file recency */
107
+ recencyWeight?: number;
108
+ }
109
+
110
+ /**
111
+ * Tier configuration for adaptive trimming
112
+ */
113
+ export interface ITierConfig {
114
+ essential?: ITierSettings;
115
+ important?: ITierSettings;
116
+ optional?: ITierSettings;
117
+ }
118
+
119
+ /**
120
+ * Settings for a single tier
121
+ */
122
+ export interface ITierSettings {
123
+ /** Minimum score to qualify for this tier */
124
+ minScore: number;
125
+ /** Trimming level to apply */
126
+ trimLevel: 'none' | 'light' | 'aggressive';
61
127
  }
62
128
 
63
129
  /**
@@ -92,4 +158,90 @@ export interface IContextResult {
92
158
  excludedFiles: IFileInfo[];
93
159
  /** Token savings from trimming */
94
160
  tokenSavings: number;
161
+ }
162
+
163
+ /**
164
+ * File metadata without contents (for lazy loading)
165
+ */
166
+ export interface IFileMetadata {
167
+ /** The file path */
168
+ path: string;
169
+ /** The file's relative path from the project root */
170
+ relativePath: string;
171
+ /** File size in bytes */
172
+ size: number;
173
+ /** Last modified time (Unix timestamp) */
174
+ mtime: number;
175
+ /** Estimated token count (without loading full contents) */
176
+ estimatedTokens: number;
177
+ /** The file's importance score */
178
+ importanceScore?: number;
179
+ }
180
+
181
+ /**
182
+ * Cache entry for a file
183
+ */
184
+ export interface ICacheEntry {
185
+ /** File path */
186
+ path: string;
187
+ /** File contents */
188
+ contents: string;
189
+ /** Token count */
190
+ tokenCount: number;
191
+ /** Last modified time when cached */
192
+ mtime: number;
193
+ /** When this cache entry was created */
194
+ cachedAt: number;
195
+ }
196
+
197
+ /**
198
+ * Dependency information for a file
199
+ */
200
+ export interface IFileDependencies {
201
+ /** File path */
202
+ path: string;
203
+ /** Files this file imports */
204
+ imports: string[];
205
+ /** Files that import this file */
206
+ importedBy: string[];
207
+ /** Centrality score (0-1) - how central this file is in the dependency graph */
208
+ centrality: number;
209
+ }
210
+
211
+ /**
212
+ * Analysis result for a file
213
+ */
214
+ export interface IFileAnalysis {
215
+ /** File path */
216
+ path: string;
217
+ /** Task relevance score (0-1) */
218
+ relevanceScore: number;
219
+ /** Dependency centrality score (0-1) */
220
+ centralityScore: number;
221
+ /** Token efficiency score (0-1) */
222
+ efficiencyScore: number;
223
+ /** Recency score (0-1) */
224
+ recencyScore: number;
225
+ /** Combined importance score (0-1) */
226
+ importanceScore: number;
227
+ /** Assigned tier */
228
+ tier: 'essential' | 'important' | 'optional' | 'excluded';
229
+ /** Reason for the score */
230
+ reason?: string;
231
+ }
232
+
233
+ /**
234
+ * Result of context analysis
235
+ */
236
+ export interface IAnalysisResult {
237
+ /** Task type being analyzed */
238
+ taskType: TaskType;
239
+ /** Analyzed files with scores */
240
+ files: IFileAnalysis[];
241
+ /** Dependency graph */
242
+ dependencyGraph: Map<string, IFileDependencies>;
243
+ /** Total files analyzed */
244
+ totalFiles: number;
245
+ /** Analysis duration in ms */
246
+ analysisDuration: number;
95
247
  }