@juspay/yama 1.1.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.
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Enhanced Description Enhancer - Optimized to work with Unified Context
3
+ * Preserves all original functionality from pr-describe.js but optimized
4
+ */
5
+ import { EnhancementOptions, EnhancementResult, AIProviderConfig } from '../types';
6
+ import { UnifiedContext } from '../core/ContextGatherer';
7
+ import { BitbucketProvider } from '../core/providers/BitbucketProvider';
8
+ export declare class DescriptionEnhancer {
9
+ private neurolink;
10
+ private bitbucketProvider;
11
+ private aiConfig;
12
+ private defaultRequiredSections;
13
+ constructor(bitbucketProvider: BitbucketProvider, aiConfig: AIProviderConfig);
14
+ /**
15
+ * Enhance description using pre-gathered unified context (OPTIMIZED)
16
+ */
17
+ enhanceWithContext(context: UnifiedContext, options: EnhancementOptions): Promise<EnhancementResult>;
18
+ /**
19
+ * Analyze existing PR description content
20
+ */
21
+ private analyzeExistingContent;
22
+ /**
23
+ * Extract preservable content (media, files, links)
24
+ */
25
+ private extractPreservableContent;
26
+ /**
27
+ * Validate presence of required sections
28
+ */
29
+ private validateRequiredSections;
30
+ /**
31
+ * Extract content for a specific section
32
+ */
33
+ private extractSectionContent;
34
+ /**
35
+ * Identify content gaps (TODOs, unanswered questions, etc.)
36
+ */
37
+ private identifyContentGaps;
38
+ /**
39
+ * Generate enhanced description using AI and unified context
40
+ */
41
+ private generateEnhancedDescription;
42
+ /**
43
+ * Build comprehensive enhancement prompt using unified context
44
+ */
45
+ private buildEnhancementPrompt;
46
+ /**
47
+ * Update PR description in Bitbucket
48
+ */
49
+ private updatePRDescription;
50
+ /**
51
+ * Show description preview for dry run
52
+ */
53
+ private showDescriptionPreview;
54
+ /**
55
+ * Generate enhancement result summary
56
+ */
57
+ private generateEnhancementResult;
58
+ /**
59
+ * Get enhancement statistics
60
+ */
61
+ getStats(): any;
62
+ }
63
+ export declare function createDescriptionEnhancer(bitbucketProvider: BitbucketProvider, aiConfig: AIProviderConfig): DescriptionEnhancer;
64
+ //# sourceMappingURL=DescriptionEnhancer.d.ts.map
@@ -0,0 +1,424 @@
1
+ "use strict";
2
+ /**
3
+ * Enhanced Description Enhancer - Optimized to work with Unified Context
4
+ * Preserves all original functionality from pr-describe.js but optimized
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.DescriptionEnhancer = void 0;
8
+ exports.createDescriptionEnhancer = createDescriptionEnhancer;
9
+ const types_1 = require("../types");
10
+ const Logger_1 = require("../utils/Logger");
11
+ class DescriptionEnhancer {
12
+ constructor(bitbucketProvider, aiConfig) {
13
+ this.defaultRequiredSections = [
14
+ { key: 'changelog', name: 'Changelog (Modules Modified)', required: true },
15
+ { key: 'testcases', name: 'Test Cases (What to be tested)', required: true },
16
+ { key: 'config_changes', name: 'CAC Config Or Service Config Changes', required: true }
17
+ ];
18
+ this.bitbucketProvider = bitbucketProvider;
19
+ this.aiConfig = aiConfig;
20
+ }
21
+ /**
22
+ * Enhance description using pre-gathered unified context (OPTIMIZED)
23
+ */
24
+ async enhanceWithContext(context, options) {
25
+ const startTime = Date.now();
26
+ try {
27
+ Logger_1.logger.phase('šŸ“ Enhancing PR description...');
28
+ Logger_1.logger.info(`Processing PR #${context.pr.id}: "${context.pr.title}"`);
29
+ // Step 1: Analyze existing content and identify what needs enhancement
30
+ const analysisResult = this.analyzeExistingContent(context.pr.description, options.customSections || this.defaultRequiredSections);
31
+ Logger_1.logger.info(`Content analysis: ${analysisResult.preservedContent.media.length} media items, ` +
32
+ `${analysisResult.missingCount} missing sections`);
33
+ // Step 2: Generate enhanced description using AI
34
+ const enhancedDescription = await this.generateEnhancedDescription(context, analysisResult, options);
35
+ // Step 3: Update PR description if not dry run
36
+ if (!options.dryRun) {
37
+ await this.updatePRDescription(context, enhancedDescription);
38
+ }
39
+ else {
40
+ this.showDescriptionPreview(enhancedDescription, analysisResult);
41
+ }
42
+ const duration = Math.round((Date.now() - startTime) / 1000);
43
+ const result = this.generateEnhancementResult(context.pr.description, enhancedDescription, analysisResult, duration);
44
+ Logger_1.logger.success(`Description enhancement completed in ${duration}s: ` +
45
+ `${result.sectionsAdded.length} sections added, ${result.sectionsEnhanced.length} enhanced`);
46
+ return result;
47
+ }
48
+ catch (error) {
49
+ Logger_1.logger.error(`Description enhancement failed: ${error.message}`);
50
+ throw new types_1.ProviderError(`Description enhancement failed: ${error.message}`);
51
+ }
52
+ }
53
+ /**
54
+ * Analyze existing PR description content
55
+ */
56
+ analyzeExistingContent(description, requiredSections) {
57
+ Logger_1.logger.debug('Analyzing existing PR description content...');
58
+ // Extract preservable content (media, files, links)
59
+ const preservedContent = this.extractPreservableContent(description);
60
+ // Validate required sections
61
+ const sectionsAnalysis = this.validateRequiredSections(description, requiredSections);
62
+ const missingCount = sectionsAnalysis.filter(s => !s.present).length;
63
+ // Identify content gaps
64
+ const gaps = this.identifyContentGaps(description);
65
+ return {
66
+ requiredSections: sectionsAnalysis,
67
+ missingCount,
68
+ preservedContent,
69
+ gaps
70
+ };
71
+ }
72
+ /**
73
+ * Extract preservable content (media, files, links)
74
+ */
75
+ extractPreservableContent(description) {
76
+ const preservableContent = {
77
+ media: [],
78
+ files: [],
79
+ links: [],
80
+ originalText: description || ''
81
+ };
82
+ if (!description) {
83
+ return preservableContent;
84
+ }
85
+ // Extract images and media (screenshots, etc.)
86
+ const mediaRegex = /!\[.*?\]\(.*?\)|<img[^>]*>|<video[^>]*>|<audio[^>]*>/g;
87
+ preservableContent.media = description.match(mediaRegex) || [];
88
+ // Extract file attachments
89
+ const fileRegex = /\[.*?\]\([^)]*\.(pdf|doc|docx|xls|xlsx|ppt|pptx|zip|rar|tar|gz)[^)]*\)/gi;
90
+ preservableContent.files = description.match(fileRegex) || [];
91
+ // Extract links (excluding images and files)
92
+ const linkRegex = /\[[^\]]*\]\([^)]+\)/g;
93
+ const allLinks = description.match(linkRegex) || [];
94
+ preservableContent.links = allLinks.filter(link => !mediaRegex.test(link) && !fileRegex.test(link));
95
+ Logger_1.logger.debug(`Preservable content: ${preservableContent.media.length} media, ` +
96
+ `${preservableContent.files.length} files, ${preservableContent.links.length} links`);
97
+ return preservableContent;
98
+ }
99
+ /**
100
+ * Validate presence of required sections
101
+ */
102
+ validateRequiredSections(description, requiredSections) {
103
+ if (!description) {
104
+ return requiredSections.map(section => ({
105
+ ...section,
106
+ present: false,
107
+ content: ''
108
+ }));
109
+ }
110
+ const sectionPatterns = {
111
+ changelog: [
112
+ /##.*?[Cc]hangelog/i,
113
+ /##.*?[Mm]odules?\s+[Mm]odified/i,
114
+ /##.*?[Cc]hanges?\s+[Mm]ade/i,
115
+ /šŸ“‹.*?[Cc]hangelog/i
116
+ ],
117
+ testcases: [
118
+ /##.*?[Tt]est\s+[Cc]ases?/i,
119
+ /##.*?[Tt]esting/i,
120
+ /🧪.*?[Tt]est/i,
121
+ /##.*?[Tt]est\s+[Pp]lan/i
122
+ ],
123
+ config_changes: [
124
+ /##.*?[Cc]onfig/i,
125
+ /##.*?CAC/i,
126
+ /##.*?[Ss]ervice\s+[Cc]onfig/i,
127
+ /āš™ļø.*?[Cc]onfig/i
128
+ ]
129
+ };
130
+ return requiredSections.map(section => {
131
+ const patterns = sectionPatterns[section.key];
132
+ const isPresent = patterns ? patterns.some(pattern => pattern.test(description)) : false;
133
+ return {
134
+ ...section,
135
+ present: isPresent,
136
+ content: isPresent ? this.extractSectionContent(description, patterns || []) : ''
137
+ };
138
+ });
139
+ }
140
+ /**
141
+ * Extract content for a specific section
142
+ */
143
+ extractSectionContent(description, patterns) {
144
+ for (const pattern of patterns) {
145
+ const match = description.match(pattern);
146
+ if (match) {
147
+ const startIndex = match.index + match[0].length;
148
+ const nextHeaderIndex = description.substring(startIndex).search(/\n##/);
149
+ const endIndex = nextHeaderIndex === -1 ? description.length : startIndex + nextHeaderIndex;
150
+ return description.substring(startIndex, endIndex).trim();
151
+ }
152
+ }
153
+ return '';
154
+ }
155
+ /**
156
+ * Identify content gaps (TODOs, unanswered questions, etc.)
157
+ */
158
+ identifyContentGaps(description) {
159
+ const gaps = [];
160
+ if (!description) {
161
+ gaps.push('No description provided');
162
+ return gaps;
163
+ }
164
+ // Check for unanswered questions and placeholders
165
+ const gapMarkers = [
166
+ { pattern: /\?\s*$/gm, name: 'unanswered questions' },
167
+ { pattern: /TODO/gi, name: 'TODO items' },
168
+ { pattern: /FIXME/gi, name: 'FIXME items' },
169
+ { pattern: /\[TBD\]/gi, name: 'TBD placeholders' },
170
+ { pattern: /\[TO BE DETERMINED\]/gi, name: 'TBD placeholders' },
171
+ { pattern: /\[PENDING\]/gi, name: 'pending items' }
172
+ ];
173
+ gapMarkers.forEach(marker => {
174
+ const matches = description.match(marker.pattern);
175
+ if (matches) {
176
+ gaps.push(`${matches.length} ${marker.name}`);
177
+ }
178
+ });
179
+ return gaps;
180
+ }
181
+ /**
182
+ * Generate enhanced description using AI and unified context
183
+ */
184
+ async generateEnhancedDescription(context, analysisResult, options) {
185
+ Logger_1.logger.debug('Generating AI-enhanced description...');
186
+ // Initialize NeuroLink with eval-based dynamic import
187
+ if (!this.neurolink) {
188
+ const dynamicImport = eval('(specifier) => import(specifier)');
189
+ const { NeuroLink } = await dynamicImport('@juspay/neurolink');
190
+ this.neurolink = new NeuroLink();
191
+ }
192
+ const enhancementPrompt = this.buildEnhancementPrompt(context, analysisResult, options);
193
+ try {
194
+ const result = await this.neurolink.generate({
195
+ input: { text: enhancementPrompt },
196
+ provider: this.aiConfig.provider,
197
+ model: this.aiConfig.model,
198
+ temperature: this.aiConfig.temperature || 0.7,
199
+ maxTokens: this.aiConfig.maxTokens || 1000000,
200
+ timeout: '8m', // Longer timeout for description generation
201
+ enableAnalytics: this.aiConfig.enableAnalytics,
202
+ enableEvaluation: this.aiConfig.enableEvaluation
203
+ });
204
+ let enhancedDescription = result.content || result.text || result.response || '';
205
+ // Clean up any markdown code blocks if AI wrapped the response
206
+ enhancedDescription = enhancedDescription
207
+ .replace(/^```markdown\s*/, '')
208
+ .replace(/\s*```$/, '')
209
+ .trim();
210
+ if (!enhancedDescription) {
211
+ throw new Error('AI generated empty description');
212
+ }
213
+ // Validate that required sections are present after enhancement
214
+ const finalValidation = this.validateRequiredSections(enhancedDescription, options.customSections || this.defaultRequiredSections);
215
+ const stillMissing = finalValidation.filter(s => !s.present);
216
+ if (stillMissing.length > 0) {
217
+ Logger_1.logger.warn(`Warning: ${stillMissing.length} required sections still missing after AI enhancement`);
218
+ }
219
+ return enhancedDescription;
220
+ }
221
+ catch (error) {
222
+ if (error.message?.includes('timeout')) {
223
+ Logger_1.logger.error('ā° Description enhancement timed out after 8 minutes');
224
+ throw new Error('Enhancement timeout - try with smaller diff or adjust timeout');
225
+ }
226
+ Logger_1.logger.error(`AI description generation failed: ${error.message}`);
227
+ throw error;
228
+ }
229
+ }
230
+ /**
231
+ * Build comprehensive enhancement prompt using unified context
232
+ */
233
+ buildEnhancementPrompt(context, analysisResult, _options) {
234
+ // Prepare diff information based on strategy
235
+ let diffInfo = '';
236
+ if (context.diffStrategy.strategy === 'whole' && context.prDiff) {
237
+ diffInfo = `**Diff Strategy**: Whole PR diff (${context.diffStrategy.fileCount} files)
238
+ **Changes**: ${JSON.stringify(context.prDiff.fileChanges?.slice(0, 20) || [], null, 2)}`;
239
+ }
240
+ else if (context.diffStrategy.strategy === 'file-by-file' && context.fileDiffs) {
241
+ const fileList = Array.from(context.fileDiffs.keys()).slice(0, 20);
242
+ diffInfo = `**Diff Strategy**: File-by-file analysis (${context.diffStrategy.fileCount} files)
243
+ **Modified Files**: ${JSON.stringify(fileList, null, 2)}`;
244
+ }
245
+ return `You are an expert technical writer specializing in comprehensive PR descriptions.
246
+
247
+ ## PR INFORMATION:
248
+ **Title**: ${context.pr.title}
249
+ **Author**: ${context.pr.author}
250
+ **Current Description**:
251
+ ${analysisResult.preservedContent.originalText || '[No existing description]'}
252
+
253
+ ## CODE CHANGES ANALYSIS:
254
+ ${diffInfo}
255
+
256
+ ## PROJECT CONTEXT:
257
+ ${context.projectContext.memoryBank.summary}
258
+
259
+ ## PROJECT RULES:
260
+ ${context.projectContext.clinerules || 'No specific rules defined'}
261
+
262
+ ## CONTENT PRESERVATION REQUIREMENTS:
263
+ **CRITICAL**: This is content ENHANCEMENT, not replacement!
264
+
265
+ ### Preserved Content Analysis:
266
+ - **Media Items**: ${analysisResult.preservedContent.media.length} (${analysisResult.preservedContent.media.join(', ')})
267
+ - **File Attachments**: ${analysisResult.preservedContent.files.length} (${analysisResult.preservedContent.files.join(', ')})
268
+ - **Links**: ${analysisResult.preservedContent.links.length}
269
+ - **Content Gaps**: ${analysisResult.gaps.join(', ') || 'None identified'}
270
+
271
+ ### PRESERVATION RULES:
272
+ - **NEVER REMOVE**: Screenshots, images, file attachments, existing explanations, or links
273
+ - **PRESERVE EXACTLY**: All media links, file references, and existing valuable content
274
+ - **ONLY ADD**: Missing required sections or enhance clearly incomplete ones
275
+ - **MAINTAIN**: Original structure, tone, and author's explanations
276
+
277
+ ## REQUIRED SECTIONS STATUS:
278
+ ${analysisResult.requiredSections.map(section => `
279
+ **${section.name}**:
280
+ - Present: ${section.present ? 'āœ… Yes' : 'āŒ Missing'}
281
+ - Content: ${section.content ? `"${section.content.substring(0, 100)}..."` : 'None'}
282
+ - Action Needed: ${section.present ? ((section.content?.length || 0) < 50 ? 'Enhancement' : 'None') : 'Add Section'}`).join('')}
283
+
284
+ ## REQUIRED SECTIONS TO IMPLEMENT:
285
+
286
+ ### 1. šŸ“‹ CHANGELOG (Modules Modified)
287
+ **Purpose**: Clear documentation of what changed
288
+ **Content Requirements**:
289
+ - List specific files/modules modified, added, or removed
290
+ - Categorize changes (Features, Bug Fixes, Improvements, Breaking Changes)
291
+ - Mention key components affected
292
+ - Highlight any architectural changes
293
+
294
+ ### 2. 🧪 TEST CASES (What to be tested)
295
+ **Purpose**: Comprehensive testing guidance
296
+ **Content Requirements**:
297
+ - Unit tests to run or add
298
+ - Integration test scenarios
299
+ - Manual testing steps for reviewers
300
+ - Edge cases to verify
301
+ - Regression testing considerations
302
+ - Performance testing if applicable
303
+
304
+ ### 3. āš™ļø CAC CONFIG OR SERVICE CONFIG CHANGES
305
+ **Purpose**: Infrastructure and configuration impact
306
+ **Content Requirements**:
307
+ - Configuration files modified
308
+ - Environment variables added/changed/removed
309
+ - Service configuration updates
310
+ - Database schema changes
311
+ - Deployment considerations
312
+ - If no config changes: explicitly state "No configuration changes required"
313
+
314
+ ## ENHANCEMENT STRATEGY:
315
+
316
+ ### For Missing Sections:
317
+ 1. **START** with the complete existing description
318
+ 2. **ANALYZE** the code changes to understand the scope
319
+ 3. **ADD** each missing required section with comprehensive content
320
+ 4. **EXTRACT** relevant information from the diff to populate sections
321
+
322
+ ### For Incomplete Sections:
323
+ 1. **PRESERVE** all existing content in the section
324
+ 2. **ENHANCE** with additional details based on code analysis
325
+ 3. **MAINTAIN** the original structure and format
326
+
327
+ ### Content Generation Guidelines:
328
+ - **Be Specific**: Use actual file names, function names, and module names from the changes
329
+ - **Be Actionable**: Provide clear, executable test instructions
330
+ - **Be Complete**: Cover all aspects of the change comprehensively
331
+ - **Be Professional**: Maintain technical accuracy and clear communication
332
+
333
+ ## OUTPUT REQUIREMENTS:
334
+ Return the COMPLETE enhanced description as properly formatted markdown text (NOT JSON).
335
+
336
+ **CRITICAL INSTRUCTIONS**:
337
+ 1. **START WITH**: The entire existing description as your foundation
338
+ 2. **PRESERVE**: Every single piece of existing content (media, links, explanations)
339
+ 3. **ADD ONLY**: Missing required sections at appropriate locations
340
+ 4. **ENHANCE ONLY**: Clearly incomplete sections with additional details
341
+ 5. **EXTRACT**: Specific details from the code changes for accuracy
342
+ 6. **MAINTAIN**: Professional tone and clear markdown formatting
343
+
344
+ Generate the enhanced description now, ensuring ALL preservation requirements are met:`;
345
+ }
346
+ /**
347
+ * Update PR description in Bitbucket
348
+ */
349
+ async updatePRDescription(context, enhancedDescription) {
350
+ Logger_1.logger.debug(`Updating PR description for #${context.pr.id}...`);
351
+ try {
352
+ await this.bitbucketProvider.updatePRDescription(context.identifier, enhancedDescription);
353
+ Logger_1.logger.success('āœ… PR description updated successfully');
354
+ }
355
+ catch (error) {
356
+ Logger_1.logger.error(`Failed to update PR description: ${error.message}`);
357
+ throw new types_1.ProviderError(`Description update failed: ${error.message}`);
358
+ }
359
+ }
360
+ /**
361
+ * Show description preview for dry run
362
+ */
363
+ showDescriptionPreview(enhancedDescription, analysisResult) {
364
+ console.log('\n' + '═'.repeat(80));
365
+ console.log('šŸ“ ENHANCED PR DESCRIPTION PREVIEW');
366
+ console.log('═'.repeat(80));
367
+ console.log(enhancedDescription);
368
+ console.log('═'.repeat(80));
369
+ console.log('\nšŸ“Š ENHANCEMENT SUMMARY:');
370
+ console.log(`āœ… Required sections completed: ${analysisResult.requiredSections.filter(s => s.present).length}/${analysisResult.requiredSections.length}`);
371
+ console.log(`šŸ“Ž Preserved content: ${analysisResult.preservedContent.media.length} media items, ${analysisResult.preservedContent.files.length} files`);
372
+ console.log(`šŸ“ Enhanced description length: ${enhancedDescription.length} characters`);
373
+ if (analysisResult.gaps.length > 0) {
374
+ console.log(`šŸ” Content gaps addressed: ${analysisResult.gaps.join(', ')}`);
375
+ }
376
+ }
377
+ /**
378
+ * Generate enhancement result summary
379
+ */
380
+ generateEnhancementResult(originalDescription, enhancedDescription, analysisResult, _duration) {
381
+ // Determine what sections were added or enhanced
382
+ const originalSections = this.validateRequiredSections(originalDescription, analysisResult.requiredSections);
383
+ const enhancedSections = this.validateRequiredSections(enhancedDescription, analysisResult.requiredSections);
384
+ const sectionsAdded = enhancedSections
385
+ .filter((enhanced, i) => enhanced.present && !originalSections[i].present)
386
+ .map(s => s.name);
387
+ const sectionsEnhanced = enhancedSections
388
+ .filter((enhanced, i) => enhanced.present && originalSections[i].present &&
389
+ (enhanced.content?.length || 0) > (originalSections[i].content?.length || 0) + 50)
390
+ .map(s => s.name);
391
+ const completedSections = enhancedSections.filter(s => s.present).length;
392
+ return {
393
+ originalDescription: originalDescription || '',
394
+ enhancedDescription,
395
+ sectionsAdded,
396
+ sectionsEnhanced,
397
+ preservedItems: {
398
+ media: analysisResult.preservedContent.media.length,
399
+ files: analysisResult.preservedContent.files.length,
400
+ links: analysisResult.preservedContent.links.length
401
+ },
402
+ statistics: {
403
+ originalLength: originalDescription?.length || 0,
404
+ enhancedLength: enhancedDescription.length,
405
+ completedSections,
406
+ totalSections: analysisResult.requiredSections.length
407
+ }
408
+ };
409
+ }
410
+ /**
411
+ * Get enhancement statistics
412
+ */
413
+ getStats() {
414
+ return {
415
+ defaultSections: this.defaultRequiredSections.length,
416
+ aiProvider: this.aiConfig.provider
417
+ };
418
+ }
419
+ }
420
+ exports.DescriptionEnhancer = DescriptionEnhancer;
421
+ function createDescriptionEnhancer(bitbucketProvider, aiConfig) {
422
+ return new DescriptionEnhancer(bitbucketProvider, aiConfig);
423
+ }
424
+ //# sourceMappingURL=DescriptionEnhancer.js.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Yama - Main package exports
3
+ * Provides both programmatic API and CLI access
4
+ */
5
+ export { Guardian, createGuardian, guardian } from './core/Guardian';
6
+ export { ContextGatherer, createContextGatherer } from './core/ContextGatherer';
7
+ export type { UnifiedContext, ProjectContext, DiffStrategy } from './core/ContextGatherer';
8
+ export { BitbucketProvider, createBitbucketProvider } from './core/providers/BitbucketProvider';
9
+ export { CodeReviewer, createCodeReviewer } from './features/CodeReviewer';
10
+ export { DescriptionEnhancer, createDescriptionEnhancer } from './features/DescriptionEnhancer';
11
+ export { Logger, createLogger, logger } from './utils/Logger';
12
+ export { Cache, createCache, cache } from './utils/Cache';
13
+ export { ConfigManager, createConfigManager, configManager } from './utils/ConfigManager';
14
+ export * from './types';
15
+ export { main as cli } from './cli/index';
16
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.js ADDED
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /**
3
+ * Yama - Main package exports
4
+ * Provides both programmatic API and CLI access
5
+ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.cli = exports.configManager = exports.createConfigManager = exports.ConfigManager = exports.cache = exports.createCache = exports.Cache = exports.logger = exports.createLogger = exports.Logger = exports.createDescriptionEnhancer = exports.DescriptionEnhancer = exports.createCodeReviewer = exports.CodeReviewer = exports.createBitbucketProvider = exports.BitbucketProvider = exports.createContextGatherer = exports.ContextGatherer = exports.guardian = exports.createGuardian = exports.Guardian = void 0;
22
+ // Core classes
23
+ var Guardian_1 = require("./core/Guardian");
24
+ Object.defineProperty(exports, "Guardian", { enumerable: true, get: function () { return Guardian_1.Guardian; } });
25
+ Object.defineProperty(exports, "createGuardian", { enumerable: true, get: function () { return Guardian_1.createGuardian; } });
26
+ Object.defineProperty(exports, "guardian", { enumerable: true, get: function () { return Guardian_1.guardian; } });
27
+ var ContextGatherer_1 = require("./core/ContextGatherer");
28
+ Object.defineProperty(exports, "ContextGatherer", { enumerable: true, get: function () { return ContextGatherer_1.ContextGatherer; } });
29
+ Object.defineProperty(exports, "createContextGatherer", { enumerable: true, get: function () { return ContextGatherer_1.createContextGatherer; } });
30
+ // Providers
31
+ var BitbucketProvider_1 = require("./core/providers/BitbucketProvider");
32
+ Object.defineProperty(exports, "BitbucketProvider", { enumerable: true, get: function () { return BitbucketProvider_1.BitbucketProvider; } });
33
+ Object.defineProperty(exports, "createBitbucketProvider", { enumerable: true, get: function () { return BitbucketProvider_1.createBitbucketProvider; } });
34
+ // Features
35
+ var CodeReviewer_1 = require("./features/CodeReviewer");
36
+ Object.defineProperty(exports, "CodeReviewer", { enumerable: true, get: function () { return CodeReviewer_1.CodeReviewer; } });
37
+ Object.defineProperty(exports, "createCodeReviewer", { enumerable: true, get: function () { return CodeReviewer_1.createCodeReviewer; } });
38
+ var DescriptionEnhancer_1 = require("./features/DescriptionEnhancer");
39
+ Object.defineProperty(exports, "DescriptionEnhancer", { enumerable: true, get: function () { return DescriptionEnhancer_1.DescriptionEnhancer; } });
40
+ Object.defineProperty(exports, "createDescriptionEnhancer", { enumerable: true, get: function () { return DescriptionEnhancer_1.createDescriptionEnhancer; } });
41
+ // Utilities
42
+ var Logger_1 = require("./utils/Logger");
43
+ Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return Logger_1.Logger; } });
44
+ Object.defineProperty(exports, "createLogger", { enumerable: true, get: function () { return Logger_1.createLogger; } });
45
+ Object.defineProperty(exports, "logger", { enumerable: true, get: function () { return Logger_1.logger; } });
46
+ var Cache_1 = require("./utils/Cache");
47
+ Object.defineProperty(exports, "Cache", { enumerable: true, get: function () { return Cache_1.Cache; } });
48
+ Object.defineProperty(exports, "createCache", { enumerable: true, get: function () { return Cache_1.createCache; } });
49
+ Object.defineProperty(exports, "cache", { enumerable: true, get: function () { return Cache_1.cache; } });
50
+ var ConfigManager_1 = require("./utils/ConfigManager");
51
+ Object.defineProperty(exports, "ConfigManager", { enumerable: true, get: function () { return ConfigManager_1.ConfigManager; } });
52
+ Object.defineProperty(exports, "createConfigManager", { enumerable: true, get: function () { return ConfigManager_1.createConfigManager; } });
53
+ Object.defineProperty(exports, "configManager", { enumerable: true, get: function () { return ConfigManager_1.configManager; } });
54
+ // Types
55
+ __exportStar(require("./types"), exports);
56
+ // CLI
57
+ var index_1 = require("./cli/index");
58
+ Object.defineProperty(exports, "cli", { enumerable: true, get: function () { return index_1.main; } });
59
+ // Note: Use named import { Guardian } from '@juspay/yama' instead
60
+ //# sourceMappingURL=index.js.map