@entro314labs/ai-changelog-generator 3.1.1 → 3.2.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +412 -875
  2. package/README.md +8 -3
  3. package/ai-changelog-mcp.sh +0 -0
  4. package/ai-changelog.sh +0 -0
  5. package/bin/ai-changelog-dxt.js +9 -9
  6. package/bin/ai-changelog-mcp.js +19 -17
  7. package/bin/ai-changelog.js +6 -6
  8. package/package.json +80 -48
  9. package/src/ai-changelog-generator.js +91 -81
  10. package/src/application/orchestrators/changelog.orchestrator.js +791 -516
  11. package/src/application/services/application.service.js +137 -128
  12. package/src/cli.js +76 -57
  13. package/src/domains/ai/ai-analysis.service.js +289 -209
  14. package/src/domains/analysis/analysis.engine.js +328 -192
  15. package/src/domains/changelog/changelog.service.js +1174 -783
  16. package/src/domains/changelog/workspace-changelog.service.js +487 -249
  17. package/src/domains/git/git-repository.analyzer.js +348 -258
  18. package/src/domains/git/git.service.js +132 -112
  19. package/src/infrastructure/cli/cli.controller.js +390 -274
  20. package/src/infrastructure/config/configuration.manager.js +220 -190
  21. package/src/infrastructure/interactive/interactive-staging.service.js +154 -135
  22. package/src/infrastructure/interactive/interactive-workflow.service.js +200 -159
  23. package/src/infrastructure/mcp/mcp-server.service.js +208 -207
  24. package/src/infrastructure/metrics/metrics.collector.js +140 -123
  25. package/src/infrastructure/providers/core/base-provider.js +87 -40
  26. package/src/infrastructure/providers/implementations/anthropic.js +101 -99
  27. package/src/infrastructure/providers/implementations/azure.js +124 -101
  28. package/src/infrastructure/providers/implementations/bedrock.js +136 -126
  29. package/src/infrastructure/providers/implementations/dummy.js +23 -23
  30. package/src/infrastructure/providers/implementations/google.js +123 -114
  31. package/src/infrastructure/providers/implementations/huggingface.js +94 -87
  32. package/src/infrastructure/providers/implementations/lmstudio.js +75 -60
  33. package/src/infrastructure/providers/implementations/mock.js +69 -73
  34. package/src/infrastructure/providers/implementations/ollama.js +89 -66
  35. package/src/infrastructure/providers/implementations/openai.js +88 -89
  36. package/src/infrastructure/providers/implementations/vertex.js +227 -197
  37. package/src/infrastructure/providers/provider-management.service.js +245 -207
  38. package/src/infrastructure/providers/provider-manager.service.js +145 -125
  39. package/src/infrastructure/providers/utils/base-provider-helpers.js +308 -302
  40. package/src/infrastructure/providers/utils/model-config.js +220 -195
  41. package/src/infrastructure/providers/utils/provider-utils.js +105 -100
  42. package/src/infrastructure/validation/commit-message-validation.service.js +259 -161
  43. package/src/shared/constants/colors.js +453 -180
  44. package/src/shared/utils/cli-demo.js +285 -0
  45. package/src/shared/utils/cli-entry-utils.js +257 -249
  46. package/src/shared/utils/cli-ui.js +447 -0
  47. package/src/shared/utils/diff-processor.js +513 -0
  48. package/src/shared/utils/error-classes.js +125 -156
  49. package/src/shared/utils/json-utils.js +93 -89
  50. package/src/shared/utils/utils.js +1117 -945
  51. package/types/index.d.ts +353 -344
package/types/index.d.ts CHANGED
@@ -5,460 +5,469 @@
5
5
 
6
6
  // Core Git Types
7
7
  export interface CommitInfo {
8
- hash: string;
9
- author: string;
10
- email: string;
11
- date: string;
12
- message: string;
13
- files?: string[];
14
- additions?: number;
15
- deletions?: number;
16
- type?: string;
17
- scope?: string;
18
- subject?: string;
19
- body?: string;
20
- footer?: string;
21
- breaking?: boolean;
8
+ hash: string
9
+ author: string
10
+ email: string
11
+ date: string
12
+ message: string
13
+ files?: string[]
14
+ additions?: number
15
+ deletions?: number
16
+ type?: string
17
+ scope?: string
18
+ subject?: string
19
+ body?: string
20
+ footer?: string
21
+ breaking?: boolean
22
22
  }
