@git.zone/tsdoc 1.6.1 → 1.8.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.
@@ -66,6 +66,8 @@ export interface IContextConfig {
66
66
  prioritization?: IPrioritizationWeights;
67
67
  /** Tier configuration for adaptive trimming */
68
68
  tiers?: ITierConfig;
69
+ /** Iterative context building configuration */
70
+ iterative?: IIterativeConfig;
69
71
  }
70
72
 
71
73
  /**
@@ -244,4 +246,76 @@ export interface IAnalysisResult {
244
246
  totalFiles: number;
245
247
  /** Analysis duration in ms */
246
248
  analysisDuration: number;
249
+ }
250
+
251
+ /**
252
+ * Configuration for iterative context building
253
+ */
254
+ export interface IIterativeConfig {
255
+ /** Maximum number of iterations allowed */
256
+ maxIterations?: number;
257
+ /** Maximum files to request in first iteration */
258
+ firstPassFileLimit?: number;
259
+ /** Maximum files to request in subsequent iterations */
260
+ subsequentPassFileLimit?: number;
261
+ /** Temperature for AI decision making (0-1) */
262
+ temperature?: number;
263
+ /** Model to use for iterative decisions */
264
+ model?: string;
265
+ }
266
+
267
+ /**
268
+ * AI decision for file selection
269
+ */
270
+ export interface IFileSelectionDecision {
271
+ /** AI's reasoning for file selection */
272
+ reasoning: string;
273
+ /** File paths to load */
274
+ filesToLoad: string[];
275
+ /** Estimated tokens needed */
276
+ estimatedTokensNeeded?: number;
277
+ }
278
+
279
+ /**
280
+ * AI decision for context sufficiency
281
+ */
282
+ export interface IContextSufficiencyDecision {
283
+ /** Whether context is sufficient */
284
+ sufficient: boolean;
285
+ /** AI's reasoning */
286
+ reasoning: string;
287
+ /** Additional files needed (if not sufficient) */
288
+ additionalFilesNeeded?: string[];
289
+ }
290
+
291
+ /**
292
+ * State for a single iteration
293
+ */
294
+ export interface IIterationState {
295
+ /** Iteration number (1-based) */
296
+ iteration: number;
297
+ /** Files loaded in this iteration */
298
+ filesLoaded: IFileInfo[];
299
+ /** Tokens used in this iteration */
300
+ tokensUsed: number;
301
+ /** Total tokens used so far */
302
+ totalTokensUsed: number;
303
+ /** AI decision made in this iteration */
304
+ decision: IFileSelectionDecision | IContextSufficiencyDecision;
305
+ /** Duration of this iteration in ms */
306
+ duration: number;
307
+ }
308
+
309
+ /**
310
+ * Result of iterative context building
311
+ */
312
+ export interface IIterativeContextResult extends IContextResult {
313
+ /** Number of iterations performed */
314
+ iterationCount: number;
315
+ /** Details of each iteration */
316
+ iterations: IIterationState[];
317
+ /** Total API calls made */
318
+ apiCallCount: number;
319
+ /** Total duration in ms */
320
+ totalDuration: number;
247
321
  }