@thanh01.pmt/domain-kit 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 (108) hide show
  1. package/README.md +1101 -0
  2. package/dist/assembly/index.cjs +213 -0
  3. package/dist/assembly/index.cjs.map +1 -0
  4. package/dist/assembly/index.d.cts +66 -0
  5. package/dist/assembly/index.d.ts +66 -0
  6. package/dist/assembly/index.mjs +4 -0
  7. package/dist/assembly/index.mjs.map +1 -0
  8. package/dist/chunk-3H2HX7PR.mjs +324 -0
  9. package/dist/chunk-3H2HX7PR.mjs.map +1 -0
  10. package/dist/chunk-3VVPSRAM.mjs +1297 -0
  11. package/dist/chunk-3VVPSRAM.mjs.map +1 -0
  12. package/dist/chunk-DRVOV5ZD.mjs +314 -0
  13. package/dist/chunk-DRVOV5ZD.mjs.map +1 -0
  14. package/dist/chunk-F4RZNBOE.mjs +3 -0
  15. package/dist/chunk-F4RZNBOE.mjs.map +1 -0
  16. package/dist/chunk-GEUDHZE7.mjs +446 -0
  17. package/dist/chunk-GEUDHZE7.mjs.map +1 -0
  18. package/dist/chunk-HH4UX65C.mjs +100 -0
  19. package/dist/chunk-HH4UX65C.mjs.map +1 -0
  20. package/dist/chunk-KMYENICQ.mjs +3 -0
  21. package/dist/chunk-KMYENICQ.mjs.map +1 -0
  22. package/dist/chunk-KNDBODUQ.mjs +153 -0
  23. package/dist/chunk-KNDBODUQ.mjs.map +1 -0
  24. package/dist/chunk-MM2RWYNW.mjs +3 -0
  25. package/dist/chunk-MM2RWYNW.mjs.map +1 -0
  26. package/dist/chunk-MOKNFLUD.mjs +851 -0
  27. package/dist/chunk-MOKNFLUD.mjs.map +1 -0
  28. package/dist/chunk-ONQHJ4OH.mjs +211 -0
  29. package/dist/chunk-ONQHJ4OH.mjs.map +1 -0
  30. package/dist/chunk-PM42MMDJ.mjs +516 -0
  31. package/dist/chunk-PM42MMDJ.mjs.map +1 -0
  32. package/dist/chunk-RKRNOVKO.mjs +166 -0
  33. package/dist/chunk-RKRNOVKO.mjs.map +1 -0
  34. package/dist/chunk-VFART56O.mjs +884 -0
  35. package/dist/chunk-VFART56O.mjs.map +1 -0
  36. package/dist/chunk-XMHKWHVK.mjs +218 -0
  37. package/dist/chunk-XMHKWHVK.mjs.map +1 -0
  38. package/dist/conceptEscalator-YfMKIKCZ.d.ts +40 -0
  39. package/dist/conceptEscalator-ltRLtPhf.d.cts +40 -0
  40. package/dist/concepts/index.cjs +155 -0
  41. package/dist/concepts/index.cjs.map +1 -0
  42. package/dist/concepts/index.d.cts +79 -0
  43. package/dist/concepts/index.d.ts +79 -0
  44. package/dist/concepts/index.mjs +4 -0
  45. package/dist/concepts/index.mjs.map +1 -0
  46. package/dist/curriculumFeedSchema-TEeQg2bY.d.cts +549 -0
  47. package/dist/curriculumFeedSchema-TEeQg2bY.d.ts +549 -0
  48. package/dist/detector/index.cjs +889 -0
  49. package/dist/detector/index.cjs.map +1 -0
  50. package/dist/detector/index.d.cts +112 -0
  51. package/dist/detector/index.d.ts +112 -0
  52. package/dist/detector/index.mjs +3 -0
  53. package/dist/detector/index.mjs.map +1 -0
  54. package/dist/domainProfileSchema-CwT3Ffsw.d.cts +105 -0
  55. package/dist/domainProfileSchema-CwT3Ffsw.d.ts +105 -0
  56. package/dist/extractors/index.cjs +387 -0
  57. package/dist/extractors/index.cjs.map +1 -0
  58. package/dist/extractors/index.d.cts +46 -0
  59. package/dist/extractors/index.d.ts +46 -0
  60. package/dist/extractors/index.mjs +4 -0
  61. package/dist/extractors/index.mjs.map +1 -0
  62. package/dist/feed/index.cjs +421 -0
  63. package/dist/feed/index.cjs.map +1 -0
  64. package/dist/feed/index.d.cts +23 -0
  65. package/dist/feed/index.d.ts +23 -0
  66. package/dist/feed/index.mjs +4 -0
  67. package/dist/feed/index.mjs.map +1 -0
  68. package/dist/graph/index.cjs +2167 -0
  69. package/dist/graph/index.cjs.map +1 -0
  70. package/dist/graph/index.d.cts +226 -0
  71. package/dist/graph/index.d.ts +226 -0
  72. package/dist/graph/index.mjs +4 -0
  73. package/dist/graph/index.mjs.map +1 -0
  74. package/dist/graphVerifier-DsTP9uAN.d.ts +37 -0
  75. package/dist/graphVerifier-QjgDAJce.d.cts +37 -0
  76. package/dist/hybridGraphSchema-BCgXicgA.d.cts +2840 -0
  77. package/dist/hybridGraphSchema-BCgXicgA.d.ts +2840 -0
  78. package/dist/index.cjs +5539 -0
  79. package/dist/index.cjs.map +1 -0
  80. package/dist/index.d.cts +18 -0
  81. package/dist/index.d.ts +18 -0
  82. package/dist/index.mjs +17 -0
  83. package/dist/index.mjs.map +1 -0
  84. package/dist/keywordExtractor-CKaXqSku.d.ts +34 -0
  85. package/dist/keywordExtractor-zPAz2isq.d.cts +34 -0
  86. package/dist/llmClient-ysPhLjcH.d.cts +16 -0
  87. package/dist/llmClient-ysPhLjcH.d.ts +16 -0
  88. package/dist/parsers/index.cjs +323 -0
  89. package/dist/parsers/index.cjs.map +1 -0
  90. package/dist/parsers/index.d.cts +98 -0
  91. package/dist/parsers/index.d.ts +98 -0
  92. package/dist/parsers/index.mjs +4 -0
  93. package/dist/parsers/index.mjs.map +1 -0
  94. package/dist/pipeline/index.cjs +2166 -0
  95. package/dist/pipeline/index.cjs.map +1 -0
  96. package/dist/pipeline/index.d.cts +45 -0
  97. package/dist/pipeline/index.d.ts +45 -0
  98. package/dist/pipeline/index.mjs +8 -0
  99. package/dist/pipeline/index.mjs.map +1 -0
  100. package/dist/projectGraphSchema-DnD7orZV.d.cts +2581 -0
  101. package/dist/projectGraphSchema-DnD7orZV.d.ts +2581 -0
  102. package/dist/schemas/index.cjs +675 -0
  103. package/dist/schemas/index.cjs.map +1 -0
  104. package/dist/schemas/index.d.cts +253 -0
  105. package/dist/schemas/index.d.ts +253 -0
  106. package/dist/schemas/index.mjs +4 -0
  107. package/dist/schemas/index.mjs.map +1 -0
  108. package/package.json +71 -0