23
23
 
24
24
  export interface GitInfo {
25
25
  repository: {
26
- name: string;
27
- owner: string;
28
- url: string;
29
- remoteUrl: string;
30
- };
31
- currentBranch: string;
32
- totalCommits: number;
33
- contributors: number;
26
+ name: string
27
+ owner: string
28
+ url: string
29
+ remoteUrl: string
30
+ }
31
+ currentBranch: string
32
+ totalCommits: number
33
+ contributors: number
34
34
  lastCommit: {
35
- hash: string;
36
- date: string;
37
- author: string;
38
- };
35
+ hash: string
36
+ date: string
37
+ author: string
38
+ }
39
39
  stats: {
40
- branches: number;
41
- tags: number;
42
- stashes: number;
43
- };
40
+ branches: number
41
+ tags: number
42
+ stashes: number
43
+ }
44
44
  }
45
45
 
46
46
  export interface GitStatus {
47
- staged: string[];
48
- unstaged: string[];
49
- untracked: string[];
50
- conflicts: string[];
51
- ahead: number;
52
- behind: number;
47
+ staged: string[]
48
+ unstaged: string[]
49
+ untracked: string[]
50
+ conflicts: string[]
51
+ ahead: number
52
+ behind: number
53
53
  }
54
54
 
55
55
  export interface BranchAnalysis {
56
56
  branches: Array<{
57
- name: string;
58
- current: boolean;
57
+ name: string
58
+ current: boolean
59
59
  lastCommit: {
60
- hash: string;
61
- date: string;
62
- author: string;
63
- message: string;
64
- };
65
- ahead: number;
66
- behind: number;
67
- unmergedCommits: CommitInfo[];
68
- }>;
69
- danglingCommits: CommitInfo[];
70
- recommendations: string[];
60
+ hash: string
61
+ date: string
62
+ author: string
63
+ message: string
64
+ }
65
+ ahead: number
66
+ behind: number
67
+ unmergedCommits: CommitInfo[]
68
+ }>
69
+ danglingCommits: CommitInfo[]
70
+ recommendations: string[]
71
71
  }
72
72
 
73
73
  // AI Provider Types
74
- export type AIProvider = 'openai' | 'azure' | 'auto';
75
- export type AIModel =
76
- | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano'
77
- | 'gpt-4o' | 'gpt-4o-mini'
78
- | 'gpt-4' | 'gpt-3.5-turbo'
79
- | 'o4' | 'o4-mini' // Latest reasoning models
80
- | 'o3' | 'o3-mini'; // Previous generation reasoning models
74
+ export type AIProvider = 'openai' | 'azure' | 'auto'
75
+ export type AIModel =
76
+ | 'gpt-4.1'
77
+ | 'gpt-4.1-mini'
78
+ | 'gpt-4.1-nano'
79
+ | 'gpt-4o'
80
+ | 'gpt-4o-mini'
81
+ | 'gpt-4'
82
+ | 'gpt-3.5-turbo'
83
+ | 'o4'
84
+ | 'o4-mini' // Latest reasoning models
85
+ | 'o3'
86
+ | 'o3-mini' // Previous generation reasoning models
81
87
 
82
88
  export interface ModelCapabilities {
83
- reasoning: boolean;
84
- largeContext: boolean;
85
- mediumContext: boolean;
86
- standardContext: boolean;
87
- promptCaching: boolean;
88
- textGeneration: boolean;
89
- tools: boolean;
90
- parallelToolCalling: boolean;
91
- reasoningSummary: boolean;
92
- latestReasoning: boolean;
93
- ultraEfficient: boolean;
94
- costEfficient: boolean;
95
- codingOptimized: boolean;
89
+ reasoning: boolean
90
+ largeContext: boolean
91
+ mediumContext: boolean
92
+ standardContext: boolean
93
+ promptCaching: boolean
94
+ textGeneration: boolean
95
+ tools: boolean
96
+ parallelToolCalling: boolean
97
+ reasoningSummary: boolean
98
+ latestReasoning: boolean
99
+ ultraEfficient: boolean
100
+ costEfficient: boolean
101
+ codingOptimized: boolean
96
102
  }
