@principal-ai/codebase-composition 0.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.
Files changed (129) hide show
  1. package/README.md +67 -0
  2. package/dist/index.d.ts +9 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +23 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/modules/DependencyLayerModule.d.ts +44 -0
  7. package/dist/modules/DependencyLayerModule.d.ts.map +1 -0
  8. package/dist/modules/DependencyLayerModule.js +286 -0
  9. package/dist/modules/DependencyLayerModule.js.map +1 -0
  10. package/dist/modules/FileSystemModule.d.ts +30 -0
  11. package/dist/modules/FileSystemModule.d.ts.map +1 -0
  12. package/dist/modules/FileSystemModule.js +46 -0
  13. package/dist/modules/FileSystemModule.js.map +1 -0
  14. package/dist/modules/FileTypeLayerModule.d.ts +34 -0
  15. package/dist/modules/FileTypeLayerModule.d.ts.map +1 -0
  16. package/dist/modules/FileTypeLayerModule.js +169 -0
  17. package/dist/modules/FileTypeLayerModule.js.map +1 -0
  18. package/dist/modules/FrameworkLayerModule.d.ts +22 -0
  19. package/dist/modules/FrameworkLayerModule.d.ts.map +1 -0
  20. package/dist/modules/FrameworkLayerModule.js +388 -0
  21. package/dist/modules/FrameworkLayerModule.js.map +1 -0
  22. package/dist/modules/PackageLayerModule.d.ts +23 -0
  23. package/dist/modules/PackageLayerModule.d.ts.map +1 -0
  24. package/dist/modules/PackageLayerModule.js +810 -0
  25. package/dist/modules/PackageLayerModule.js.map +1 -0
  26. package/dist/modules/TypeExtractionModule.d.ts +37 -0
  27. package/dist/modules/TypeExtractionModule.d.ts.map +1 -0
  28. package/dist/modules/TypeExtractionModule.js +180 -0
  29. package/dist/modules/TypeExtractionModule.js.map +1 -0
  30. package/dist/modules/VersionControlLayerModule.d.ts +10 -0
  31. package/dist/modules/VersionControlLayerModule.d.ts.map +1 -0
  32. package/dist/modules/VersionControlLayerModule.js +32 -0
  33. package/dist/modules/VersionControlLayerModule.js.map +1 -0
  34. package/dist/modules/__fixtures__/typescript-packages/complex-types/src/index.d.ts +4 -0
  35. package/dist/modules/__fixtures__/typescript-packages/complex-types/src/index.d.ts.map +1 -0
  36. package/dist/modules/__fixtures__/typescript-packages/complex-types/src/index.js +7 -0
  37. package/dist/modules/__fixtures__/typescript-packages/complex-types/src/index.js.map +1 -0
  38. package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/category.d.ts +15 -0
  39. package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/category.d.ts.map +1 -0
  40. package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/category.js +3 -0
  41. package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/category.js.map +1 -0
  42. package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/product.d.ts +34 -0
  43. package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/product.d.ts.map +1 -0
  44. package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/product.js +23 -0
  45. package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/product.js.map +1 -0
  46. package/dist/modules/__fixtures__/typescript-packages/simple-types/index.d.ts +39 -0
  47. package/dist/modules/__fixtures__/typescript-packages/simple-types/index.d.ts.map +1 -0
  48. package/dist/modules/__fixtures__/typescript-packages/simple-types/index.js +39 -0
  49. package/dist/modules/__fixtures__/typescript-packages/simple-types/index.js.map +1 -0
  50. package/dist/modules/extractors/TypeScriptExtractor.d.ts +18 -0
  51. package/dist/modules/extractors/TypeScriptExtractor.d.ts.map +1 -0
  52. package/dist/modules/extractors/TypeScriptExtractor.js +361 -0
  53. package/dist/modules/extractors/TypeScriptExtractor.js.map +1 -0
  54. package/dist/modules/index.d.ts +13 -0
  55. package/dist/modules/index.d.ts.map +1 -0
  56. package/dist/modules/index.js +21 -0
  57. package/dist/modules/index.js.map +1 -0
  58. package/dist/providers/GitVersionControlProvider.d.ts +108 -0
  59. package/dist/providers/GitVersionControlProvider.d.ts.map +1 -0
  60. package/dist/providers/GitVersionControlProvider.js +380 -0
  61. package/dist/providers/GitVersionControlProvider.js.map +1 -0
  62. package/dist/providers/PackageManagerApiProvider.d.ts +78 -0
  63. package/dist/providers/PackageManagerApiProvider.d.ts.map +1 -0
  64. package/dist/providers/PackageManagerApiProvider.js +14 -0
  65. package/dist/providers/PackageManagerApiProvider.js.map +1 -0
  66. package/dist/providers/index.d.ts +4 -0
  67. package/dist/providers/index.d.ts.map +1 -0
  68. package/dist/providers/index.js +10 -0
  69. package/dist/providers/index.js.map +1 -0
  70. package/dist/services/FilesystemService.d.ts +59 -0
  71. package/dist/services/FilesystemService.d.ts.map +1 -0
  72. package/dist/services/FilesystemService.js +391 -0
  73. package/dist/services/FilesystemService.js.map +1 -0
  74. package/dist/services/index.d.ts +2 -0
  75. package/dist/services/index.d.ts.map +1 -0
  76. package/dist/services/index.js +7 -0
  77. package/dist/services/index.js.map +1 -0
  78. package/dist/types/file-system.d.ts +7 -0
  79. package/dist/types/file-system.d.ts.map +1 -0
  80. package/dist/types/file-system.js +7 -0
  81. package/dist/types/file-system.js.map +1 -0
  82. package/dist/types/index.d.ts +4 -0
  83. package/dist/types/index.d.ts.map +1 -0
  84. package/dist/types/index.js +3 -0
  85. package/dist/types/index.js.map +1 -0
  86. package/dist/types/layer-types.d.ts +187 -0
  87. package/dist/types/layer-types.d.ts.map +1 -0
  88. package/dist/types/layer-types.js +7 -0
  89. package/dist/types/layer-types.js.map +1 -0
  90. package/dist/types/version-control-layer.d.ts +53 -0
  91. package/dist/types/version-control-layer.d.ts.map +1 -0
  92. package/dist/types/version-control-layer.js +3 -0
  93. package/dist/types/version-control-layer.js.map +1 -0
  94. package/dist/types/workspace-boundaries.d.ts +17 -0
  95. package/dist/types/workspace-boundaries.d.ts.map +1 -0
  96. package/dist/types/workspace-boundaries.js +7 -0
  97. package/dist/types/workspace-boundaries.js.map +1 -0
  98. package/package.json +42 -0
  99. package/src/index.ts +62 -0
  100. package/src/modules/DependencyLayerModule.ts +329 -0
  101. package/src/modules/FileSystemModule.ts +65 -0
  102. package/src/modules/FileTypeLayerModule.ts +199 -0
  103. package/src/modules/FrameworkLayerModule.ts +437 -0
  104. package/src/modules/PackageLayerModule.ts +979 -0
  105. package/src/modules/TypeExtractionModule.test.ts +340 -0
  106. package/src/modules/TypeExtractionModule.ts +180 -0
  107. package/src/modules/VersionControlLayerModule.ts +31 -0
  108. package/src/modules/__fixtures__/typescript-packages/complex-types/package.json +6 -0
  109. package/src/modules/__fixtures__/typescript-packages/complex-types/src/index.ts +6 -0
  110. package/src/modules/__fixtures__/typescript-packages/complex-types/src/models/category.ts +15 -0
  111. package/src/modules/__fixtures__/typescript-packages/complex-types/src/models/product.ts +48 -0
  112. package/src/modules/__fixtures__/typescript-packages/javascript-only/index.js +18 -0
  113. package/src/modules/__fixtures__/typescript-packages/javascript-only/package.json +5 -0
  114. package/src/modules/__fixtures__/typescript-packages/simple-types/index.ts +53 -0
  115. package/src/modules/__fixtures__/typescript-packages/simple-types/package.json +6 -0
  116. package/src/modules/extractors/README.md +55 -0
  117. package/src/modules/extractors/TypeScriptExtractor.ts +409 -0
  118. package/src/modules/index.ts +13 -0
  119. package/src/providers/GitVersionControlProvider.ts +500 -0
  120. package/src/providers/PackageManagerApiProvider.ts +108 -0
  121. package/src/providers/README.md +88 -0
  122. package/src/providers/index.ts +17 -0
  123. package/src/services/FilesystemService.ts +530 -0
  124. package/src/services/index.ts +2 -0
  125. package/src/types/file-system.ts +11 -0
  126. package/src/types/index.ts +24 -0
  127. package/src/types/layer-types.ts +264 -0
  128. package/src/types/version-control-layer.ts +87 -0
  129. package/src/types/workspace-boundaries.ts +17 -0