@@ -0,0 +1,314 @@
1
+ // src/parsers/swift.ts
2
+ var IMPORT_RE = /^import\s+(\w+)/gm;
3
+ var TYPE_RE = /\b(class|struct|enum|protocol)\s+(\w+)(?:\s*:\s*([^{]+))?/g;
4
+ var FUNC_RE = /\bfunc\s+(\w+)\s*\(([^)]*)\)(?:\s*->\s*([^{]+))?/g;
5
+ var WRAPPER_RE = /@(State|Binding|ObservedObject|StateObject|Published|Environment|EnvironmentObject|AppStorage|SceneStorage|FocusState|Observable)\b/g;
6
+ var FRAMEWORK_USAGE_RE = /\b(URLSession|URLRequest|JSONSerialization|JSONDecoder|JSONEncoder|Task|DispatchQueue|Timer|NotificationCenter|UserDefaults|FileManager|Bundle)\b/g;
7
+ function parseSwiftFile(filepath, content) {
8
+ const result = {
9
+ imports: [],
10
+ types: [],
11
+ functions: [],
12
+ property_wrappers: [],
13
+ error_handling: [],
14
+ frameworks_used: []
15
+ };
16
+ let match;
17
+ while ((match = IMPORT_RE.exec(content)) !== null) {
18
+ result.imports.push(match[1]);
19
+ }
20
+ const fwSeen = /* @__PURE__ */ new Set();
21
+ while ((match = FRAMEWORK_USAGE_RE.exec(content)) !== null) {
22
+ if (!fwSeen.has(match[1])) {
23
+ fwSeen.add(match[1]);
24
+ result.frameworks_used.push(match[1]);
25
+ }
26
+ }
27
+ while ((match = TYPE_RE.exec(content)) !== null) {
28
+ const conforms = (match[3] || "").split(",").map((p) => p.trim()).filter(Boolean);
29
+ result.types.push({
30
+ kind: match[1],
31
+ name: match[2],
32
+ conforms_to: conforms,
33
+ file: filepath
34
+ });
35
+ }
36
+ while ((match = FUNC_RE.exec(content)) !== null) {
37
+ const name = match[1];
38
+ if (name.startsWith("_")) continue;
39
+ result.functions.push({
40
+ name,
41
+ params: (match[2] || "").trim(),
42
+ returns: (match[3] || "").trim(),
43
+ file: filepath
44
+ });
45
+ }
46
+ const wrapperSet = /* @__PURE__ */ new Set();
47
+ while ((match = WRAPPER_RE.exec(content)) !== null) {
48
+ wrapperSet.add(match[1]);
49
+ }
50
+ result.property_wrappers = Array.from(wrapperSet);
51
+ if (content.includes("do {") || content.includes("do{")) {
52
+ result.error_handling.push("do-catch");
53
+ }
54
+ if (content.includes("throws")) {
55
+ result.error_handling.push("throws");
56
+ }
57
+ if (content.includes("Result<")) {
58
+ result.error_handling.push("Result type");
59
+ }
60
+ if (content.includes("try?")) {
61
+ result.error_handling.push("try?");
62
+ }
63
+ if (content.includes("try!")) {
64
+ result.error_handling.push("try!");
65
+ }
66
+ return result;
67
+ }
68
+ function mergeSwiftResults(results) {
69
+ const merged = {
70
+ imports: [],
71
+ types: [],
72
+ functions: [],
73
+ property_wrappers: [],
74
+ error_handling: [],
75
+ frameworks_used: []
76
+ };
77
+ const importCounts = /* @__PURE__ */ new Map();
78
+ const wrapperCounts = /* @__PURE__ */ new Map();
79
+ const errorCounts = /* @__PURE__ */ new Map();
80
+ const frameworkSet = /* @__PURE__ */ new Set();
81
+ for (const r of results) {
82
+ for (const imp of r.imports) {
83
+ importCounts.set(imp, (importCounts.get(imp) || 0) + 1);
84
+ }
85
+ merged.types.push(...r.types);
86
+ merged.functions.push(...r.functions);
87
+ for (const w of r.property_wrappers) {
88
+ wrapperCounts.set(w, (wrapperCounts.get(w) || 0) + 1);
89
+ }
90
+ for (const e of r.error_handling) {
91
+ errorCounts.set(e, (errorCounts.get(e) || 0) + 1);
92
+ }
93
+ for (const fw of r.frameworks_used) {
94
+ frameworkSet.add(fw);
95
+ }
96
+ }
97
+ merged.imports = Array.from(importCounts.entries()).sort((a, b) => b[1] - a[1]).slice(0, 20).map(([mod, count]) => mod);
98
+ merged.property_wrappers = Array.from(wrapperCounts.entries()).sort((a, b) => b[1] - a[1]).slice(0, 10).map(([w]) => w);
99
+ merged.error_handling = Array.from(errorCounts.entries()).sort((a, b) => b[1] - a[1]).slice(0, 10).map(([p]) => p);
100
+ merged.frameworks_used = Array.from(frameworkSet).sort();
101
+ merged.types = merged.types.slice(0, 100);
102
+ merged.functions = merged.functions.slice(0, 100);
103
+ return merged;
104
+ }
105
+
106
+ // src/parsers/typescript.ts
107
+ var IMPORT_RE2 = /import\s+.*?from\s+['"]([^'"]+)['"]/g;
108
+ var TYPE_RE2 = /\b(interface|type|class|enum)\s+(\w+)/g;
109
+ var FUNC_RE2 = /\bfunction\s+(\w+)\s*\(([^)]*)\)/g;
110
+ var ARROW_RE = /\bconst\s+(\w+)\s*=\s*\([^)]*\)\s*(?::\s*\w+)?\s*=>/g;
111
+ function parseTsFile(filepath, content) {
112
+ const result = {
113
+ imports: [],
114
+ types: [],
115
+ functions: [],
116
+ error_handling: []
117
+ };
118
+ let match;
119
+ while ((match = IMPORT_RE2.exec(content)) !== null) {
120
+ result.imports.push(match[1]);
121
+ }
122
+ while ((match = TYPE_RE2.exec(content)) !== null) {
123
+ result.types.push({
124
+ kind: match[1],
125
+ name: match[2],
126
+ file: filepath
127
+ });
128
+ }
129
+ while ((match = FUNC_RE2.exec(content)) !== null) {
130
+ result.functions.push({
131
+ name: match[1],
132
+ params: (match[2] || "").trim(),
133
+ file: filepath
134
+ });
135
+ }
136
+ while ((match = ARROW_RE.exec(content)) !== null) {
137
+ result.functions.push({
138
+ name: match[1],
139
+ params: "",
140
+ file: filepath
141
+ });
142
+ }
143
+ if (content.includes("try {") || content.includes("try{")) {
144
+ result.error_handling.push("try-catch");
145
+ }
146
+ if (content.includes("Promise")) {
147
+ result.error_handling.push("Promise");
148
+ }
149
+ if (content.includes(".catch(")) {
150
+ result.error_handling.push(".catch()");
151
+ }
152
+ return result;
153
+ }
154
+ function mergeTsResults(results) {
155
+ const merged = {
156
+ imports: [],
157
+ types: [],
158
+ functions: [],
159
+ error_handling: []
160
+ };
161
+ const importCounts = /* @__PURE__ */ new Map();
162
+ const errorCounts = /* @__PURE__ */ new Map();
163
+ for (const r of results) {
164
+ for (const imp of r.imports) {
165
+ importCounts.set(imp, (importCounts.get(imp) || 0) + 1);
166
+ }
167
+ merged.types.push(...r.types);
168
+ merged.functions.push(...r.functions);
169
+ for (const e of r.error_handling) {
170
+ errorCounts.set(e, (errorCounts.get(e) || 0) + 1);
171
+ }
172
+ }
173
+ merged.imports = Array.from(importCounts.entries()).sort((a, b) => b[1] - a[1]).slice(0, 20).map(([mod]) => mod);
174
+ merged.error_handling = Array.from(errorCounts.entries()).sort((a, b) => b[1] - a[1]).slice(0, 10).map(([p]) => p);
175
+ merged.types = merged.types.slice(0, 100);
176
+ merged.functions = merged.functions.slice(0, 100);
177
+ return merged;
178
+ }
179
+
180
+ // src/parsers/python.ts
181
+ var IMPORT_RE3 = /^(?:import|from)\s+(\w+)/gm;
182
+ var CLASS_RE = /\bclass\s+(\w+)(?:\s*\(([^)]+)\))?/g;
183
+ var FUNC_RE3 = /\bdef\s+(\w+)\s*\(([^)]*)\)/g;
184
+ var DOCSTRING_RE = /"""([^"]{20,300})"""/g;
185
+ function parsePythonFile(filepath, content) {
186
+ const result = {
187
+ imports: [],
188
+ types: [],
189
+ functions: [],
190
+ docstrings: [],
191
+ error_handling: []
192
+ };
193
+ let match;
194
+ while ((match = IMPORT_RE3.exec(content)) !== null) {
195
+ result.imports.push(match[1]);
196
+ }
197
+ while ((match = DOCSTRING_RE.exec(content)) !== null) {
198
+ const firstSentence = match[1].trim().split("\n")[0].slice(0, 120);
199
+ if (firstSentence.length > 15) {
200
+ result.docstrings.push(firstSentence);
201
+ }
202
+ }
203
+ while ((match = CLASS_RE.exec(content)) !== null) {
204
+ const bases = (match[2] || "").split(",").map((b) => b.trim()).filter(Boolean);
205
+ result.types.push({
206
+ kind: "class",
207
+ name: match[1],
208
+ bases,
209
+ file: filepath
210
+ });
211
+ }
212
+ while ((match = FUNC_RE3.exec(content)) !== null) {
213
+ const name = match[1];
214
+ if (name.startsWith("__") && name.endsWith("__")) continue;
215
+ result.functions.push({
216
+ name,
217
+ params: (match[2] || "").trim(),
218
+ file: filepath
219
+ });
220
+ }
221
+ if (content.includes("try:")) {
222
+ result.error_handling.push("try-except");
223
+ }
224
+ if (content.includes("raise")) {
225
+ result.error_handling.push("raise");
226
+ }
227
+ return result;
228
+ }
229
+ function mergePythonResults(results) {
230
+ const merged = {
231
+ imports: [],
232
+ types: [],
233
+ functions: [],
234
+ docstrings: [],
235
+ error_handling: []
236
+ };
237
+ const importCounts = /* @__PURE__ */ new Map();
238
+ const errorCounts = /* @__PURE__ */ new Map();
239
+ for (const r of results) {
240
+ for (const imp of r.imports) {
241
+ importCounts.set(imp, (importCounts.get(imp) || 0) + 1);
242
+ }
243
+ merged.types.push(...r.types);
244
+ merged.functions.push(...r.functions);
245
+ merged.docstrings.push(...r.docstrings);
246
+ for (const e of r.error_handling) {
247
+ errorCounts.set(e, (errorCounts.get(e) || 0) + 1);
248
+ }
249
+ }
250
+ merged.imports = Array.from(importCounts.entries()).sort((a, b) => b[1] - a[1]).slice(0, 20).map(([mod]) => mod);
251
+ merged.error_handling = Array.from(errorCounts.entries()).sort((a, b) => b[1] - a[1]).slice(0, 10).map(([p]) => p);
252
+ merged.types = merged.types.slice(0, 100);
253
+ merged.functions = merged.functions.slice(0, 100);
254
+ merged.docstrings = merged.docstrings.slice(0, 20);
255
+ return merged;
256
+ }
257
+
258
+ // src/parsers/cpp.ts
259
+ var INCLUDE_RE = /#include\s*[<"]([^>"]+)[>"]/g;
260
+ var TYPE_RE3 = /\b(?:class|struct|enum)\s+(\w+)/g;
261
+ var FUNC_RE4 = /\b(?:void|int|float|double|char|bool|String|uint8_t|uint16_t|uint32_t)\s+(\w+)\s*\(/g;
262
+ function parseCppFile(filepath, content) {
263
+ const result = {
264
+ imports: [],
265
+ types: [],
266
+ functions: [],
267
+ error_handling: []
268
+ };
269
+ let match;
270
+ while ((match = INCLUDE_RE.exec(content)) !== null) {
271
+ result.imports.push(match[1]);
272
+ }
273
+ while ((match = TYPE_RE3.exec(content)) !== null) {
274
+ result.types.push({
275
+ kind: "cpp",
276
+ name: match[1],
277
+ file: filepath
278
+ });
279
+ }
280
+ while ((match = FUNC_RE4.exec(content)) !== null) {
281
+ result.functions.push({
282
+ name: match[1],
283
+ file: filepath
284
+ });
285
+ }
286
+ if (/\btry\b|\bthrow\b|\bcatch\b/.test(content)) {
287
+ result.error_handling.push("try/throw/catch");
288
+ }
289
+ return result;
290
+ }
291
+ function mergeCppResults(results) {
292
+ const merged = {
293
+ imports: [],
294
+ types: [],
295
+ functions: [],
296
+ error_handling: []
297
+ };
298
+ const importCounts = /* @__PURE__ */ new Map();
299
+ for (const r of results) {
300
+ for (const imp of r.imports) {
301
+ importCounts.set(imp, (importCounts.get(imp) || 0) + 1);
302
+ }
303
+ merged.types.push(...r.types);
304
+ merged.functions.push(...r.functions);
305
+ merged.error_handling.push(...r.error_handling);
306
+ }
307
+ merged.imports = Array.from(importCounts.entries()).sort((a, b) => b[1] - a[1]).slice(0, 20).map(([mod]) => mod);
308
+ merged.error_handling = [...new Set(merged.error_handling)];
309
+ return merged;
310
+ }
311
+
312
+ export { mergeCppResults, mergePythonResults, mergeSwiftResults, mergeTsResults, parseCppFile, parsePythonFile, parseSwiftFile, parseTsFile };
313
+ //# sourceMappingURL=chunk-DRVOV5ZD.mjs.map
314
+ //# sourceMappingURL=chunk-DRVOV5ZD.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/parsers/swift.ts","../src/parsers/typescript.ts","../src/parsers/python.ts","../src/parsers/cpp.ts"],"names":["IMPORT_RE","TYPE_RE","FUNC_RE"],"mappings":";AA0BA,IAAM,SAAA,GAAY,mBAAA;AAClB,IAAM,OAAA,GAAU,4DAAA;AAChB,IAAM,OAAA,GAAU,mDAAA;AAChB,IAAM,UAAA,GAAa,sIAAA;AACnB,IAAM,kBAAA,GAAqB,oJAAA;AAEpB,SAAS,cAAA,CAAe,UAAkB,OAAA,EAAmC;AAClF,EAAA,MAAM,MAAA,GAA2B;AAAA,IAC/B,SAAS,EAAC;AAAA,IACV,OAAO,EAAC;AAAA,IACR,WAAW,EAAC;AAAA,IACZ,mBAAmB,EAAC;AAAA,IACpB,gBAAgB,EAAC;AAAA,IACjB,iBAAiB;AAAC,GACpB;AAGA,EAAA,IAAI,KAAA;AAC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AmB,GAAA,EAAoB;AAE7C,EAAA,KAAA,MAAW,KAAK,OAAA,EAAS;AACvB,IAAA,KAAA,MAAW,GAAA,IAAO,EAAE,OAAA,EAAS;AAC3B,MAAA,YAAA,CAAa,IAAI,GAAA,EAAA,CAAM,YAAA,CAAa,IAAI,GAAG,CAAA,IAAK,KAAK,CAAC,CAAA;AAAA,IACxD;AACA,IAAA,MAAA,CAAO,KAAA,CAAM,IAAA,CAAK,GAAG,CAAA,CAAE,KAAK,CAAA;AAC5B,IAAA,MAAA,CAAO,SAAA,CAAU,IAAA,CAAK,GAAG,CAAA,CAAE,SAAS,CAAA;AACpC,IAAA,MAAA,CAAO,cAAA,CAAe,IAAA,CAAK,GAAG,CAAA,CAAE,cAAc,CAAA;AAAA,EAChD;AAEA,EAAA,MAAA,CAAO,OAAA,GAAU,KAAA,CAAM,IAAA,CAAK,YAAA,CAAa,OAAA,EAAS,CAAA,CAC/C,IAAA,CAAK,CAAC,CAAA,EAAG,CAAA,KAAM,CAAA,CAAE,CAAC,CAAA,GAAI,CAAA,CAAE,CAAC,CAAC,CAAA,CAC1B,KAAA,CAAM,CAAA,EAAG,EAAE,CAAA,CACX,GAAA,CAAI,CAAC,CAAC,GAAG,CAAA,KAAM,GAAG,CAAA;AAGrB,EAAA,MAAA,CAAO,iBAAiB,CAAC,GAAG,IAAI,GAAA,CAAI,MAAA,CAAO,cAAc,CAAC,CAAA;AAE1D,EAAA,OAAO,MAAA;AACT","file":"chunk-DRVOV5ZD.mjs","sourcesContent":["/**\n * Swift AST-level parser — extracts imports, types, functions, property wrappers,\n * error handling patterns, and framework usage from Swift source files.\n *\n * Ported from knowledge-tree/extract_project_keywords.py parse_swift_file()\n */\n\nexport interface SwiftParseResult {\n imports: string[];\n types: Array<{\n kind: string;\n name: string;\n conforms_to: string[];\n file: string;\n }>;\n functions: Array<{\n name: string;\n params: string;\n returns: string;\n file: string;\n }>;\n property_wrappers: string[];\n error_handling: string[];\n frameworks_used: string[];\n}\n\nconst IMPORT_RE = /^import\\s+(\\w+)/gm;\nconst TYPE_RE = /\\b(class|struct|enum|protocol)\\s+(\\w+)(?:\\s*:\\s*([^{]+))?/g;\nconst FUNC_RE = /\\bfunc\\s+(\\w+)\\s*\\(([^)]*)\\)(?:\\s*->\\s*([^{]+))?/g;\nconst WRAPPER_RE = /@(State|Binding|ObservedObject|StateObject|Published|Environment|EnvironmentObject|AppStorage|SceneStorage|FocusState|Observable)\\b/g;\nconst FRAMEWORK_USAGE_RE = /\\b(URLSession|URLRequest|JSONSerialization|JSONDecoder|JSONEncoder|Task|DispatchQueue|Timer|NotificationCenter|UserDefaults|FileManager|Bundle)\\b/g;\n\nexport function parseSwiftFile(filepath: string, content: string): SwiftParseResult {\n const result: SwiftParseResult = {\n imports: [],\n types: [],\n functions: [],\n property_wrappers: [],\n error_handling: [],\n frameworks_used: [],\n };\n\n // Extract imports\n let match: RegExpExecArray | null;\n while ((match = IMPORT_RE.exec(content)) !== null) {\n result.imports.push(match[1]);\n }\n\n // Extract framework usage (types used in body, not declarations)\n const fwSeen = new Set<string>();\n while ((match = FRAMEWORK_USAGE_RE.exec(content)) !== null) {\n if (!fwSeen.has(match[1])) {\n fwSeen.add(match[1]);\n result.frameworks_used.push(match[1]);\n }\n }\n\n // Extract type declarations\n while ((match = TYPE_RE.exec(content)) !== null) {\n const conforms = (match[3] || '')\n .split(',')\n .map(p => p.trim())\n .filter(Boolean);\n result.types.push({\n kind: match[1],\n name: match[2],\n conforms_to: conforms,\n file: filepath,\n });\n }\n\n // Extract function signatures\n while ((match = FUNC_RE.exec(content)) !== null) {\n const name = match[1];\n if (name.startsWith('_')) continue;\n result.functions.push({\n name,\n params: (match[2] || '').trim(),\n returns: (match[3] || '').trim(),\n file: filepath,\n });\n }\n\n // Extract property wrappers\n const wrapperSet = new Set<string>();\n while ((match = WRAPPER_RE.exec(content)) !== null) {\n wrapperSet.add(match[1]);\n }\n result.property_wrappers = Array.from(wrapperSet);\n\n // Extract error handling patterns\n if (content.includes('do {') || content.includes('do{')) {\n result.error_handling.push('do-catch');\n }\n if (content.includes('throws')) {\n result.error_handling.push('throws');\n }\n if (content.includes('Result<')) {\n result.error_handling.push('Result type');\n }\n if (content.includes('try?')) {\n result.error_handling.push('try?');\n }\n if (content.includes('try!')) {\n result.error_handling.push('try!');\n }\n\n return result;\n}\n\nexport function mergeSwiftResults(results: SwiftParseResult[]): SwiftParseResult {\n const merged: SwiftParseResult = {\n imports: [],\n types: [],\n functions: [],\n property_wrappers: [],\n error_handling: [],\n frameworks_used: [],\n };\n\n const importCounts = new Map<string, number>();\n const wrapperCounts = new Map<string, number>();\n const errorCounts = new Map<string, number>();\n const frameworkSet = new Set<string>();\n\n for (const r of results) {\n for (const imp of r.imports) {\n importCounts.set(imp, (importCounts.get(imp) || 0) + 1);\n }\n merged.types.push(...r.types);\n merged.functions.push(...r.functions);\n for (const w of r.property_wrappers) {\n wrapperCounts.set(w, (wrapperCounts.get(w) || 0) + 1);\n }\n for (const e of r.error_handling) {\n errorCounts.set(e, (errorCounts.get(e) || 0) + 1);\n }\n for (const fw of r.frameworks_used) {\n frameworkSet.add(fw);\n }\n }\n\n // Sort imports by count descending, top 20\n merged.imports = Array.from(importCounts.entries())\n .sort((a, b) => b[1] - a[1])\n .slice(0, 20)\n .map(([mod, count]) => mod);\n\n // Sort wrappers by count, top 10\n merged.property_wrappers = Array.from(wrapperCounts.entries())\n .sort((a, b) => b[1] - a[1])\n .slice(0, 10)\n .map(([w]) => w);\n\n // Sort errors by count, top 10\n merged.error_handling = Array.from(errorCounts.entries())\n .sort((a, b) => b[1] - a[1])\n .slice(0, 10)\n .map(([p]) => p);\n\n merged.frameworks_used = Array.from(frameworkSet).sort();\n\n // Limit types and functions\n merged.types = merged.types.slice(0, 100);\n merged.functions = merged.functions.slice(0, 100);\n\n return merged;\n}\n","/**\n * TypeScript/JavaScript AST-level parser — extracts imports, types, functions,\n * and error handling patterns.\n *\n * Ported from knowledge-tree/extract_project_keywords.py parse_ts_file()\n */\n\nexport interface TsParseResult {\n imports: string[];\n types: Array<{\n kind: string;\n name: string;\n file: string;\n }>;\n functions: Array<{\n name: string;\n params: string;\n file: string;\n }>;\n error_handling: string[];\n}\n\nconst IMPORT_RE = /import\\s+.*?from\\s+['\"]([^'\"]+)['\"]/g;\nconst TYPE_RE = /\\b(interface|type|class|enum)\\s+(\\w+)/g;\nconst FUNC_RE = /\\bfunction\\s+(\\w+)\\s*\\(([^)]*)\\)/g;\nconst ARROW_RE = /\\bconst\\s+(\\w+)\\s*=\\s*\\([^)]*\\)\\s*(?::\\s*\\w+)?\\s*=>/g;\n\nexport function parseTsFile(filepath: string, content: string): TsParseResult {\n const result: TsParseResult = {\n imports: [],\n types: [],\n functions: [],\n error_handling: [],\n };\n\n let match: RegExpExecArray | null;\n\n // Extract imports\n while ((match = IMPORT_RE.exec(content)) !== null) {\n result.imports.push(match[1]);\n }\n\n // Extract type/interface/class/enum declarations\n while ((match = TYPE_RE.exec(content)) !== null) {\n result.types.push({\n kind: match[1],\n name: match[2],\n file: filepath,\n });\n }\n\n // Extract function declarations\n while ((match = FUNC_RE.exec(content)) !== null) {\n result.functions.push({\n name: match[1],\n params: (match[2] || '').trim(),\n file: filepath,\n });\n }\n\n // Extract arrow functions\n while ((match = ARROW_RE.exec(content)) !== null) {\n result.functions.push({\n name: match[1],\n params: '',\n file: filepath,\n });\n }\n\n // Extract error handling patterns\n if (content.includes('try {') || content.includes('try{')) {\n result.error_handling.push('try-catch');\n }\n if (content.includes('Promise')) {\n result.error_handling.push('Promise');\n }\n if (content.includes('.catch(')) {\n result.error_handling.push('.catch()');\n }\n\n return result;\n}\n\nexport function mergeTsResults(results: TsParseResult[]): TsParseResult {\n const merged: TsParseResult = {\n imports: [],\n types: [],\n functions: [],\n error_handling: [],\n };\n\n const importCounts = new Map<string, number>();\n const errorCounts = new Map<string, number>();\n\n for (const r of results) {\n for (const imp of r.imports) {\n importCounts.set(imp, (importCounts.get(imp) || 0) + 1);\n }\n merged.types.push(...r.types);\n merged.functions.push(...r.functions);\n for (const e of r.error_handling) {\n errorCounts.set(e, (errorCounts.get(e) || 0) + 1);\n }\n }\n\n merged.imports = Array.from(importCounts.entries())\n .sort((a, b) => b[1] - a[1])\n .slice(0, 20)\n .map(([mod]) => mod);\n\n merged.error_handling = Array.from(errorCounts.entries())\n .sort((a, b) => b[1] - a[1])\n .slice(0, 10)\n .map(([p]) => p);\n\n merged.types = merged.types.slice(0, 100);\n merged.functions = merged.functions.slice(0, 100);\n\n return merged;\n}\n","/**\n * Python AST-level parser — extracts imports, classes, functions, docstrings,\n * and error handling patterns.\n *\n * Ported from knowledge-tree/extract_project_keywords.py parse_python_file()\n */\n\nexport interface PythonParseResult {\n imports: string[];\n types: Array<{\n kind: string;\n name: string;\n bases: string[];\n file: string;\n }>;\n functions: Array<{\n name: string;\n params: string;\n file: string;\n }>;\n docstrings: string[];\n error_handling: string[];\n}\n\nconst IMPORT_RE = /^(?:import|from)\\s+(\\w+)/gm;\nconst CLASS_RE = /\\bclass\\s+(\\w+)(?:\\s*\\(([^)]+)\\))?/g;\nconst FUNC_RE = /\\bdef\\s+(\\w+)\\s*\\(([^)]*)\\)/g;\nconst DOCSTRING_RE = /\"\"\"([^\"]{20,300})\"\"\"/g;\n\nexport function parsePythonFile(filepath: string, content: string): PythonParseResult {\n const result: PythonParseResult = {\n imports: [],\n types: [],\n functions: [],\n docstrings: [],\n error_handling: [],\n };\n\n let match: RegExpExecArray | null;\n\n // Extract imports\n while ((match = IMPORT_RE.exec(content)) !== null) {\n result.imports.push(match[1]);\n }\n\n // Extract docstrings (module, class, function level) — high-signal domain intent\n while ((match = DOCSTRING_RE.exec(content)) !== null) {\n const firstSentence = match[1].trim().split('\\n')[0].slice(0, 120);\n if (firstSentence.length > 15) {\n result.docstrings.push(firstSentence);\n }\n }\n\n // Extract class declarations\n while ((match = CLASS_RE.exec(content)) !== null) {\n const bases = (match[2] || '')\n .split(',')\n .map(b => b.trim())\n .filter(Boolean);\n result.types.push({\n kind: 'class',\n name: match[1],\n bases,\n file: filepath,\n });\n }\n\n // Extract function declarations\n while ((match = FUNC_RE.exec(content)) !== null) {\n const name = match[1];\n // Skip dunder methods (__init__, __str__)\n if (name.startsWith('__') && name.endsWith('__')) continue;\n result.functions.push({\n name,\n params: (match[2] || '').trim(),\n file: filepath,\n });\n }\n\n // Extract error handling patterns\n if (content.includes('try:')) {\n result.error_handling.push('try-except');\n }\n if (content.includes('raise')) {\n result.error_handling.push('raise');\n }\n\n return result;\n}\n\nexport function mergePythonResults(results: PythonParseResult[]): PythonParseResult {\n const merged: PythonParseResult = {\n imports: [],\n types: [],\n functions: [],\n docstrings: [],\n error_handling: [],\n };\n\n const importCounts = new Map<string, number>();\n const errorCounts = new Map<string, number>();\n\n for (const r of results) {\n for (const imp of r.imports) {\n importCounts.set(imp, (importCounts.get(imp) || 0) + 1);\n }\n merged.types.push(...r.types);\n merged.functions.push(...r.functions);\n merged.docstrings.push(...r.docstrings);\n for (const e of r.error_handling) {\n errorCounts.set(e, (errorCounts.get(e) || 0) + 1);\n }\n }\n\n merged.imports = Array.from(importCounts.entries())\n .sort((a, b) => b[1] - a[1])\n .slice(0, 20)\n .map(([mod]) => mod);\n\n merged.error_handling = Array.from(errorCounts.entries())\n .sort((a, b) => b[1] - a[1])\n .slice(0, 10)\n .map(([p]) => p);\n\n merged.types = merged.types.slice(0, 100);\n merged.functions = merged.functions.slice(0, 100);\n merged.docstrings = merged.docstrings.slice(0, 20);\n\n return merged;\n}\n","/**\n * C++/Arduino AST-level parser — extracts #include, types, functions,\n * and error handling patterns.\n *\n * Ported from knowledge-tree/extract_project_keywords.py parse_cpp_file()\n */\n\nexport interface CppParseResult {\n imports: string[];\n types: Array<{\n kind: string;\n name: string;\n file: string;\n }>;\n functions: Array<{\n name: string;\n file: string;\n }>;\n error_handling: string[];\n}\n\nconst INCLUDE_RE = /#include\\s*[<\"]([^>\"]+)[>\"]/g;\nconst TYPE_RE = /\\b(?:class|struct|enum)\\s+(\\w+)/g;\nconst FUNC_RE = /\\b(?:void|int|float|double|char|bool|String|uint8_t|uint16_t|uint32_t)\\s+(\\w+)\\s*\\(/g;\n\nexport function parseCppFile(filepath: string, content: string): CppParseResult {\n const result: CppParseResult = {\n imports: [],\n types: [],\n functions: [],\n error_handling: [],\n };\n\n let match: RegExpExecArray | null;\n\n // Extract #include\n while ((match = INCLUDE_RE.exec(content)) !== null) {\n result.imports.push(match[1]);\n }\n\n // Extract type declarations\n while ((match = TYPE_RE.exec(content)) !== null) {\n result.types.push({\n kind: 'cpp',\n name: match[1],\n file: filepath,\n });\n }\n\n // Extract function declarations\n while ((match = FUNC_RE.exec(content)) !== null) {\n result.functions.push({\n name: match[1],\n file: filepath,\n });\n }\n\n // Extract error handling patterns\n if (/\\btry\\b|\\bthrow\\b|\\bcatch\\b/.test(content)) {\n result.error_handling.push('try/throw/catch');\n }\n\n return result;\n}\n\nexport function mergeCppResults(results: CppParseResult[]): CppParseResult {\n const merged: CppParseResult = {\n imports: [],\n types: [],\n functions: [],\n error_handling: [],\n };\n\n const importCounts = new Map<string, number>();\n\n for (const r of results) {\n for (const imp of r.imports) {\n importCounts.set(imp, (importCounts.get(imp) || 0) + 1);\n }\n merged.types.push(...r.types);\n merged.functions.push(...r.functions);\n merged.error_handling.push(...r.error_handling);\n }\n\n merged.imports = Array.from(importCounts.entries())\n .sort((a, b) => b[1] - a[1])\n .slice(0, 20)\n .map(([mod]) => mod);\n\n // Deduplicate error handling\n merged.error_handling = [...new Set(merged.error_handling)];\n\n return merged;\n}\n"]}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=chunk-F4RZNBOE.mjs.map
3
+ //# sourceMappingURL=chunk-F4RZNBOE.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-F4RZNBOE.mjs"}