97
103
 
98
104
  export interface AIProviderConfig {
99
- provider: AIProvider;
100
- openaiKey?: string;
105
+ provider: AIProvider
106
+ openaiKey?: string
101
107
  azureConfig?: {
102
- endpoint: string;
103
- key: string;
104
- deploymentName: string;
105
- apiVersion: string;
106
- useV1API?: boolean;
107
- };
108
+ endpoint: string
109
+ key: string
110
+ deploymentName: string
111
+ apiVersion: string
112
+ useV1API?: boolean
113
+ }
108
114
  modelConfig: {
109
- default: AIModel;
110
- simple: AIModel;
111
- complex: AIModel;
112
- reasoning: AIModel;
113
- advanced_reasoning: AIModel;
114
- reasoning_legacy: AIModel;
115
- advanced_reasoning_legacy: AIModel;
116
- nano: AIModel;
117
- };
115
+ default: AIModel
116
+ simple: AIModel
117
+ complex: AIModel
118
+ reasoning: AIModel
119
+ advanced_reasoning: AIModel
120
+ reasoning_legacy: AIModel
121
+ advanced_reasoning_legacy: AIModel
122
+ nano: AIModel
123
+ }
118
124
  }
119
125
 
120
126
  export interface AIResponse {
121
- content: string;
127
+ content: string
122
128
  usage?: {
123
- prompt_tokens: number;
124
- completion_tokens: number;
125
- total_tokens: number;
126
- };
127
- model: string;
129
+ prompt_tokens: number
130
+ completion_tokens: number
131
+ total_tokens: number
132
+ }
133
+ model: string
128
134
  }
129
135
 
130
136
  // Analysis Types
131
- export type AnalysisMode = 'standard' | 'detailed' | 'enterprise';
132
- export type OutputFormat = 'markdown' | 'json';
133
- export type TemplateType = 'standard' | 'keep-a-changelog' | 'simple' | 'semantic' | 'github';
137
+ export type AnalysisMode = 'standard' | 'detailed' | 'enterprise'
138
+ export type OutputFormat = 'markdown' | 'json'
139
+ export type TemplateType = 'standard' | 'keep-a-changelog' | 'simple' | 'semantic' | 'github'
134
140
 
135
141
  export interface ChangelogOptions {
136
- repositoryPath?: string;
137
- since?: string;
138
- version?: string;
139
- analysisMode?: AnalysisMode;
140
- outputFormat?: OutputFormat;
141
- includeUnreleased?: boolean;
142
- includeAIAnalysis?: boolean;
143
- model?: AIModel;
144
- template?: TemplateType;
145
- interactive?: boolean;
146
- validate?: boolean;
147
- metrics?: boolean;
142
+ repositoryPath?: string
143
+ since?: string
144
+ version?: string
145
+ analysisMode?: AnalysisMode
146
+ outputFormat?: OutputFormat
147
+ includeUnreleased?: boolean
148
+ includeAIAnalysis?: boolean
149
+ model?: AIModel
150
+ template?: TemplateType
151
+ interactive?: boolean
152
+ validate?: boolean
153
+ metrics?: boolean
148
154
  }
149
155
 
150
156
  export interface CommitAnalysis {
151
- totalCommits: number;
152
- commitsByType: Record<string, number>;
153
- commitsByAuthor: Record<string, number>;
157
+ totalCommits: number
158
+ commitsByType: Record<string, number>
159
+ commitsByAuthor: Record<string, number>
154
160
  timeRange: {
155
- from: string | null;
156
- to: string | null;
157
- };
158
- commits: Array<CommitInfo & {
159
- type: string;
160
- impact: 'minimal' | 'simple' | 'standard' | 'complex' | 'architectural';
161
- complexity: {
162
- files: number;
163
- lines: number;
164
- breaking: boolean;
165
- };
166
- }>;
161
+ from: string | null
162
+ to: string | null
163
+ }
164
+ commits: Array<
165
+ CommitInfo & {
166
+ type: string
167
+ impact: 'minimal' | 'simple' | 'standard' | 'complex' | 'architectural'
168
+ complexity: {
169
+ files: number
170
+ lines: number
171
+ breaking: boolean
172
+ }
173
+ }
174
+ >
167
175
  aiAnalysis?: {
168
- model: AIModel;
169
- summary: string;
170
- recommendations: string[];
171
- processingTime: number;
172
- };
176
+ model: AIModel
177
+ summary: string
178
+ recommendations: string[]
179
+ processingTime: number
180
+ }
173
181
  }
