@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,391 @@
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.FilesystemService = void 0;
7
+ const ignore_1 = __importDefault(require("ignore"));
8
+ // Use path operations that work in browser
9
+ const path = {
10
+ basename: (p) => p.split('/').pop() || '',
11
+ join: (...parts) => {
12
+ const joined = parts.filter(p => p).join('/');
13
+ return joined.replace(/\/+/g, '/');
14
+ },
15
+ relative: (from, to) => {
16
+ if (!from || from === '.') {
17
+ return to;
18
+ }
19
+ if (to.startsWith(from + '/')) {
20
+ return to.slice(from.length + 1);
21
+ }
22
+ if (to === from) {
23
+ return '.';
24
+ }
25
+ return to;
26
+ },
27
+ dirname: (p) => {
28
+ const lastSlash = p.lastIndexOf('/');
29
+ return lastSlash > 0 ? p.slice(0, lastSlash) : '';
30
+ },
31
+ extname: (p) => {
32
+ const lastDot = p.lastIndexOf('.');
33
+ return lastDot > 0 ? p.slice(lastDot) : '';
34
+ },
35
+ };
36
+ class FilesystemService {
37
+ constructor(adapter) {
38
+ this.adapter = adapter;
39
+ this.filterStats = {
40
+ totalFiltered: 0,
41
+ filteredByLayer: {},
42
+ examples: [],
43
+ filteredByDirectory: {},
44
+ };
45
+ }
46
+ /**
47
+ * Build file tree using the provided adapter with efficient filtering
48
+ */
49
+ async buildFileSystemTreeFromPath(directoryPath, filters, options) {
50
+ console.time('[FilesystemService] Total build time');
51
+ // Reset filter stats
52
+ this.filterStats = {
53
+ totalFiltered: 0,
54
+ filteredByLayer: {},
55
+ examples: [],
56
+ filteredByDirectory: {},
57
+ };
58
+ const allFilters = filters || [];
59
+ // Handle both old and new options format for backward compatibility
60
+ const enableInverseFiltering = options?.enableInverseFiltering || false;
61
+ // Handle case when no adapter is provided
62
+ if (!this.adapter) {
63
+ // Return empty tree structure for backward compatibility
64
+ const rootDir = {
65
+ path: directoryPath,
66
+ name: directoryPath.split('/').pop() || directoryPath,
67
+ children: [],
68
+ fileCount: 0,
69
+ totalSize: 0,
70
+ depth: 0,
71
+ relativePath: '.',
72
+ };
73
+ return {
74
+ sha: '',
75
+ root: rootDir,
76
+ allFiles: [],
77
+ allDirectories: [rootDir],
78
+ stats: {
79
+ totalFiles: 0,
80
+ totalDirectories: 1,
81
+ totalSize: 0,
82
+ maxDepth: 0,
83
+ buildingTypeDistribution: {},
84
+ directoryTypeDistribution: {},
85
+ combinedTypeDistribution: {},
86
+ },
87
+ filterStats: this.filterStats,
88
+ appliedFilters: allFilters,
89
+ inverseMatches: enableInverseFiltering ? [] : undefined,
90
+ };
91
+ }
92
+ console.time('[FilesystemService] Build file tree');
93
+ // Use the adapter's optimized implementation
94
+ const patterns = [];
95
+ let sourceDir;
96
+ // Convert filters to patterns for the adapter
97
+ for (const filter of allFilters) {
98
+ if (filter.enabled && filter.filterData?.excludedPatterns) {
99
+ patterns.push(...filter.filterData.excludedPatterns.map(p => p.pattern));
100
+ if (filter.filterData.sourceDirectory) {
101
+ sourceDir = filter.filterData.sourceDirectory;
102
+ }
103
+ }
104
+ }
105
+ const adapterResult = await this.adapter.buildFilteredFileTree(directoryPath, patterns, sourceDir);
106
+ const crawledPaths = adapterResult.paths;
107
+ const fileStats = adapterResult.stats;
108
+ // Update filter stats
109
+ const ignoreInstances = this.createIgnoreInstances(allFilters);
110
+ for (const path of crawledPaths) {
111
+ if (!this.shouldIncludeFile(path, ignoreInstances, allFilters)) {
112
+ this.filterStats.totalFiltered++;
113
+ }
114
+ }
115
+ console.timeEnd('[FilesystemService] Build file tree');
116
+ console.log(`[FilesystemService] Found ${crawledPaths.length} paths after filtering`);
117
+ // Convert paths to FileInfo and DirectoryInfo objects
118
+ console.time('[FilesystemService] Convert to tree structure');
119
+ const { allFiles, allDirectories, rootDir } = await this.convertPathsToTree(crawledPaths, directoryPath, fileStats);
120
+ console.timeEnd('[FilesystemService] Convert to tree structure');
121
+ // Handle inverse filtering for power users
122
+ let inverseMatches = [];
123
+ if (enableInverseFiltering) {
124
+ inverseMatches = await this.findInverseMatches(directoryPath, ignoreInstances, allFilters);
125
+ }
126
+ // Calculate stats
127
+ const totalSize = allFiles.reduce((sum, file) => sum + (file.size || 0), 0);
128
+ const maxDepth = Math.max(...allDirectories.map(d => d.depth || 0));
129
+ // Update filter layer stats
130
+ allFilters.forEach(layer => {
131
+ if (layer.enabled && this.filterStats.filteredByLayer[layer.id]) {
132
+ if (!layer.filterData.stats) {
133
+ layer.filterData.stats = {
134
+ totalFiltered: 0,
135
+ bytesExcluded: 0,
136
+ };
137
+ }
138
+ layer.filterData.stats.totalFiltered = this.filterStats.filteredByLayer[layer.id];
139
+ }
140
+ });
141
+ const treeResult = {
142
+ sha: '',
143
+ root: rootDir || {
144
+ path: '.',
145
+ name: path.basename(directoryPath) || 'root',
146
+ children: [],
147
+ fileCount: 0,
148
+ totalSize: 0,
149
+ depth: 0,
150
+ relativePath: '.',
151
+ },
152
+ allFiles,
153
+ allDirectories,
154
+ stats: {
155
+ totalFiles: allFiles.length,
156
+ totalDirectories: allDirectories.length,
157
+ totalSize,
158
+ maxDepth,
159
+ buildingTypeDistribution: {},
160
+ directoryTypeDistribution: {},
161
+ combinedTypeDistribution: {},
162
+ },
163
+ filterStats: this.filterStats,
164
+ appliedFilters: allFilters,
165
+ inverseMatches: inverseMatches,
166
+ };
167
+ console.timeEnd('[FilesystemService] Total build time');
168
+ return treeResult;
169
+ }
170
+ /**
171
+ * Create optimized ignore instances from filter layers
172
+ */
173
+ createIgnoreInstances(filters) {
174
+ const ignoreInstances = new Map();
175
+ for (const filter of filters) {
176
+ if (!filter.enabled || !filter.filterData?.excludedPatterns)
177
+ continue;
178
+ const sourceDirectory = filter.filterData.sourceDirectory || '';
179
+ const key = `${filter.id}:${sourceDirectory}`;
180
+ const ig = (0, ignore_1.default)();
181
+ const patterns = filter.filterData.excludedPatterns.map(p => p.pattern);
182
+ ig.add(patterns);
183
+ ignoreInstances.set(key, {
184
+ ignore: ig,
185
+ sourceDirectory,
186
+ filterId: filter.id,
187
+ filterName: filter.name,
188
+ });
189
+ }
190
+ return ignoreInstances;
191
+ }
192
+ /**
193
+ * Fast filtering using node-ignore during fdir crawl
194
+ */
195
+ shouldIncludeFile(filePath, ignoreInstances, _filters) {
196
+ for (const [, { ignore: ig, sourceDirectory, filterId, filterName }] of ignoreInstances) {
197
+ // Check if this path is within the filter's scope
198
+ if (sourceDirectory !== '') {
199
+ if (!filePath.startsWith(sourceDirectory + '/') && filePath !== sourceDirectory) {
200
+ continue; // Skip this filter - path is outside its scope
201
+ }
202
+ }
203
+ // Get the path relative to the filter's source directory for testing
204
+ let pathToTest = filePath;
205
+ if (sourceDirectory !== '' && filePath.startsWith(sourceDirectory + '/')) {
206
+ pathToTest = filePath.slice(sourceDirectory.length + 1);
207
+ }
208
+ // Skip empty paths and "." which node-ignore doesn't handle
209
+ if (!pathToTest || pathToTest === '.') {
210
+ continue;
211
+ }
212
+ // Use node-ignore for fast pattern matching
213
+ if (ig.ignores(pathToTest)) {
214
+ // Track statistics
215
+ this.filterStats.totalFiltered++;
216
+ this.filterStats.filteredByLayer[filterId] =
217
+ (this.filterStats.filteredByLayer[filterId] || 0) + 1;
218
+ // Track by directory
219
+ const dirPath = path.dirname(filePath) || '.';
220
+ if (!this.filterStats.filteredByDirectory[dirPath]) {
221
+ this.filterStats.filteredByDirectory[dirPath] = { count: 0, reasons: new Set() };
222
+ }
223
+ this.filterStats.filteredByDirectory[dirPath].count++;
224
+ this.filterStats.filteredByDirectory[dirPath].reasons.add(filterName);
225
+ return false; // Exclude this file
226
+ }
227
+ }
228
+ return true; // Include this file
229
+ }
230
+ /**
231
+ * Convert array of paths to FileTree structure
232
+ */
233
+ async convertPathsToTree(paths, rootPath, providedStats) {
234
+ const allFiles = [];
235
+ const allDirectories = [];
236
+ const directoryMap = new Map();
237
+ // Use provided stats or fetch them if adapter supports it
238
+ const fileStats = providedStats ||
239
+ new Map();
240
+ if (!providedStats && this.adapter && 'getFileStats' in this.adapter) {
241
+ // Batch file stats operations for better performance
242
+ const statPromises = paths.map(async (filePath) => {
243
+ try {
244
+ const fullPath = path.join(rootPath, filePath);
245
+ const stats = await this.adapter.getFileStats(fullPath);
246
+ if (stats) {
247
+ fileStats.set(filePath, {
248
+ size: stats.size || 0,
249
+ lastModified: stats.lastModified || new Date(),
250
+ isDirectory: stats.isDirectory || false,
251
+ });
252
+ }
253
+ }
254
+ catch {
255
+ // Ignore stat errors, will use defaults
256
+ }
257
+ });
258
+ await Promise.all(statPromises);
259
+ }
260
+ // Create file and directory objects
261
+ for (const filePath of paths) {
262
+ const stats = fileStats.get(filePath);
263
+ const isDirectory = stats?.isDirectory || filePath.endsWith('/');
264
+ if (isDirectory) {
265
+ const dirInfo = {
266
+ path: filePath || '.',
267
+ name: path.basename(filePath) || 'root',
268
+ children: [],
269
+ fileCount: 0,
270
+ totalSize: 0,
271
+ depth: filePath.split('/').length - 1,
272
+ relativePath: filePath || '.',
273
+ };
274
+ allDirectories.push(dirInfo);
275
+ directoryMap.set(filePath, dirInfo);
276
+ }
277
+ else {
278
+ const fileInfo = {
279
+ path: filePath,
280
+ name: path.basename(filePath),
281
+ extension: path.extname(filePath).toLowerCase(),
282
+ size: stats?.size || 0,
283
+ lastModified: stats?.lastModified || new Date(),
284
+ isDirectory: false,
285
+ relativePath: filePath,
286
+ };
287
+ allFiles.push(fileInfo);
288
+ }
289
+ }
290
+ // Build hierarchical structure (simplified - just return root)
291
+ const rootDir = directoryMap.get('.') ||
292
+ directoryMap.get('') || {
293
+ path: '.',
294
+ name: path.basename(rootPath) || 'root',
295
+ children: [],
296
+ fileCount: allFiles.length,
297
+ totalSize: allFiles.reduce((sum, f) => sum + (f.size || 0), 0),
298
+ depth: 0,
299
+ relativePath: '.',
300
+ };
301
+ return { allFiles, allDirectories, rootDir };
302
+ }
303
+ /**
304
+ * Find files that would match specific filters - for power user investigation
305
+ */
306
+ async findInverseMatches(projectPath, ignoreInstances, _filters) {
307
+ console.log('[FilesystemService] Running inverse filter analysis...');
308
+ const inverseMatches = [];
309
+ // Get ALL files without any filtering to get the complete picture
310
+ if (!this.adapter) {
311
+ return [];
312
+ }
313
+ const unfilteredResult = await this.adapter.buildFilteredFileTree(projectPath);
314
+ const allPaths = unfilteredResult.paths;
315
+ console.log(`[FilesystemService] Found ${allPaths.length} total paths for inverse analysis`);
316
+ // Test each path against each filter to see what matches
317
+ for (const filePath of allPaths) {
318
+ const matchedFilters = [];
319
+ for (const [, { ignore: ig, sourceDirectory, filterName }] of ignoreInstances) {
320
+ // Check if this path is within the filter's scope
321
+ if (sourceDirectory !== '') {
322
+ if (!filePath.startsWith(sourceDirectory + '/') && filePath !== sourceDirectory) {
323
+ continue; // Skip this filter - path is outside its scope
324
+ }
325
+ }
326
+ // Get the path relative to the filter's source directory for testing
327
+ let pathToTest = filePath;
328
+ if (sourceDirectory !== '' && filePath.startsWith(sourceDirectory + '/')) {
329
+ pathToTest = filePath.slice(sourceDirectory.length + 1);
330
+ }
331
+ // Skip empty paths and "." which node-ignore doesn't handle
332
+ if (!pathToTest || pathToTest === '.') {
333
+ continue;
334
+ }
335
+ // Check if this filter would match this path
336
+ if (ig.ignores(pathToTest)) {
337
+ matchedFilters.push(filterName);
338
+ }
339
+ }
340
+ // If any filters matched, record it
341
+ if (matchedFilters.length > 0) {
342
+ inverseMatches.push({
343
+ path: filePath,
344
+ matchedFilters,
345
+ });
346
+ }
347
+ }
348
+ console.log(`[FilesystemService] Inverse analysis complete: ${inverseMatches.length} files matched filters`);
349
+ return inverseMatches;
350
+ }
351
+ /**
352
+ * Get the filter statistics from the last build
353
+ */
354
+ getFilterStats() {
355
+ return { ...this.filterStats };
356
+ }
357
+ /**
358
+ * Create an empty tree structure - matches original FilesystemService API
359
+ */
360
+ getEmptyTree(directoryPath) {
361
+ const rootDir = {
362
+ path: '.',
363
+ name: path.basename(directoryPath) || 'root',
364
+ children: [],
365
+ fileCount: 0,
366
+ totalSize: 0,
367
+ depth: 0,
368
+ relativePath: '.',
369
+ };
370
+ return {
371
+ sha: '',
372
+ root: rootDir,
373
+ allFiles: [],
374
+ allDirectories: [rootDir],
375
+ stats: {
376
+ totalFiles: 0,
377
+ totalDirectories: 1,
378
+ totalSize: 0,
379
+ maxDepth: 0,
380
+ buildingTypeDistribution: {},
381
+ directoryTypeDistribution: {},
382
+ combinedTypeDistribution: {},
383
+ },
384
+ filterStats: this.filterStats,
385
+ appliedFilters: [],
386
+ inverseMatches: [],
387
+ };
388
+ }
389
+ }
390
+ exports.FilesystemService = FilesystemService;
391
+ //# sourceMappingURL=FilesystemService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilesystemService.js","sourceRoot":"","sources":["../../src/services/FilesystemService.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAM5B,2CAA2C;AAC3C,MAAM,IAAI,GAAG;IACX,QAAQ,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE;IACjD,IAAI,EAAE,CAAC,GAAG,KAAe,EAAE,EAAE;QAC3B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9C,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,CAAC;IACD,QAAQ,EAAE,CAAC,IAAY,EAAE,EAAU,EAAE,EAAE;QACrC,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YAC1B,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;YAC9B,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACnC,CAAC;QACD,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC;YAChB,OAAO,GAAG,CAAC;QACb,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,EAAE,CAAC,CAAS,EAAE,EAAE;QACrB,MAAM,SAAS,GAAG,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACrC,O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,EAAE,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,MAAM;YAC5C,QAAQ,EAAE,EAAE;YACZ,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,CAAC;YACZ,KAAK,EAAE,CAAC;YACR,YAAY,EAAE,GAAG;SAClB,CAAC;QAEF,OAAO;YACL,GAAG,EAAE,EAAE;YACP,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,EAAE;YACZ,cAAc,EAAE,CAAC,OAAO,CAAC;YACzB,KAAK,EAAE;gBACL,UAAU,EAAE,CAAC;gBACb,gBAAgB,EAAE,CAAC;gBACnB,SAAS,EAAE,CAAC;gBACZ,QAAQ,EAAE,CAAC;gBACX,wBAAwB,EAAE,EAAE;gBAC5B,yBAAyB,EAAE,EAAE;gBAC7B,wBAAwB,EAAE,EAAE;aAC7B;YACD,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,cAAc,EAAE,EAAE;YAClB,cAAc,EAAE,EAAE;SACnB,CAAC;IACJ,CAAC;CACF;AAveD,8CAueC"}
@@ -0,0 +1,2 @@
1
+ export { FilesystemService } from './FilesystemService';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FilesystemService = void 0;
4
+ // File system services
5
+ var FilesystemService_1 = require("./FilesystemService");
6
+ Object.defineProperty(exports, "FilesystemService", { enumerable: true, get: function () { return FilesystemService_1.FilesystemService; } });
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":";;;AAAA,uBAAuB;AACvB,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * File system types for layer modules
3
+ * Re-exported from core/file-tree to maintain consistency
4
+ */
5
+ export type { FileInfo, DirectoryInfo, FileTree } from '@principal-ai/repository-abstraction';
6
+ export type { FileTree as FileSystemTree } from '@principal-ai/repository-abstraction';
7
+ //# sourceMappingURL=file-system.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-system.d.ts","sourceRoot":"","sources":["../../src/types/file-system.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAI9F,YAAY,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,sCAAsC,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * File system types for layer modules
4
+ * Re-exported from core/file-tree to maintain consistency
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ //# sourceMappingURL=file-system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-system.js","sourceRoot":"","sources":["../../src/types/file-system.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
@@ -0,0 +1,4 @@
1
+ export type { FilePattern, FileSet, BaseLayer, PackageCommand, ConfigFile, PackageLayer, FileSystemFilterLayer, ExtractedType, PackageTypes, TypeDefinitionLayer, TypeExtractor, } from './layer-types';
2
+ export type { VersionControlLayer, VersionControlIgnorePattern, VersionControlProvider, } from './version-control-layer';
3
+ export type { FileInfo, DirectoryInfo, FileTree, FileSystemTree } from './file-system';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,WAAW,EACX,OAAO,EACP,SAAS,EACT,cAAc,EACd,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,aAAa,GACd,MAAM,eAAe,CAAC;AAGvB,YAAY,EACV,mBAAmB,EACnB,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AAGjC,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,187 @@
1
+ /**
2
+ * Core layer type system
3
+ * Minimal types needed for FileTypeLayerModule
4
+ */
5
+ export interface FilePattern {
6
+ type: 'glob' | 'regex' | 'exact';
7
+ pattern: string;
8
+ description?: string;
9
+ }
10
+ export interface FileSet {
11
+ id: string;
12
+ name: string;
13
+ description?: string;
14
+ patterns: FilePattern[];
15
+ matchedFiles?: string[];
16
+ fileCount?: number;
17
+ }
18
+ export interface BaseLayer {
19
+ id: string;
20
+ name: string;
21
+ type: string;
22
+ enabled: boolean;
23
+ workspaceId?: string;
24
+ workspaceRoot?: string;
25
+ derivedFrom: {
26
+ fileSets: FileSet[];
27
+ derivationType: 'presence' | 'content' | 'aggregation' | 'relationship' | 'content+pattern' | 'content+presence';
28
+ description: string;
29
+ contentExtraction?: {
30
+ method: 'parse' | 'grep' | 'ast' | 'custom';
31
+ parser?: {
32
+ format: 'json' | 'yaml' | 'toml' | 'xml';
33
+ paths?: string[];
34
+ schema?: unknown;
35
+ };
36
+ patterns?: {
37
+ regex: string;
38
+ captureGroups?: string[];
39
+ multiline?: boolean;
40
+ }[];
41
+ ast?: {
42
+ language: string;
43
+ nodeTypes?: string[];
44
+ visitor?: string;
45
+ };
46
+ };
47
+ };
48
+ dependsOn?: string[];
49
+ enhances?: string;
50
+ color?: string;
51
+ icon?: string;
52
+ pillar?: 'validation' | 'dataFlow' | 'foundationHealth' | 'viewLayers';
53
+ }
54
+ export interface PackageCommand {
55
+ name: string;
56
+ command: string;
57
+ description?: string;
58
+ type?: 'script' | 'standard';
59
+ workingDirectory?: string;
60
+ }
61
+ export interface ConfigFile {
62
+ path: string;
63
+ exists: boolean;
64
+ type: 'json' | 'yaml' | 'toml' | 'js' | 'ts' | 'ini' | 'custom';
65
+ isInline?: boolean;
66
+ inlineField?: string;
67
+ }
68
+ export interface FileSystemFilterLayer extends BaseLayer {
69
+ type: 'filter';
70
+ filterData: {
71
+ purpose: 'performance' | 'security' | 'relevance';
72
+ scope: 'directory' | 'workspace';
73
+ sourceDirectory: string;
74
+ excludedPatterns: FilePattern[];
75
+ stats?: {
76
+ totalFiltered: number;
77
+ bytesExcluded: number;
78
+ largestExcluded?: string;
79
+ };
80
+ };
81
+ }
82
+ export interface PackageLayer extends BaseLayer {
83
+ type: 'package' | 'node' | 'python' | 'cargo' | 'go';
84
+ packageData: {
85
+ name: string;
86
+ version?: string;
87
+ path: string;
88
+ packageManager: 'npm' | 'yarn' | 'pnpm' | 'pip' | 'poetry' | 'pipenv' | 'cargo' | 'unknown';
89
+ dependencies: Record<string, string>;
90
+ devDependencies: Record<string, string>;
91
+ peerDependencies: Record<string, string>;
92
+ isMonorepoRoot: boolean;
93
+ isWorkspace: boolean;
94
+ parentPackage?: string;
95
+ availableCommands?: PackageCommand[];
96
+ };
97
+ lockFiles?: FileSet;
98
+ configFiles?: {
99
+ knip?: ConfigFile;
100
+ eslint?: ConfigFile;
101
+ prettier?: ConfigFile;
102
+ typescript?: ConfigFile;
103
+ jest?: ConfigFile;
104
+ vitest?: ConfigFile;
105
+ webpack?: ConfigFile;
106
+ vite?: ConfigFile;
107
+ rollup?: ConfigFile;
108
+ babel?: ConfigFile;
109
+ pytest?: ConfigFile;
110
+ flake8?: ConfigFile;
111
+ mypy?: ConfigFile;
112
+ black?: ConfigFile;
113
+ ruff?: ConfigFile;
114
+ pylint?: ConfigFile;
115
+ rustfmt?: ConfigFile;
116
+ clippy?: ConfigFile;
117
+ dockerfile?: ConfigFile;
118
+ gitignore?: ConfigFile;
119
+ editorconfig?: ConfigFile;
120
+ [key: string]: ConfigFile | undefined;
121
+ };
122
+ docsFolder?: string;
123
+ }
124
+ export interface DependencyLayer extends BaseLayer {
125
+ type: 'dependency';
126
+ dependencyData: {
127
+ name: string;
128
+ version: string;
129
+ isDev: boolean;
130
+ isPeer: boolean;
131
+ declaredIn: string[];
132
+ sourceFile: FileSet;
133
+ };
134
+ }
135
+ export interface FrameworkLayer extends BaseLayer {
136
+ type: 'framework';
137
+ frameworkData: {
138
+ name: string;
139
+ category: 'ui' | 'backend' | 'testing' | 'build' | 'styling';
140
+ usedBy: string[];
141
+ };
142
+ }
143
+ export interface ExtractedType {
144
+ name: string;
145
+ kind: 'interface' | 'type' | 'class' | 'enum' | 'function';
146
+ text: string;
147
+ fileName: string;
148
+ isExported: boolean;
149
+ jsDoc?: string;
150
+ }
151
+ export interface PackageTypes {
152
+ packagePath: string;
153
+ packageName: string;
154
+ types: ExtractedType[];
155
+ exports: {
156
+ named: string[];
157
+ default?: string;
158
+ };
159
+ }
160
+ export interface TypeExtractionOptions {
161
+ includeTests?: boolean;
162
+ includeInternal?: boolean;
163
+ }
164
+ export interface TypeExtractor {
165
+ name: string;
166
+ canHandle(packagePath: string, fileExtensions: string[]): boolean;
167
+ extractTypes(packagePath: string, options?: TypeExtractionOptions): Promise<PackageTypes>;
168
+ generateDefinitionFile?(packageTypes: PackageTypes): Promise<string>;
169
+ }
170
+ export interface TypeDefinitionLayer extends BaseLayer {
171
+ type: 'type-definitions';
172
+ typeData: {
173
+ sourcePackageId: string;
174
+ extractedTypes: ExtractedType[];
175
+ exports: {
176
+ named: string[];
177
+ default?: string;
178
+ };
179
+ hasTypeScript: boolean;
180
+ definitionFile?: string;
181
+ extractionOptions?: {
182
+ includeTests: boolean;
183
+ includeInternal: boolean;
184
+ };
185
+ };
186
+ }
187
+ //# sourceMappingURL=layer-types.d.ts.map