@@ -0,0 +1,380 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.GitVersionControlProvider = void 0;
7
+ const ignore_1 = __importDefault(require("ignore"));
8
+ // Path utilities that work in both Node and browser environments
9
+ const path = {
10
+ join: (...parts) => {
11
+ const joined = parts.filter(p => p).join('/');
12
+ return joined.replace(/\/+/g, '/');
13
+ },
14
+ dirname: (p) => {
15
+ const parts = p.split('/');
16
+ parts.pop();
17
+ return parts.join('/') || '/';
18
+ },
19
+ relative: (from, to) => {
20
+ if (!from || from === '.')
21
+ return to;
22
+ if (to.startsWith(from + '/'))
23
+ return to.slice(from.length + 1);
24
+ if (to === from)
25
+ return '.';
26
+ return to;
27
+ },
28
+ basename: (p) => {
29
+ const parts = p.split('/');
30
+ return parts[parts.length - 1] || '';
31
+ },
32
+ };
33
+ /**
34
+ * Git implementation of VersionControlProvider for core library
35
+ * Handles .gitignore parsing and Git-specific operations
36
+ */
37
+ class GitVersionControlProvider {
38
+ constructor(fileSystemAdapter, gitAdapter) {
39
+ this.fileSystemAdapter = fileSystemAdapter;
40
+ this.gitAdapter = gitAdapter;
41
+ }
42
+ async detect(directoryPath) {
43
+ // Check if .git directory exists
44
+ let currentPath = directoryPath;
45
+ while (currentPath && currentPath !== '/' && currentPath !== '.') {
46
+ const gitPath = path.join(currentPath, '.git');
47
+ // Try using isDirectory if available, otherwise check for .git/HEAD file
48
+ if (this.fileSystemAdapter.isDirectory) {
49
+ if (await this.fileSystemAdapter.isDirectory(gitPath)) {
50
+ return true;
51
+ }
52
+ }
53
+ else if (this.fileSystemAdapter.fileExists) {
54
+ // Fallback: check for .git/HEAD file
55
+ const headPath = path.join(gitPath, 'HEAD');
56
+ if (await this.fileSystemAdapter.fileExists(headPath)) {
57
+ return true;
58
+ }
59
+ }
60
+ // Move up one directory
61
+ const parent = path.dirname(currentPath);
62
+ if (parent === currentPath)
63
+ break; // Reached root
64
+ currentPath = parent;
65
+ }
66
+ return false;
67
+ }
68
+ async getRepositoryRoot(directoryPath) {
69
+ let currentPath = directoryPath;
70
+ while (currentPath && currentPath !== '/' && currentPath !== '.') {
71
+ const gitPath = path.join(currentPath, '.git');
72
+ // Check using same logic as detect
73
+ let isGitRepo = false;
74
+ if (this.fileSystemAdapter.isDirectory) {
75
+ isGitRepo = await this.fileSystemAdapter.isDirectory(gitPath);
76
+ }
77
+ else if (this.fileSystemAdapter.fileExists) {
78
+ const headPath = path.join(gitPath, 'HEAD');
79
+ isGitRepo = await this.fileSystemAdapter.fileExists(headPath);
80
+ }
81
+ if (isGitRepo) {
82
+ return currentPath;
83
+ }
84
+ // Move up one directory
85
+ const parent = path.dirname(currentPath);
86
+ if (parent === currentPath)
87
+ break; // Reached root
88
+ currentPath = parent;
89
+ }
90
+ return null;
91
+ }
92
+ async createLayer(repositoryRoot) {
93
+ // PERFORMANCE OPTIMIZATION: Return minimal git metadata since buildFilteredFileTree
94
+ // now handles all filtering. This avoids expensive file reads for .git/HEAD, .git/config, etc.
95
+ const ignorePatterns = await this.extractIgnorePatterns(repositoryRoot);
96
+ // Return default values instead of reading git files
97
+ const currentBranch = 'main'; // Default branch name
98
+ const currentRevision = 'unknown'; // Skip expensive git file reads
99
+ const remotes = []; // Empty remotes
100
+ return {
101
+ id: `vcs-git-${repositoryRoot.replace(/[^a-zA-Z0-9]/g, '-')}`,
102
+ name: 'Git Version Control',
103
+ type: 'version-control',
104
+ enabled: true,
105
+ workspaceRoot: repositoryRoot,
106
+ vcsData: {
107
+ system: 'git',
108
+ repositoryRoot,
109
+ currentBranch: currentBranch || 'unknown',
110
+ currentRevision: currentRevision || 'unknown',
111
+ remotes: remotes || [],
112
+ ignorePatterns,
113
+ },
114
+ derivedFrom: {
115
+ fileSets: [
116
+ {
117
+ id: 'git-files',
118
+ name: '.git directory and .gitignore files',
119
+ patterns: [
120
+ { type: 'glob', pattern: '.git/**' },
121
+ { type: 'glob', pattern: '**/.gitignore' },
122
+ ],
123
+ },
124
+ ],
125
+ derivationType: 'content',
126
+ description: 'Git version control metadata and ignore patterns',
127
+ },
128
+ };
129
+ }
130
+ /**
131
+ * Extract all .gitignore patterns from the repository
132
+ */
133
+ async extractIgnorePatterns(repositoryRoot) {
134
+ const patterns = [];
135
+ // Always add .git directory as ignored
136
+ patterns.push({
137
+ pattern: '.git',
138
+ type: 'exact',
139
+ source: 'implicit',
140
+ scope: 'repository',
141
+ negated: false,
142
+ description: 'Git metadata directory',
143
+ });
144
+ // Parse root .gitignore
145
+ const rootGitignorePath = path.join(repositoryRoot, '.gitignore');
146
+ const rootPatterns = await this.parseGitignoreFile(rootGitignorePath, repositoryRoot);
147
+ patterns.push(...rootPatterns);
148
+ // Find and parse subdirectory .gitignore files
149
+ if (this.fileSystemAdapter.readDirectory) {
150
+ const subdirPatterns = await this.findAndParseGitignoreFiles(repositoryRoot, repositoryRoot);
151
+ patterns.push(...subdirPatterns);
152
+ }
153
+ return patterns;
154
+ }
155
+ /**
156
+ * Recursively find and parse .gitignore files
157
+ */
158
+ async findAndParseGitignoreFiles(currentPath, repositoryRoot) {
159
+ const patterns = [];
160
+ if (!this.fileSystemAdapter.readDirectory) {
161
+ return patterns;
162
+ }
163
+ try {
164
+ const entries = await this.fileSystemAdapter.readDirectory(currentPath);
165
+ for (const entry of entries) {
166
+ const fullPath = path.join(currentPath, entry);
167
+ // Skip .git directory
168
+ if (entry === '.git')
169
+ continue;
170
+ // Check for .gitignore file
171
+ if (entry === '.gitignore' && currentPath !== repositoryRoot) {
172
+ const gitignorePatterns = await this.parseGitignoreFile(fullPath, repositoryRoot);
173
+ patterns.push(...gitignorePatterns);
174
+ }
175
+ // Recursively check subdirectories
176
+ if (this.fileSystemAdapter.isDirectory &&
177
+ (await this.fileSystemAdapter.isDirectory(fullPath))) {
178
+ const subdirPatterns = await this.findAndParseGitignoreFiles(fullPath, repositoryRoot);
179
+ patterns.push(...subdirPatterns);
180
+ }
181
+ }
182
+ }
183
+ catch (error) {
184
+ console.warn(`Error reading directory ${currentPath}:`, error);
185
+ }
186
+ return patterns;
187
+ }
188
+ /**
189
+ * Parse a .gitignore file and return patterns using the ignore library
190
+ */
191
+ async parseGitignoreFile(gitignorePath, repositoryRoot) {
192
+ const patterns = [];
193
+ try {
194
+ const result = await this.fileSystemAdapter.readFile(gitignorePath);
195
+ if (!result)
196
+ return patterns;
197
+ const content = result.content;
198
+ const lines = content.split('\n');
199
+ const relativePath = path.relative(repositoryRoot, path.dirname(gitignorePath));
200
+ // For root gitignore, use "./" prefix to show it's in the current directory
201
+ const source = relativePath === '.' ? './.gitignore' : `${relativePath}/.gitignore`;
202
+ // Use ignore library to validate patterns as we process them
203
+ const ig = (0, ignore_1.default)();
204
+ for (const line of lines) {
205
+ const trimmed = line.trim();
206
+ // Skip empty lines and comments
207
+ if (!trimmed || trimmed.startsWith('#'))
208
+ continue;
209
+ // Handle negation patterns
210
+ const negated = trimmed.startsWith('!');
211
+ const pattern = negated ? trimmed.slice(1) : trimmed;
212
+ // Validate pattern using ignore library
213
+ try {
214
+ // Test if the pattern is valid by trying to add it to ignore
215
+ const testIgnore = (0, ignore_1.default)();
216
+ testIgnore.add([trimmed]); // Add the original line (with ! if present)
217
+ // Determine pattern type based on content
218
+ const hasGlobChars = /[*?[\]]/.test(pattern);
219
+ const hasSlash = pattern.includes('/');
220
+ const patternType = hasGlobChars || hasSlash ? 'glob' : 'exact';
221
+ // Determine scope
222
+ const scope = source === '.gitignore' ? 'repository' : 'directory';
223
+ patterns.push({
224
+ pattern: pattern,
225
+ type: patternType,
226
+ source,
227
+ scope,
228
+ negated,
229
+ description: `From ${source}`,
230
+ });
231
+ // Add valid patterns to our ignore instance for potential future use
232
+ ig.add([trimmed]);
233
+ }
234
+ catch (err) {
235
+ console.warn(`Invalid gitignore pattern: ${trimmed} in ${source}`, err);
236
+ }
237
+ }
238
+ }
239
+ catch (error) {
240
+ console.warn(`Error reading gitignore file ${gitignorePath}:`, error);
241
+ }
242
+ return patterns;
243
+ }
244
+ /**
245
+ * Create an ignore instance from patterns for efficient filtering
246
+ * This can be used by FilesystemService or other components
247
+ */
248
+ createIgnoreFromPatterns(patterns) {
249
+ const ig = (0, ignore_1.default)();
250
+ // Convert patterns back to gitignore format
251
+ const gitignoreLines = patterns.map(p => (p.negated ? `!${p.pattern}` : p.pattern));
252
+ if (gitignoreLines.length > 0) {
253
+ ig.add(gitignoreLines);
254
+ }
255
+ return ig;
256
+ }
257
+ /**
258
+ * Get current branch name
259
+ */
260
+ async getCurrentBranch(repositoryRoot) {
261
+ // First try using GitAdapter if available
262
+ if (this.gitAdapter?.getCurrentBranch) {
263
+ try {
264
+ return await this.gitAdapter.getCurrentBranch(repositoryRoot);
265
+ }
266
+ catch (error) {
267
+ console.warn('Error getting branch via GitAdapter:', error);
268
+ }
269
+ }
270
+ // Fallback to reading .git/HEAD file
271
+ try {
272
+ const headPath = path.join(repositoryRoot, '.git', 'HEAD');
273
+ const result = await this.fileSystemAdapter.readFile(headPath);
274
+ if (!result)
275
+ return null;
276
+ const content = result.content.trim();
277
+ if (content.startsWith('ref: refs/heads/')) {
278
+ return content.replace('ref: refs/heads/', '');
279
+ }
280
+ // Detached HEAD state
281
+ return 'HEAD';
282
+ }
283
+ catch (error) {
284
+ console.warn('Error reading .git/HEAD:', error);
285
+ return null;
286
+ }
287
+ }
288
+ /**
289
+ * Get current commit SHA
290
+ */
291
+ async getCurrentRevision(repositoryRoot) {
292
+ // First try using GitAdapter if available
293
+ if (this.gitAdapter?.getCurrentCommit) {
294
+ try {
295
+ return await this.gitAdapter.getCurrentCommit(repositoryRoot);
296
+ }
297
+ catch (error) {
298
+ console.warn('Error getting commit via GitAdapter:', error);
299
+ }
300
+ }
301
+ // Fallback to reading from .git files
302
+ try {
303
+ const headPath = path.join(repositoryRoot, '.git', 'HEAD');
304
+ const headResult = await this.fileSystemAdapter.readFile(headPath);
305
+ if (!headResult)
306
+ return null;
307
+ const headContent = headResult.content.trim();
308
+ // If HEAD points to a ref, read that ref
309
+ if (headContent.startsWith('ref: ')) {
310
+ const ref = headContent.replace('ref: ', '');
311
+ const refPath = path.join(repositoryRoot, '.git', ref);
312
+ const refResult = await this.fileSystemAdapter.readFile(refPath);
313
+ if (refResult) {
314
+ return refResult.content.trim().substring(0, 7); // Short SHA
315
+ }
316
+ }
317
+ else {
318
+ // Direct commit SHA in HEAD (detached state)
319
+ return headContent.substring(0, 7);
320
+ }
321
+ }
322
+ catch (error) {
323
+ console.warn('Error reading git revision:', error);
324
+ }
325
+ return null;
326
+ }
327
+ /**
328
+ * Get remote repositories
329
+ */
330
+ async getRemotes(repositoryRoot) {
331
+ // First try using GitAdapter if available
332
+ if (this.gitAdapter?.getRemotes) {
333
+ try {
334
+ const remotes = await this.gitAdapter.getRemotes(repositoryRoot);
335
+ // Ensure all remotes have a type, default to 'both' if not specified
336
+ return remotes.map(remote => ({
337
+ name: remote.name,
338
+ url: remote.url,
339
+ type: remote.type || 'both',
340
+ }));
341
+ }
342
+ catch (error) {
343
+ console.warn('Error getting remotes via GitAdapter:', error);
344
+ }
345
+ }
346
+ // Fallback to reading .git/config file
347
+ try {
348
+ const configPath = path.join(repositoryRoot, '.git', 'config');
349
+ const result = await this.fileSystemAdapter.readFile(configPath);
350
+ if (!result)
351
+ return [];
352
+ const remotes = [];
353
+ const lines = result.content.split('\n');
354
+ let currentRemote = null;
355
+ for (const line of lines) {
356
+ const trimmed = line.trim();
357
+ // Check for remote section
358
+ const remoteMatch = trimmed.match(/^\[remote "(.+)"\]$/);
359
+ if (remoteMatch) {
360
+ currentRemote = remoteMatch[1];
361
+ continue;
362
+ }
363
+ // Extract URL for current remote
364
+ if (currentRemote && trimmed.startsWith('url = ')) {
365
+ const url = trimmed.replace('url = ', '');
366
+ // Git remotes are typically used for both fetch and push unless specified otherwise
367
+ remotes.push({ name: currentRemote, url, type: 'both' });
368
+ currentRemote = null;
369
+ }
370
+ }
371
+ return remotes;
372
+ }
373
+ catch (error) {
374
+ console.warn('Error reading .git/config:', error);
375
+ return [];
376
+ }
377
+ }
378
+ }
379
+ exports.GitVersionControlProvider = GitVersionControlProvider;
380
+ //# sourceMappingURL=GitVersionControlProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitVersionControlProvider.js","sourceRo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kB,IAAI,CAAC;YAExC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;gBAE5B,2BAA2B;gBAC3B,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;gBACzD,IAAI,WAAW,EAAE,CAAC;oBAChB,aAAa,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;oBAC/B,SAAS;gBACX,CAAC;gBAED,iCAAiC;gBACjC,IAAI,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;oBAClD,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;oBAC1C,oFAAoF;oBACpF,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;oBACzD,aAAa,GAAG,IAAI,CAAC;gBACvB,CAAC;YACH,CAAC;YAED,OAAO,OAAO,CAAC;QACjB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;YAClD,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;CACF;AAxYD,8DAwYC"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Package management API provider for checking versions, vulnerabilities, and licenses
3
+ */
4
+ export type PackageManager = 'npm' | 'pnpm' | 'yarn';
5
+ export interface PackageVersionInfo {
6
+ name: string;
7
+ currentVersion: string;
8
+ }
9
+ export interface VersionCheckResult {
10
+ packageName: string;
11
+ currentVersion: string;
12
+ latestVersion?: string;
13
+ updateType?: 'major' | 'minor' | 'patch' | 'none';
14
+ isOutdated: boolean;
15
+ isDeprecated?: boolean;
16
+ deprecationMessage?: string;
17
+ error?: string;
18
+ }
19
+ export interface VulnerabilityInfo {
20
+ id: string;
21
+ severity: 'low' | 'moderate' | 'high' | 'critical';
22
+ title: string;
23
+ description?: string;
24
+ fixAvailable?: boolean;
25
+ }
26
+ export interface VulnerabilityCheckResult {
27
+ packageName: string;
28
+ version: string;
29
+ vulnerabilities: VulnerabilityInfo[];
30
+ error?: string;
31
+ }
32
+ export interface LicenseInfo {
33
+ license: string;
34
+ licenseType: 'permissive' | 'copyleft' | 'proprietary' | 'unknown';
35
+ requiresAttribution: boolean;
36
+ requiresShareAlike: boolean;
37
+ allowsCommercialUse: boolean;
38
+ }
39
+ export interface LicenseCheckResult {
40
+ packageName: string;
41
+ version: string;
42
+ license?: LicenseInfo;
43
+ error?: string;
44
+ }
45
+ export interface DependencyCheckProgress {
46
+ phase: 'idle' | 'counting' | 'checking-versions' | 'checking-vulnerabilities' | 'checking-licenses' | 'complete';
47
+ current: number;
48
+ total: number;
49
+ message?: string;
50
+ }
51
+ export interface BatchCheckOptions {
52
+ batchSize?: number;
53
+ maxConcurrent?: number;
54
+ skipCache?: boolean;
55
+ }
56
+ /**
57
+ * Abstract provider for package manager API operations
58
+ * Implementations can use direct API calls, server proxies, or mock data
59
+ */
60
+ export declare abstract class PackageManagerApiProvider {
61
+ /**
62
+ * Check versions for multiple packages, yielding results as they complete
63
+ */
64
+ abstract checkVersions(packages: PackageVersionInfo[], packageManager: PackageManager, options?: BatchCheckOptions): AsyncGenerator<VersionCheckResult, void, unknown>;
65
+ /**
66
+ * Check vulnerabilities for multiple packages, yielding results as they complete
67
+ */
68
+ abstract checkVulnerabilities(packages: PackageVersionInfo[], packageManager: PackageManager, options?: BatchCheckOptions): AsyncGenerator<VulnerabilityCheckResult, void, unknown>;
69
+ /**
70
+ * Check licenses for multiple packages, yielding results as they complete
71
+ */
72
+ abstract checkLicenses(packages: PackageVersionInfo[], packageManager: PackageManager, options?: BatchCheckOptions): AsyncGenerator<LicenseCheckResult, void, unknown>;
73
+ /**
74
+ * Get overall progress of the current check operation
75
+ */
76
+ abstract getProgress(): DependencyCheckProgress;
77
+ }
78
+ //# sourceMappingURL=PackageManagerApiProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PackageManagerApiProvider.d.ts","sourceRoot":"","sources":["../../src/providers/PackageManagerApiProvider.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAErD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;IAClD,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,KAAK,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,iBAAiB,EAAE,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,YAAY,GAAG,UAAU,GAAG,aAAa,GAAG,SAAS,CAAC;IACnE,mBAAmB,EAAE,OAAO,CAAC;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AC,WAAW,IAAI,uBAAuB;CAChD"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * Package management API provider for checking versions, vulnerabilities, and licenses
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PackageManagerApiProvider = void 0;
7
+ /**
8
+ * Abstract provider for package manager API operations
9
+ * Implementations can use direct API calls, server proxies, or mock data
10
+ */
11
+ class PackageManagerApiProvider {
12
+ }
13
+ exports.PackageManagerApiProvider = PackageManagerApiProvider;
14
+ //# sourceMappingURL=PackageManagerApiProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PackageManagerApiProvider.js","sourceRoot":"","sources":["../../src/providers/PackageManagerApiProvider.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAqEH;;;GAGG;AACH,MAAsB,yBAAyB;CAgC9C;AAhCD,8DAgCC"}
@@ -0,0 +1,4 @@
1
+ export { GitVersionControlProvider } from './GitVersionControlProvider';
2
+ export type { FileSystemAdapter, GitAdapter, ShellAdapter } from './GitVersionControlProvider';
3
+ export { PackageManagerApiProvider, type PackageManager, type PackageVersionInfo, type VersionCheckResult, type VulnerabilityInfo, type VulnerabilityCheckResult, type LicenseInfo, type LicenseCheckResult, type DependencyCheckProgress, type BatchCheckOptions, } from './PackageManagerApiProvider';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAG/F,OAAO,EACL,yBAAyB,EACzB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,GACvB,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PackageManagerApiProvider = exports.GitVersionControlProvider = void 0;
4
+ // Version control providers
5
+ var GitVersionControlProvider_1 = require("./GitVersionControlProvider");
6
+ Object.defineProperty(exports, "GitVersionControlProvider", { enumerable: true, get: function () { return GitVersionControlProvider_1.GitVersionControlProvider; } });
7
+ // Package management providers
8
+ var PackageManagerApiProvider_1 = require("./PackageManagerApiProvider");
9
+ Object.defineProperty(exports, "PackageManagerApiProvider", { enumerable: true, get: function () { return PackageManagerApiProvider_1.PackageManagerApiProvider; } });
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":";;;AAAA,4BAA4B;AAC5B,yEAAwE;AAA/D,sIAAA,yBAAyB,OAAA;AAGlC,+BAA+B;AAC/B,yEAWqC;AAVnC,sIAAA,yBAAyB,OAAA"}
@@ -0,0 +1,59 @@
1
+ import { FileTree } from '@principal-ai/repository-abstraction';
2
+ import { FileSystemAdapter } from '../providers';
3
+ import { FileSystemFilterLayer } from '../types';
4
+ interface FilterStats {
5
+ totalFiltered: number;
6
+ filteredByLayer: Record<string, number>;
7
+ examples: Array<{
8
+ path: string;
9
+ filteredBy: string;
10
+ }>;
11
+ filteredByDirectory: Record<string, {
12
+ count: number;
13
+ reasons: Set<string>;
14
+ }>;
15
+ }
16
+ export declare class FilesystemService {
17
+ private adapter?;
18
+ private filterStats;
19
+ constructor(adapter?: FileSystemAdapter | undefined);
20
+ /**
21
+ * Build file tree using the provided adapter with efficient filtering
22
+ */
23
+ buildFileSystemTreeFromPath(directoryPath: string, filters?: FileSystemFilterLayer[], options?: {
24
+ enableInverseFiltering?: boolean;
25
+ } | object): Promise<FileTree & {
26
+ filterStats?: FilterStats;
27
+ appliedFilters?: FileSystemFilterLayer[];
28
+ inverseMatches?: Array<{
29
+ path: string;
30
+ matchedFilters: string[];
31
+ }>;
32
+ }>;
33
+ /**
34
+ * Create optimized ignore instances from filter layers
35
+ */
36
+ private createIgnoreInstances;
37
+ /**
38
+ * Fast filtering using node-ignore during fdir crawl
39
+ */
40
+ private shouldIncludeFile;
41
+ /**
42
+ * Convert array of paths to FileTree structure
43
+ */
44
+ private convertPathsToTree;
45
+ /**
46
+ * Find files that would match specific filters - for power user investigation
47
+ */
48
+ private findInverseMatches;
49
+ /**
50
+ * Get the filter statistics from the last build
51
+ */
52
+ getFilterStats(): FilterStats;
53
+ /**
54
+ * Create an empty tree structure - matches original FilesystemService API
55
+ */
56
+ private getEmptyTree;
57
+ }
58
+ export {};
59
+ //# sourceMappingURL=FilesystemService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilesystemService.d.ts","sourceRoot":"","sources":["../../src/services/FilesystemService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAA2B,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AA+BjD,UAAU,WAAW;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtD,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC,CAAC;CAC9E;AAED,qBAAa,iBAAiB;IAQhB,OAAO,CAAC,OAAO,CAAC;IAP5B,OAAO,CAAC,WAAW,CAKjB;gBAEkB,OAAO,CAAC,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