174
182
 
175
183
  export interface CurrentChangesAnalysis {
176
184
  staged: {
177
- files: string[];
178
- additions: number;
179
- deletions: number;
180
- summary: string;
181
- };
185
+ files: string[]
186
+ additions: number
187
+ deletions: number
188
+ summary: string
189
+ }
182
190
  unstaged: {
183
- files: string[];
184
- additions: number;
185
- deletions: number;
186
- summary: string;
187
- };
191
+ files: string[]
192
+ additions: number
193
+ deletions: number
194
+ summary: string
195
+ }
188
196
  untracked: {
189
- files: string[];
190
- categories: Record<string, string[]>;
191
- recommendations: string[];
192
- };
197
+ files: string[]
198
+ categories: Record<string, string[]>
199
+ recommendations: string[]
200
+ }
193
201
  aiAnalysis?: {
194
- model: AIModel;
195
- impact: string;
196
- suggestions: string[];
197
- readiness: 'ready' | 'needs-work' | 'incomplete';
198
- };
202
+ model: AIModel
203
+ impact: string
204
+ suggestions: string[]
205
+ readiness: 'ready' | 'needs-work' | 'incomplete'
206
+ }
199
207
  }
200
208
 
201
209
  export interface RepositoryHealthCheck {
202
- branches: BranchAnalysis;
210
+ branches: BranchAnalysis
203
211
  commits: {
204
- total: number;
205
- recent: CommitInfo[];
206
- dangling: CommitInfo[];
207
- };
212
+ total: number
213
+ recent: CommitInfo[]
214
+ dangling: CommitInfo[]
215
+ }
208
216
  files: {
209
- tracked: number;
210
- untracked: number;
211
- ignored: number;
212
- };
213
- recommendations: string[];
214
- health: 'excellent' | 'good' | 'needs-attention' | 'critical';
217
+ tracked: number
218
+ untracked: number
219
+ ignored: number
220
+ }
221
+ recommendations: string[]
222
+ health: 'excellent' | 'good' | 'needs-attention' | 'critical'
215
223
  }
216
224
 
217
225
  // Configuration Types
218
226
  export interface ConfigManager {
219
- get(key: string): any;
220
- getAll(): Record<string, any>;
221
- isAIAvailable(): boolean;
227
+ get(key: string): any
228
+ getAll(): Record<string, any>
229
+ isAIAvailable(): boolean
222
230
  getOptimalModelConfig(): {
223
- provider: AIProvider;
224
- models: Record<string, AIModel>;
225
- features: Partial<ModelCapabilities>;
226
- } | null;
231
+ provider: AIProvider
232
+ models: Record<string, AIModel>
233
+ features: Partial<ModelCapabilities>
234
+ } | null
227
235
  getModelRecommendation(commitInfo?: {
228
- files?: number;
229
- lines?: number;
230
- breaking?: boolean;
231
- complex?: boolean;
236
+ files?: number
237
+ lines?: number
238
+ breaking?: boolean
239
+ complex?: boolean
232
240
  }): {
233
- model: AIModel;
234
- reason: string;
235
- features: string[];
236
- } | null;
237
- validate(): boolean;
238
- createSampleConfig(): void;
241
+ model: AIModel
242
+ reason: string
243
+ features: string[]
244
+ } | null
245
+ validate(): boolean
246
+ createSampleConfig(): void
239
247
  }
240
248
 
241
249
  // MCP Server Types
242
250
  export interface MCPTool {
243
- name: string;
244
- description: string;
251
+ name: string
252
+ description: string
245
253
  inputSchema: {
246
- type: 'object';
247
- properties: Record<string, any>;
248
- required?: string[];
249
- };
254
+ type: 'object'
255
+ properties: Record<string, any>
256
+ required?: string[]
257
+ }
250
258
  }
251
259
 
252
260
  export interface MCPServerOptions {
253
- name?: string;
254
- version?: string;
261
+ name?: string
262
+ version?: string
255
263
  capabilities?: {
256
- tools?: Record<string, MCPTool>;
257
- };
264
+ tools?: Record<string, MCPTool>
265
+ }
258
266
  }
259
267
 
260
268
  // Template Types
261
269
  export interface TemplateData {
262
- title?: string;
263
- version?: string;
264
- date?: string;
265
- changes?: Record<string, Array<{
266
- description: string;
267
- hash?: string;
268
- author?: string;
269
- commitUrl?: string;
270
- details?: string;
271
- }>>;
270
+ title?: string
271
+ version?: string
272
+ date?: string
273
+ changes?: Record<
274
+ string,
275
+ Array<{
276
+ description: string
277
+ hash?: string
278
+ author?: string
279
+ commitUrl?: string
280
+ details?: string
281
+ }>
282
+ >
272
283
  metadata?: {
273
- totalCommits?: number;
274
- dateRange?: string;
275
- includeCommitHash?: boolean;
276
- includeAuthor?: boolean;
277
- };
278
- aiProvider?: string;
279
- summary?: string;
284
+ totalCommits?: number
285
+ dateRange?: string
286
+ includeCommitHash?: boolean
287
+ includeAuthor?: boolean
288
+ }
289
+ aiProvider?: string
290
+ summary?: string
280
291
  breaking?: Array<{
281
- description: string;
282
- migration?: string;
283
- }>;
284
- repository?: string;
292
+ description: string
293
+ migration?: string
294
+ }>
295
+ repository?: string
285
296
  }
286
297
 
287
298
  export interface TemplateEngine {
288
- render(template: TemplateType | ((data: TemplateData) => string), data: TemplateData): string;
289
- getAvailableTemplates(): TemplateType[];
290
- addCustomTemplate(name: string, template: (data: TemplateData) => string): void;
291
- getCategoryName(category: string): string;
299
+ render(
300
+ template: TemplateType | ((templateData: TemplateData) => string),
301
+ data: TemplateData
302
+ ): string
303
+ getAvailableTemplates(): TemplateType[]
304
+ addCustomTemplate(name: string, template: (templateData: TemplateData) => string): void
305
+ getCategoryName(category: string): string
292
306
  }
293
307
 
294
308
  // Main Classes
295
309
  export class AIChangelogGenerator {
296
- constructor(options?: {
297
- repositoryPath?: string;
298
- configPath?: string;
299
- });
300
-
310
+ constructor(constructorOptions?: {
311
+ repositoryPath?: string
312
+ configPath?: string
313
+ })
314
+
301
315
  // Core methods
302
- run(): Promise<void>;
303
- generateChangelog(options?: ChangelogOptions): Promise<string>;
304
- analyzeCommits(options?: {
305
- since?: string;
306
- limit?: number;
307
- repositoryPath?: string;
308
- }): Promise<CommitAnalysis>;
309
-
316
+ run(): Promise<void>
317
+ generateChangelog(changelogOptions?: ChangelogOptions): Promise<string>
318
+ analyzeCommits(commitOptions?: {
319
+ since?: string
320
+ limit?: number
321
+ repositoryPath?: string
322
+ }): Promise<CommitAnalysis>
323
+
310
324
  // Enhanced analysis methods
311
- analyzeCurrentChanges(options?: {
312
- includeAIAnalysis?: boolean;
313
- repositoryPath?: string;
314
- }): Promise<CurrentChangesAnalysis>;
315
-
316
- analyzeBranches(options?: {
317
- includeAllBranches?: boolean;
318
- repositoryPath?: string;
319
- }): Promise<BranchAnalysis>;
320
-
321
- analyzeRepository(options?: {
322
- repositoryPath?: string;
323
- }): Promise<RepositoryHealthCheck>;
324
-
325
+ analyzeCurrentChanges(analysisOptions?: {
326
+ includeAIAnalysis?: boolean
327
+ repositoryPath?: string
328
+ }): Promise<CurrentChangesAnalysis>
329
+
330
+ analyzeBranches(branchOptions?: {
331
+ includeAllBranches?: boolean
332
+ repositoryPath?: string
333
+ }): Promise<BranchAnalysis>
334
+
335
+ analyzeRepository(repoOptions?: { repositoryPath?: string }): Promise<RepositoryHealthCheck>
336
+
325
337
  // Configuration and validation
326
338
  validateConfig(): Promise<{
327
- success: boolean;
328
- provider?: AIProvider;
329
- model?: AIModel;
330
- capabilities?: ModelCapabilities;
331
- error?: string;
332
- }>;
333
-
339
+ success: boolean
340
+ provider?: AIProvider
341
+ model?: AIModel
342
+ capabilities?: ModelCapabilities
343
+ error?: string
344
+ }>
345
+
334
346
  validateModels(): Promise<{
335
- success: boolean;
347
+ success: boolean
336
348
  models?: Array<{
337
- name: AIModel;
338
- available: boolean;
339
- capabilities?: ModelCapabilities;
340
- }>;
341
- error?: string;
342
- }>;
343
-
349
+ name: AIModel
350
+ available: boolean
351
+ capabilities?: ModelCapabilities
352
+ }>
353
+ error?: string
354
+ }>
355
+
344
356
  // Git operations
345
- getGitInfo(options?: {
346
- includeStats?: boolean;
347
- repositoryPath?: string;
348
- }): Promise<GitInfo>;
357
+ getGitInfo(gitOptions?: { includeStats?: boolean; repositoryPath?: string }): Promise<GitInfo>
349
358
  }
350
359
 
351
360
  export class AIChangelogMCPServer {
352
- constructor(options?: MCPServerOptions);
353
-
354
- run(): Promise<void>;
355
-
361
+ constructor(options?: MCPServerOptions)
362
+
363
+ run(): Promise<void>
364
+
356
365
  // MCP Tools
357
366
  generateChangelog(params: {
358
- repositoryPath?: string;
359
- analysisMode?: AnalysisMode;
360
- outputFormat?: OutputFormat;
361
- since?: string;
362
- version?: string;
363
- includeUnreleased?: boolean;
364
- model?: AIModel;
365
- }): Promise<string>;
366
-
367
+ repositoryPath?: string
368
+ analysisMode?: AnalysisMode
369
+ outputFormat?: OutputFormat
370
+ since?: string
371
+ version?: string
372
+ includeUnreleased?: boolean
373
+ model?: AIModel
374
+ }): Promise<string>
375
+
367
376
  analyzeCommits(params: {
368
- repositoryPath?: string;
369
- limit?: number;
370
- since?: string;
371
- }): Promise<CommitAnalysis>;
372
-
377
+ repositoryPath?: string
378
+ limit?: number
379
+ since?: string
380
+ }): Promise<CommitAnalysis>
381
+
373
382
  analyzeCurrentChanges(params: {
374
- repositoryPath?: string;
375
- includeAIAnalysis?: boolean;
376
- }): Promise<CurrentChangesAnalysis>;
377
-
378
- getGitInfo(params: {
379
- repositoryPath?: string;
380
- includeStats?: boolean;
381
- }): Promise<GitInfo>;
382
-
383
+ repositoryPath?: string
384
+ includeAIAnalysis?: boolean
385
+ }): Promise<CurrentChangesAnalysis>
386
+
387
+ getGitInfo(params: { repositoryPath?: string; includeStats?: boolean }): Promise<GitInfo>
388
+
383
389
  configureAIProvider(params: {
384
- provider?: AIProvider;
385
- showModels?: boolean;
386
- testConnection?: boolean;
390
+ provider?: AIProvider
391
+ showModels?: boolean
392
+ testConnection?: boolean
387
393
  }): Promise<{
388
- success: boolean;
389
- provider?: AIProvider;
390
- models?: AIModel[];
391
- error?: string;
392
- }>;
393
-
394
+ success: boolean
395
+ provider?: AIProvider
396
+ models?: AIModel[]
397
+ error?: string
398
+ }>
399
+
394
400
  validateModels(params: {
395
- provider?: AIProvider;
396
- checkCapabilities?: boolean;
397
- testModels?: boolean;
401
+ provider?: AIProvider
402
+ checkCapabilities?: boolean
403
+ testModels?: boolean
398
404
  }): Promise<{
399
- success: boolean;
405
+ success: boolean
400
406
  models?: Array<{
401
- name: AIModel;
402
- available: boolean;
403
- capabilities?: ModelCapabilities;
404
- }>;
405
- error?: string;
406
- }>;
407
+ name: AIModel
408
+ available: boolean
409
+ capabilities?: ModelCapabilities
410
+ }>
411
+ error?: string
412
+ }>
407
413
  }
408
414
 
409
415
  // Utility Classes
410
- export class AIProvider {
411
- constructor();
412
-
413
- generateCompletion(messages: Array<{
414
- role: 'system' | 'user' | 'assistant';
415
- content: string;
416
- }>, options?: {
417
- temperature?: number;
418
- max_tokens?: number;
419
- model?: AIModel;
420
- }): Promise<AIResponse>;
421
-
422
- selectModelForCommit(commitInfo: CommitInfo): AIModel;
423
- getModelCapabilities(modelName: AIModel): ModelCapabilities;
416
+ export class AIProviderBase {
417
+ constructor()
418
+
419
+ generateCompletion(
420
+ messages: Array<{
421
+ role: 'system' | 'user' | 'assistant'
422
+ content: string
423
+ }>,
424
+ options?: {
425
+ temperature?: number
426
+ max_tokens?: number
427
+ model?: AIModel
428
+ }
429
+ ): Promise<AIResponse>
430
+
431
+ selectModelForCommit(commitInfo: CommitInfo): AIModel
432
+ getModelCapabilities(modelName: AIModel): ModelCapabilities
424
433
  validateModelAvailability(modelName: AIModel): Promise<{
425
- available: boolean;
426
- model?: string;
427
- capabilities?: ModelCapabilities;
428
- error?: string;
429
- }>;
430
-
434
+ available: boolean
435
+ model?: string
436
+ capabilities?: ModelCapabilities
437
+ error?: string
438
+ }>
439
+
431
440
  testConnection(): Promise<{
432
- success: boolean;
433
- response?: string;
434
- model?: string;
435
- error?: string;
436
- }>;
441
+ success: boolean
442
+ response?: string
443
+ model?: string
444
+ error?: string
445
+ }>
437
446
  }
438
447
 
439
448
  export class GitManager {
440
- constructor(repositoryPath?: string);
441
-
449
+ constructor(repositoryPath?: string)
450
+
442
451
  getCommits(options?: {
443
- since?: string;
444
- limit?: number;
445
- includeDiff?: boolean;
446
- }): Promise<CommitInfo[]>;
447
-
448
- getCurrentStatus(): Promise<GitStatus>;
449
- getBranches(): Promise<BranchAnalysis>;
450
- getInfo(): Promise<GitInfo>;
451
- validateRepository(): Promise<boolean>;
452
+ since?: string
453
+ limit?: number
454
+ includeDiff?: boolean
455
+ }): Promise<CommitInfo[]>
456
+
457
+ getCurrentStatus(): Promise<GitStatus>
458
+ getBranches(): Promise<BranchAnalysis>
459
+ getInfo(): Promise<GitInfo>
460
+ validateRepository(): Promise<boolean>
452
461
  }
453
462
 
454
463
  export class ChangelogTemplates {
455
- constructor();
456
-
457
- render(template: TemplateType, data: TemplateData): string;
458
- getAvailableTemplates(): TemplateType[];
459
- addCustomTemplate(name: string, template: (data: TemplateData) => string): void;
460
- getCategoryName(category: string): string;
464
+ constructor()
465
+
466
+ render(template: TemplateType, data: TemplateData): string
467
+ getAvailableTemplates(): TemplateType[]
468
+ addCustomTemplate(name: string, template: (templateData: TemplateData) => string): void
469
+ getCategoryName(category: string): string
461
470
  }
462
471
 
463
472
  // Export main entry points
464
- export { AIChangelogGenerator as default };
473
+ export { AIChangelogGenerator as default }