@vedangiitb/qwintly-core 1.0.2

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 (226) hide show
  1. package/README.md +8 -0
  2. package/dist/ai/ai.d.ts +2 -0
  3. package/dist/ai/ai.d.ts.map +1 -0
  4. package/dist/ai/ai.js +2 -0
  5. package/dist/ai/ai.js.map +1 -0
  6. package/dist/ai/generate/gemini.client.d.ts +15 -0
  7. package/dist/ai/generate/gemini.client.d.ts.map +1 -0
  8. package/dist/ai/generate/gemini.client.js +39 -0
  9. package/dist/ai/generate/gemini.client.js.map +1 -0
  10. package/dist/ai/generate/generateClient.d.ts +3 -0
  11. package/dist/ai/generate/generateClient.d.ts.map +1 -0
  12. package/dist/ai/generate/generateClient.js +8 -0
  13. package/dist/ai/generate/generateClient.js.map +1 -0
  14. package/dist/ai/toolLoop/toolLoopContext.d.ts +33 -0
  15. package/dist/ai/toolLoop/toolLoopContext.d.ts.map +1 -0
  16. package/dist/ai/toolLoop/toolLoopContext.js +112 -0
  17. package/dist/ai/toolLoop/toolLoopContext.js.map +1 -0
  18. package/dist/ai/toolLoop/toolLoopRunner.d.ts +43 -0
  19. package/dist/ai/toolLoop/toolLoopRunner.d.ts.map +1 -0
  20. package/dist/ai/toolLoop/toolLoopRunner.js +227 -0
  21. package/dist/ai/toolLoop/toolLoopRunner.js.map +1 -0
  22. package/dist/ai/toolLoop/toolLoopRunnerUtils.d.ts +51 -0
  23. package/dist/ai/toolLoop/toolLoopRunnerUtils.d.ts.map +1 -0
  24. package/dist/ai/toolLoop/toolLoopRunnerUtils.js +164 -0
  25. package/dist/ai/toolLoop/toolLoopRunnerUtils.js.map +1 -0
  26. package/dist/ai/tools/helpers/applyPatch.helpers.d.ts +36 -0
  27. package/dist/ai/tools/helpers/applyPatch.helpers.d.ts.map +1 -0
  28. package/dist/ai/tools/helpers/applyPatch.helpers.js +307 -0
  29. package/dist/ai/tools/helpers/applyPatch.helpers.js.map +1 -0
  30. package/dist/ai/tools/helpers/applyPatch.helpers.test.d.ts +2 -0
  31. package/dist/ai/tools/helpers/applyPatch.helpers.test.d.ts.map +1 -0
  32. package/dist/ai/tools/helpers/applyPatch.helpers.test.js +50 -0
  33. package/dist/ai/tools/helpers/applyPatch.helpers.test.js.map +1 -0
  34. package/dist/ai/tools/helpers/fileSystem.helpers.d.ts +2 -0
  35. package/dist/ai/tools/helpers/fileSystem.helpers.d.ts.map +1 -0
  36. package/dist/ai/tools/helpers/fileSystem.helpers.js +45 -0
  37. package/dist/ai/tools/helpers/fileSystem.helpers.js.map +1 -0
  38. package/dist/ai/tools/helpers/fileSystem.helpers.test.d.ts +2 -0
  39. package/dist/ai/tools/helpers/fileSystem.helpers.test.d.ts.map +1 -0
  40. package/dist/ai/tools/helpers/fileSystem.helpers.test.js +15 -0
  41. package/dist/ai/tools/helpers/fileSystem.helpers.test.js.map +1 -0
  42. package/dist/ai/tools/helpers/format.helpers.d.ts +2 -0
  43. package/dist/ai/tools/helpers/format.helpers.d.ts.map +1 -0
  44. package/dist/ai/tools/helpers/format.helpers.js +14 -0
  45. package/dist/ai/tools/helpers/format.helpers.js.map +1 -0
  46. package/dist/ai/tools/helpers/nextRouteFilePolicy.d.ts +8 -0
  47. package/dist/ai/tools/helpers/nextRouteFilePolicy.d.ts.map +1 -0
  48. package/dist/ai/tools/helpers/nextRouteFilePolicy.js +26 -0
  49. package/dist/ai/tools/helpers/nextRouteFilePolicy.js.map +1 -0
  50. package/dist/ai/tools/implementations/applyPatch.impl.d.ts +53 -0
  51. package/dist/ai/tools/implementations/applyPatch.impl.d.ts.map +1 -0
  52. package/dist/ai/tools/implementations/applyPatch.impl.js +242 -0
  53. package/dist/ai/tools/implementations/applyPatch.impl.js.map +1 -0
  54. package/dist/ai/tools/implementations/applyPatch.impl.test.d.ts +2 -0
  55. package/dist/ai/tools/implementations/applyPatch.impl.test.d.ts.map +1 -0
  56. package/dist/ai/tools/implementations/applyPatch.impl.test.js +72 -0
  57. package/dist/ai/tools/implementations/applyPatch.impl.test.js.map +1 -0
  58. package/dist/ai/tools/implementations/factories.d.ts +90 -0
  59. package/dist/ai/tools/implementations/factories.d.ts.map +1 -0
  60. package/dist/ai/tools/implementations/factories.js +26 -0
  61. package/dist/ai/tools/implementations/factories.js.map +1 -0
  62. package/dist/ai/tools/implementations/listDir.impl.d.ts +3 -0
  63. package/dist/ai/tools/implementations/listDir.impl.d.ts.map +1 -0
  64. package/dist/ai/tools/implementations/listDir.impl.js +47 -0
  65. package/dist/ai/tools/implementations/listDir.impl.js.map +1 -0
  66. package/dist/ai/tools/implementations/readFile.impl.d.ts +3 -0
  67. package/dist/ai/tools/implementations/readFile.impl.d.ts.map +1 -0
  68. package/dist/ai/tools/implementations/readFile.impl.js +23 -0
  69. package/dist/ai/tools/implementations/readFile.impl.js.map +1 -0
  70. package/dist/ai/tools/implementations/search.impl.d.ts +18 -0
  71. package/dist/ai/tools/implementations/search.impl.d.ts.map +1 -0
  72. package/dist/ai/tools/implementations/search.impl.js +74 -0
  73. package/dist/ai/tools/implementations/search.impl.js.map +1 -0
  74. package/dist/ai/tools/implementations/workspaceDeps.d.ts +22 -0
  75. package/dist/ai/tools/implementations/workspaceDeps.d.ts.map +1 -0
  76. package/dist/ai/tools/implementations/workspaceDeps.js +2 -0
  77. package/dist/ai/tools/implementations/workspaceDeps.js.map +1 -0
  78. package/dist/ai/tools/implementations/writeFile.impl.d.ts +27 -0
  79. package/dist/ai/tools/implementations/writeFile.impl.d.ts.map +1 -0
  80. package/dist/ai/tools/implementations/writeFile.impl.js +62 -0
  81. package/dist/ai/tools/implementations/writeFile.impl.js.map +1 -0
  82. package/dist/ai/tools/schemas/applyPatch.schema.d.ts +16 -0
  83. package/dist/ai/tools/schemas/applyPatch.schema.d.ts.map +1 -0
  84. package/dist/ai/tools/schemas/applyPatch.schema.js +17 -0
  85. package/dist/ai/tools/schemas/applyPatch.schema.js.map +1 -0
  86. package/dist/ai/tools/schemas/listDir.schema.d.ts +22 -0
  87. package/dist/ai/tools/schemas/listDir.schema.d.ts.map +1 -0
  88. package/dist/ai/tools/schemas/listDir.schema.js +22 -0
  89. package/dist/ai/tools/schemas/listDir.schema.js.map +1 -0
  90. package/dist/ai/tools/schemas/readFile.schema.d.ts +26 -0
  91. package/dist/ai/tools/schemas/readFile.schema.d.ts.map +1 -0
  92. package/dist/ai/tools/schemas/readFile.schema.js +26 -0
  93. package/dist/ai/tools/schemas/readFile.schema.js.map +1 -0
  94. package/dist/ai/tools/schemas/search.schema.d.ts +16 -0
  95. package/dist/ai/tools/schemas/search.schema.d.ts.map +1 -0
  96. package/dist/ai/tools/schemas/search.schema.js +16 -0
  97. package/dist/ai/tools/schemas/search.schema.js.map +1 -0
  98. package/dist/ai/tools/schemas/submitCodegenDone.schema.d.ts +16 -0
  99. package/dist/ai/tools/schemas/submitCodegenDone.schema.d.ts.map +1 -0
  100. package/dist/ai/tools/schemas/submitCodegenDone.schema.js +16 -0
  101. package/dist/ai/tools/schemas/submitCodegenDone.schema.js.map +1 -0
  102. package/dist/ai/tools/schemas/submitPlannerTasks.schema.d.ts +33 -0
  103. package/dist/ai/tools/schemas/submitPlannerTasks.schema.d.ts.map +1 -0
  104. package/dist/ai/tools/schemas/submitPlannerTasks.schema.js +31 -0
  105. package/dist/ai/tools/schemas/submitPlannerTasks.schema.js.map +1 -0
  106. package/dist/ai/tools/schemas/writeFile.schema.d.ts +20 -0
  107. package/dist/ai/tools/schemas/writeFile.schema.d.ts.map +1 -0
  108. package/dist/ai/tools/schemas/writeFile.schema.js +23 -0
  109. package/dist/ai/tools/schemas/writeFile.schema.js.map +1 -0
  110. package/dist/ai/tools/toolsets/codegenTools.d.ts +3 -0
  111. package/dist/ai/tools/toolsets/codegenTools.d.ts.map +1 -0
  112. package/dist/ai/tools/toolsets/codegenTools.js +17 -0
  113. package/dist/ai/tools/toolsets/codegenTools.js.map +1 -0
  114. package/dist/ai/tools/toolsets/plannerTools.d.ts +3 -0
  115. package/dist/ai/tools/toolsets/plannerTools.d.ts.map +1 -0
  116. package/dist/ai/tools/toolsets/plannerTools.js +17 -0
  117. package/dist/ai/tools/toolsets/plannerTools.js.map +1 -0
  118. package/dist/core.d.ts +44 -0
  119. package/dist/core.d.ts.map +1 -0
  120. package/dist/core.js +80 -0
  121. package/dist/core.js.map +1 -0
  122. package/dist/index.d.ts +2 -0
  123. package/dist/index.d.ts.map +1 -0
  124. package/dist/index.js +3 -0
  125. package/dist/index.js.map +1 -0
  126. package/dist/indexer/codegenIndex.d.ts +3 -0
  127. package/dist/indexer/codegenIndex.d.ts.map +1 -0
  128. package/dist/indexer/codegenIndex.js +17 -0
  129. package/dist/indexer/codegenIndex.js.map +1 -0
  130. package/dist/indexer/data/configs.constants.d.ts +85 -0
  131. package/dist/indexer/data/configs.constants.d.ts.map +1 -0
  132. package/dist/indexer/data/configs.constants.js +136 -0
  133. package/dist/indexer/data/configs.constants.js.map +1 -0
  134. package/dist/indexer/helpers/buildFolderTree.d.ts +2 -0
  135. package/dist/indexer/helpers/buildFolderTree.d.ts.map +1 -0
  136. package/dist/indexer/helpers/buildFolderTree.js +40 -0
  137. package/dist/indexer/helpers/buildFolderTree.js.map +1 -0
  138. package/dist/indexer/plannerIndex.d.ts +3 -0
  139. package/dist/indexer/plannerIndex.d.ts.map +1 -0
  140. package/dist/indexer/plannerIndex.js +20 -0
  141. package/dist/indexer/plannerIndex.js.map +1 -0
  142. package/dist/indexer/projectInfoIndex.d.ts +3 -0
  143. package/dist/indexer/projectInfoIndex.d.ts.map +1 -0
  144. package/dist/indexer/projectInfoIndex.js +257 -0
  145. package/dist/indexer/projectInfoIndex.js.map +1 -0
  146. package/dist/indexer/validatorIndex.d.ts +3 -0
  147. package/dist/indexer/validatorIndex.d.ts.map +1 -0
  148. package/dist/indexer/validatorIndex.js +14 -0
  149. package/dist/indexer/validatorIndex.js.map +1 -0
  150. package/dist/lib/redis.d.ts +3 -0
  151. package/dist/lib/redis.d.ts.map +1 -0
  152. package/dist/lib/redis.js +7 -0
  153. package/dist/lib/redis.js.map +1 -0
  154. package/dist/lib/supabase.d.ts +2 -0
  155. package/dist/lib/supabase.d.ts.map +1 -0
  156. package/dist/lib/supabase.js +4 -0
  157. package/dist/lib/supabase.js.map +1 -0
  158. package/dist/logging/genStatus.service.d.ts +14 -0
  159. package/dist/logging/genStatus.service.d.ts.map +1 -0
  160. package/dist/logging/genStatus.service.js +36 -0
  161. package/dist/logging/genStatus.service.js.map +1 -0
  162. package/dist/logging/logging.utils.d.ts +12 -0
  163. package/dist/logging/logging.utils.d.ts.map +1 -0
  164. package/dist/logging/logging.utils.js +15 -0
  165. package/dist/logging/logging.utils.js.map +1 -0
  166. package/dist/logging/redis.service.d.ts +11 -0
  167. package/dist/logging/redis.service.d.ts.map +1 -0
  168. package/dist/logging/redis.service.js +26 -0
  169. package/dist/logging/redis.service.js.map +1 -0
  170. package/dist/repository/context.repository.d.ts +8 -0
  171. package/dist/repository/context.repository.d.ts.map +1 -0
  172. package/dist/repository/context.repository.js +59 -0
  173. package/dist/repository/context.repository.js.map +1 -0
  174. package/dist/repository/genStatus.repository.d.ts +13 -0
  175. package/dist/repository/genStatus.repository.d.ts.map +1 -0
  176. package/dist/repository/genStatus.repository.js +18 -0
  177. package/dist/repository/genStatus.repository.js.map +1 -0
  178. package/dist/repository/planTasks.repository.d.ts +9 -0
  179. package/dist/repository/planTasks.repository.d.ts.map +1 -0
  180. package/dist/repository/planTasks.repository.js +24 -0
  181. package/dist/repository/planTasks.repository.js.map +1 -0
  182. package/dist/repository/repository.d.ts +5 -0
  183. package/dist/repository/repository.d.ts.map +1 -0
  184. package/dist/repository/repository.js +7 -0
  185. package/dist/repository/repository.js.map +1 -0
  186. package/dist/types/context.types.d.ts +64 -0
  187. package/dist/types/context.types.d.ts.map +1 -0
  188. package/dist/types/context.types.js +55 -0
  189. package/dist/types/context.types.js.map +1 -0
  190. package/dist/types/events.d.ts +16 -0
  191. package/dist/types/events.d.ts.map +1 -0
  192. package/dist/types/events.js +14 -0
  193. package/dist/types/events.js.map +1 -0
  194. package/dist/types/index/configs.types.d.ts +28 -0
  195. package/dist/types/index/configs.types.d.ts.map +1 -0
  196. package/dist/types/index/configs.types.js +2 -0
  197. package/dist/types/index/configs.types.js.map +1 -0
  198. package/dist/types/index/conventions.types.d.ts +40 -0
  199. package/dist/types/index/conventions.types.d.ts.map +1 -0
  200. package/dist/types/index/conventions.types.js +2 -0
  201. package/dist/types/index/conventions.types.js.map +1 -0
  202. package/dist/types/index/index.types.d.ts +16 -0
  203. package/dist/types/index/index.types.d.ts.map +1 -0
  204. package/dist/types/index/index.types.js +2 -0
  205. package/dist/types/index/index.types.js.map +1 -0
  206. package/dist/types/index/indexing.types.d.ts +9 -0
  207. package/dist/types/index/indexing.types.d.ts.map +1 -0
  208. package/dist/types/index/indexing.types.js +2 -0
  209. package/dist/types/index/indexing.types.js.map +1 -0
  210. package/dist/types/projectInfo.types.d.ts +16 -0
  211. package/dist/types/projectInfo.types.d.ts.map +1 -0
  212. package/dist/types/projectInfo.types.js +2 -0
  213. package/dist/types/projectInfo.types.js.map +1 -0
  214. package/dist/types/updatePlan.types.d.ts +34 -0
  215. package/dist/types/updatePlan.types.d.ts.map +1 -0
  216. package/dist/types/updatePlan.types.js +18 -0
  217. package/dist/types/updatePlan.types.js.map +1 -0
  218. package/dist/utils/utils.d.ts +2 -0
  219. package/dist/utils/utils.d.ts.map +1 -0
  220. package/dist/utils/utils.js +6 -0
  221. package/dist/utils/utils.js.map +1 -0
  222. package/dist/utils/workspace.d.ts +13 -0
  223. package/dist/utils/workspace.d.ts.map +1 -0
  224. package/dist/utils/workspace.js +92 -0
  225. package/dist/utils/workspace.js.map +1 -0
  226. package/package.json +58 -0
@@ -0,0 +1,28 @@
1
+ export interface ProjectConfigsConfig {
2
+ frameworkConfig: ProjectConfigsFrameworkConfig;
3
+ runtimeConfig: ProjectConfigsRuntimeConfig;
4
+ toolingConfig: ProjectConfigsToolingConfig;
5
+ }
6
+ export interface ProjectConfigsFrameworkConfig {
7
+ name: string;
8
+ router: string;
9
+ language: string;
10
+ styling: string;
11
+ ui: string;
12
+ stateManagement: string;
13
+ }
14
+ export interface ProjectConfigsRuntimeConfig {
15
+ target: string;
16
+ rendering: string;
17
+ serverActions: string;
18
+ apiRoutes: string;
19
+ dataFetching: string;
20
+ }
21
+ export interface ProjectConfigsToolingConfig {
22
+ packageManager: string;
23
+ linting: string;
24
+ formatting: string;
25
+ typecheck: string;
26
+ testing: string;
27
+ }
28
+ //# sourceMappingURL=configs.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configs.types.d.ts","sourceRoot":"","sources":["../../../src/types/index/configs.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,6BAA6B,CAAC;IAC/C,aAAa,EAAE,2BAA2B,CAAC;IAC3C,aAAa,EAAE,2BAA2B,CAAC;CAC5C;AAED,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,2BAA2B;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=configs.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configs.types.js","sourceRoot":"","sources":["../../../src/types/index/configs.types.ts"],"names":[],"mappings":"","sourcesContent":["export interface ProjectConfigsConfig {\n frameworkConfig: ProjectConfigsFrameworkConfig;\n runtimeConfig: ProjectConfigsRuntimeConfig;\n toolingConfig: ProjectConfigsToolingConfig;\n}\n\nexport interface ProjectConfigsFrameworkConfig {\n name: string;\n router: string;\n language: string;\n styling: string;\n ui: string;\n stateManagement: string;\n}\n\nexport interface ProjectConfigsRuntimeConfig {\n target: string;\n rendering: string;\n serverActions: string;\n apiRoutes: string;\n dataFetching: string;\n}\n\nexport interface ProjectConfigsToolingConfig {\n packageManager: string;\n linting: string;\n formatting: string;\n typecheck: string;\n testing: string;\n}\n"]}
@@ -0,0 +1,40 @@
1
+ export interface ProjectConventionsConfig {
2
+ shadcn: ShadcnConventionsConfig;
3
+ folderConventions: FolderConventionsConfig;
4
+ importsConventions: ImportsConventionsConfig;
5
+ routingConventions: RoutingConventionsConfig;
6
+ namingConventions: NamingConventionsConfig;
7
+ uiArchitecture: UIArchitectureConfig;
8
+ }
9
+ export interface ShadcnConventionsConfig {
10
+ installed: readonly string[];
11
+ location: string;
12
+ notes: string;
13
+ }
14
+ export type FolderConventionsConfig = Record<string, string>;
15
+ export interface ImportsConventionsConfig {
16
+ alias: string;
17
+ order: readonly string[];
18
+ }
19
+ export interface RoutingConventionsConfig {
20
+ required: readonly string[];
21
+ requiredPerRoute: readonly string[];
22
+ optionalPerRoute: readonly string[];
23
+ routeGroups: string;
24
+ dynamicSegments: string;
25
+ }
26
+ export interface NamingConventionsConfig {
27
+ components: string;
28
+ folders: string;
29
+ hooks: string;
30
+ }
31
+ export interface UIArchitectureConfig {
32
+ pattern: string;
33
+ rule: readonly string[];
34
+ configStructure: {
35
+ root: string;
36
+ elementTypes: Record<string, string>;
37
+ rules: readonly string[];
38
+ };
39
+ }
40
+ //# sourceMappingURL=conventions.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conventions.types.d.ts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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=conventions.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conventions.types.js","sourceRoot":"","sources":["../../../src/types/index/conventions.types.ts"],"names":[],"mappings":"","sourcesContent":["export interface ProjectConventionsConfig {\n shadcn: ShadcnConventionsConfig;\n folderConventions: FolderConventionsConfig;\n importsConventions: ImportsConventionsConfig;\n routingConventions: RoutingConventionsConfig;\n namingConventions: NamingConventionsConfig;\n uiArchitecture: UIArchitectureConfig;\n}\n\nexport interface ShadcnConventionsConfig {\n installed: readonly string[];\n location: string;\n notes: string;\n}\n\nexport type FolderConventionsConfig = Record<string, string>;\n\nexport interface ImportsConventionsConfig {\n alias: string;\n order: readonly string[];\n}\n\nexport interface RoutingConventionsConfig {\n required: readonly string[];\n requiredPerRoute: readonly string[];\n optionalPerRoute: readonly string[];\n routeGroups: string;\n dynamicSegments: string;\n}\n\nexport interface NamingConventionsConfig {\n components: string;\n folders: string;\n hooks: string;\n}\n\nexport interface UIArchitectureConfig {\n pattern: string;\n rule: readonly string[];\n configStructure: {\n root: string;\n elementTypes: Record<string, string>;\n rules: readonly string[];\n };\n}\n"]}
@@ -0,0 +1,16 @@
1
+ import { projectConfigs, projectConventions } from "../../indexer/data/configs.constants.js";
2
+ export type CodegenIndex = {
3
+ folderTree: string;
4
+ projectConfigs: Pick<typeof projectConfigs, "frameworkConfig" | "runtimeConfig">;
5
+ projectConventions: Pick<typeof projectConventions, "importsConventions" | "uiArchitecture">;
6
+ };
7
+ export type PlannerIndex = {
8
+ folderTree: string;
9
+ projectConfigs: Pick<typeof projectConfigs, "frameworkConfig" | "runtimeConfig" | "toolingConfig">;
10
+ projectConventions: Pick<typeof projectConventions, "folderConventions" | "importsConventions" | "routingConventions" | "namingConventions">;
11
+ };
12
+ export type ValidatorIndex = {
13
+ folderTree: string;
14
+ projectConfigs: Pick<typeof projectConfigs, "frameworkConfig" | "runtimeConfig" | "toolingConfig">;
15
+ };
16
+ //# sourceMappingURL=index.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.types.d.ts","sourceRoot":"","sources":["../../../src/types/index/index.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,kBAAkB,EACnB,MAAM,yCAAyC,CAAC;AAEjD,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,IAAI,CAClB,OAAO,cAAc,EACrB,iBAAiB,GAAG,eAAe,CACpC,CAAC;IACF,kBAAkB,EAAE,IAAI,CACtB,OAAO,kBAAkB,EACzB,oBAAoB,GAAG,gBAAgB,CACxC,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,IAAI,CAClB,OAAO,cAAc,EACrB,iBAAiB,GAAG,eAAe,GAAG,eAAe,CACtD,CAAC;IACF,kBAAkB,EAAE,IAAI,CACtB,OAAO,kBAAkB,EACvB,mBAAmB,GACnB,oBAAoB,GACpB,oBAAoB,GACpB,mBAAmB,CACtB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,IAAI,CAClB,OAAO,cAAc,EACrB,iBAAiB,GAAG,eAAe,GAAG,eAAe,CACtD,CAAC;CACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.types.js","sourceRoot":"","sources":["../../../src/types/index/index.types.ts"],"names":[],"mappings":"","sourcesContent":["import {\r\n projectConfigs,\r\n projectConventions,\r\n} from \"../../indexer/data/configs.constants.js\";\r\n\r\nexport type CodegenIndex = {\r\n folderTree: string;\r\n projectConfigs: Pick<\r\n typeof projectConfigs,\r\n \"frameworkConfig\" | \"runtimeConfig\"\r\n >;\r\n projectConventions: Pick<\r\n typeof projectConventions,\r\n \"importsConventions\" | \"uiArchitecture\"\r\n >;\r\n};\r\n\r\nexport type PlannerIndex = {\r\n folderTree: string;\r\n projectConfigs: Pick<\r\n typeof projectConfigs,\r\n \"frameworkConfig\" | \"runtimeConfig\" | \"toolingConfig\"\r\n >;\r\n projectConventions: Pick<\r\n typeof projectConventions,\r\n | \"folderConventions\"\r\n | \"importsConventions\"\r\n | \"routingConventions\"\r\n | \"namingConventions\"\r\n >;\r\n};\r\n\r\nexport type ValidatorIndex = {\r\n folderTree: string;\r\n projectConfigs: Pick<\r\n typeof projectConfigs,\r\n \"frameworkConfig\" | \"runtimeConfig\" | \"toolingConfig\"\r\n >;\r\n};\r\n"]}
@@ -0,0 +1,9 @@
1
+ export type FileExtension = `.${string}`;
2
+ export interface IndexingConfig {
3
+ includeExtensions: readonly FileExtension[];
4
+ excludeDirectories: readonly string[];
5
+ maxFileBytes: number;
6
+ chunkSize: number;
7
+ chunkOverlap: number;
8
+ }
9
+ //# sourceMappingURL=indexing.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"indexing.types.d.ts","sourceRoot":"","sources":["../../../src/types/index/indexing.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,IAAI,MAAM,EAAE,CAAC;AAEzC,MAAM,WAAW,cAAc;IAC7B,iBAAiB,EAAE,SAAS,aAAa,EAAE,CAAC;IAC5C,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=indexing.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"indexing.types.js","sourceRoot":"","sources":["../../../src/types/index/indexing.types.ts"],"names":[],"mappings":"","sourcesContent":["export type FileExtension = `.${string}`;\n\nexport interface IndexingConfig {\n includeExtensions: readonly FileExtension[];\n excludeDirectories: readonly string[];\n maxFileBytes: number;\n chunkSize: number;\n chunkOverlap: number;\n}\n"]}
@@ -0,0 +1,16 @@
1
+ interface PageSection {
2
+ sectionName: string;
3
+ description: string;
4
+ }
5
+ interface Page {
6
+ pageRoute: string;
7
+ pageName: string;
8
+ description: string;
9
+ sections?: PageSection[];
10
+ }
11
+ export interface ProjectInfo {
12
+ uiPages: Page[];
13
+ lastUpdatedPlanVersion?: number;
14
+ }
15
+ export {};
16
+ //# sourceMappingURL=projectInfo.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projectInfo.types.d.ts","sourceRoot":"","sources":["../../src/types/projectInfo.types.ts"],"names":[],"mappings":"AAAA,UAAU,WAAW;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,IAAI;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,IAAI,EAAE,CAAC;IAChB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=projectInfo.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projectInfo.types.js","sourceRoot":"","sources":["../../src/types/projectInfo.types.ts"],"names":[],"mappings":"","sourcesContent":["interface PageSection {\n sectionName: string;\n description: string;\n}\n\ninterface Page {\n pageRoute: string;\n pageName: string;\n description: string;\n sections?: PageSection[];\n}\n\nexport interface ProjectInfo {\n uiPages: Page[];\n lastUpdatedPlanVersion?: number;\n}\n"]}
@@ -0,0 +1,34 @@
1
+ export declare const TASK_TYPE: {
2
+ UI_TASK: string;
3
+ BE_TASK: string;
4
+ DB_TASK: string;
5
+ };
6
+ export type TaskType = (typeof TASK_TYPE)[keyof typeof TASK_TYPE];
7
+ export declare const INTENT: {
8
+ ADD_PAGE: string;
9
+ ADD_SECTION: string;
10
+ MODIFY_SECTION: string;
11
+ MODIFY_TEXT_CONTENT: string;
12
+ MODIFY_STYLING: string;
13
+ };
14
+ export type Intent = (typeof INTENT)[keyof typeof INTENT];
15
+ export type PlanTask = {
16
+ task_id: string;
17
+ task_type: TaskType;
18
+ intent: Intent;
19
+ task: string;
20
+ description: string;
21
+ };
22
+ export declare const PLAN_STATUS: {
23
+ PENDING: string;
24
+ UPDATED: string;
25
+ IMPLEMENTED: string;
26
+ };
27
+ export type PlanStatus = (typeof PLAN_STATUS)[keyof typeof PLAN_STATUS];
28
+ export type Plan = {
29
+ id?: string;
30
+ tasks: PlanTask[];
31
+ status: PlanStatus;
32
+ messageId?: string;
33
+ };
34
+ //# sourceMappingURL=updatePlan.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updatePlan.types.d.ts","sourceRoot":"","sources":["../../src/types/updatePlan.types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;CAIrB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAElE,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,CAAC;AAE1D,MAAM,MAAM,QAAQ,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,QAAQ,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAExE,MAAM,MAAM,IAAI,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,MAAM,EAAE,UAAU,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -0,0 +1,18 @@
1
+ export const TASK_TYPE = {
2
+ UI_TASK: "ui_task",
3
+ BE_TASK: "be_task",
4
+ DB_TASK: "db_task",
5
+ };
6
+ export const INTENT = {
7
+ ADD_PAGE: "add_page",
8
+ ADD_SECTION: "add_section",
9
+ MODIFY_SECTION: "modify_section",
10
+ MODIFY_TEXT_CONTENT: "modify_text_content",
11
+ MODIFY_STYLING: "modify_styling",
12
+ };
13
+ export const PLAN_STATUS = {
14
+ PENDING: "pending",
15
+ UPDATED: "updated",
16
+ IMPLEMENTED: "implemented",
17
+ };
18
+ //# sourceMappingURL=updatePlan.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updatePlan.types.js","sourceRoot":"","sources":["../../src/types/updatePlan.types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACnB,CAAC;AAIF,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,aAAa;IAC1B,cAAc,EAAE,gBAAgB;IAChC,mBAAmB,EAAE,qBAAqB;IAC1C,cAAc,EAAE,gBAAgB;CACjC,CAAC;AAYF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,aAAa;CAC3B,CAAC","sourcesContent":["export const TASK_TYPE = {\r\n UI_TASK: \"ui_task\",\r\n BE_TASK: \"be_task\",\r\n DB_TASK: \"db_task\",\r\n};\r\n\r\nexport type TaskType = (typeof TASK_TYPE)[keyof typeof TASK_TYPE];\r\n\r\nexport const INTENT = {\r\n ADD_PAGE: \"add_page\",\r\n ADD_SECTION: \"add_section\",\r\n MODIFY_SECTION: \"modify_section\",\r\n MODIFY_TEXT_CONTENT: \"modify_text_content\",\r\n MODIFY_STYLING: \"modify_styling\",\r\n};\r\n\r\nexport type Intent = (typeof INTENT)[keyof typeof INTENT];\r\n\r\nexport type PlanTask = {\r\n task_id: string;\r\n task_type: TaskType;\r\n intent: Intent;\r\n task: string;\r\n description: string;\r\n};\r\n\r\nexport const PLAN_STATUS = {\r\n PENDING: \"pending\",\r\n UPDATED: \"updated\",\r\n IMPLEMENTED: \"implemented\",\r\n};\r\n\r\nexport type PlanStatus = (typeof PLAN_STATUS)[keyof typeof PLAN_STATUS];\r\n\r\nexport type Plan = {\r\n id?: string;\r\n tasks: PlanTask[];\r\n status: PlanStatus;\r\n messageId?: string;\r\n};\r\n"]}
@@ -0,0 +1,2 @@
1
+ export declare function assertNonEmptyString(value: unknown, field: string): asserts value is string;
2
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,KAAK,IAAI,MAAM,CAIzB"}
@@ -0,0 +1,6 @@
1
+ export function assertNonEmptyString(value, field) {
2
+ if (typeof value !== "string" || !value.trim()) {
3
+ throw new Error(`\`${field}\` must be a non-empty string`);
4
+ }
5
+ }
6
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,oBAAoB,CAClC,KAAc,EACd,KAAa;IAEb,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QAC/C,MAAM,IAAI,KAAK,CAAC,KAAK,KAAK,+BAA+B,CAAC,CAAC;IAC7D,CAAC;AACH,CAAC","sourcesContent":["export function assertNonEmptyString(\r\n value: unknown,\r\n field: string,\r\n): asserts value is string {\r\n if (typeof value !== \"string\" || !value.trim()) {\r\n throw new Error(`\\`${field}\\` must be a non-empty string`);\r\n }\r\n}\r\n"]}
@@ -0,0 +1,13 @@
1
+ import { Dirent } from "fs";
2
+ export declare function createFolder(path: string): Promise<void>;
3
+ export declare function removeFolder(path: string): Promise<void>;
4
+ export declare function createFile(path: string, content: string): Promise<void>;
5
+ export declare function removeFile(path: string): Promise<void>;
6
+ export declare function copyFile(from: string, to: string): Promise<void>;
7
+ export declare function stat(path: string): Promise<import("fs").Stats>;
8
+ export declare function readDir(path: string): Promise<Dirent<string>[]>;
9
+ export declare function safeReadDir(dir: string): Promise<Dirent<string>[]>;
10
+ export declare function readFile(path: string): Promise<string>;
11
+ export declare function readTsFiles(dir: string, results?: any[]): Promise<any[]>;
12
+ export declare const filterDescription: (content: string) => string;
13
+ //# sourceMappingURL=workspace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/utils/workspace.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAI5B,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,iBAE9C;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,iBAE9C;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,iBAM7D;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,iBAE5C;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,iBAEtD;AAED,wBAAsB,IAAI,CAAC,IAAI,EAAE,MAAM,+BAEtC;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,6BAEzC;AASD,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,6BAO5C;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,mBAU1C;AAED,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,GAAG,EAAO,kBA0BjE;AAED,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,KAAG,MASnD,CAAC"}
@@ -0,0 +1,92 @@
1
+ import fs from "fs/promises";
2
+ import path from "path";
3
+ export async function createFolder(path) {
4
+ await fs.mkdir(path, { recursive: true });
5
+ }
6
+ export async function removeFolder(path) {
7
+ await fs.rm(path, { recursive: true, force: true });
8
+ }
9
+ export async function createFile(path, content) {
10
+ try {
11
+ await fs.writeFile(path, content, "utf-8");
12
+ }
13
+ catch (err) {
14
+ throw err;
15
+ }
16
+ }
17
+ export async function removeFile(path) {
18
+ await fs.rm(path, { force: true });
19
+ }
20
+ export async function copyFile(from, to) {
21
+ await fs.copyFile(from, to);
22
+ }
23
+ export async function stat(path) {
24
+ return await fs.stat(path);
25
+ }
26
+ export async function readDir(path) {
27
+ return await fs.readdir(path, { withFileTypes: true });
28
+ }
29
+ const sortDirents = (a, b) => {
30
+ const aIsDir = a.isDirectory();
31
+ const bIsDir = b.isDirectory();
32
+ if (aIsDir !== bIsDir)
33
+ return aIsDir ? -1 : 1;
34
+ return a.name.localeCompare(b.name, undefined, { sensitivity: "base" });
35
+ };
36
+ export async function safeReadDir(dir) {
37
+ try {
38
+ const entries = await fs.readdir(dir, { withFileTypes: true });
39
+ return entries.sort(sortDirents);
40
+ }
41
+ catch {
42
+ return [];
43
+ }
44
+ }
45
+ export async function readFile(path) {
46
+ try {
47
+ return await fs.readFile(path, "utf-8");
48
+ }
49
+ catch (err) {
50
+ const code = err?.code;
51
+ if (code !== "ENOENT") {
52
+ console.error("Error while reading file", err, { path });
53
+ }
54
+ return "";
55
+ }
56
+ }
57
+ export async function readTsFiles(dir, results = []) {
58
+ try {
59
+ await fs.access(dir); // existence check
60
+ }
61
+ catch {
62
+ return results; // directory doesn't exist → skip
63
+ }
64
+ const entries = await fs.readdir(dir);
65
+ const ALLOWED_EXT = [".ts", ".tsx"];
66
+ for (const entry of entries) {
67
+ const fullPath = path.join(dir, entry);
68
+ const stat = await fs.stat(fullPath);
69
+ if (stat.isDirectory()) {
70
+ readTsFiles(fullPath, results);
71
+ }
72
+ else if (ALLOWED_EXT.includes(path.extname(entry))) {
73
+ results.push({
74
+ name: entry,
75
+ path: fullPath,
76
+ description: filterDescription(await fs.readFile(fullPath, "utf-8")),
77
+ });
78
+ }
79
+ }
80
+ return results;
81
+ }
82
+ export const filterDescription = (content) => {
83
+ if (!content)
84
+ return "";
85
+ const DESC_REGEX = /DESC_START([\s\S]*?)DESC_END/g;
86
+ const match = DESC_REGEX.exec(content);
87
+ DESC_REGEX.lastIndex = 0;
88
+ if (!match)
89
+ return "";
90
+ return match[1].trim();
91
+ };
92
+ //# sourceMappingURL=workspace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/utils/workspace.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAY;IAC7C,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAY;IAC7C,MAAM,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAY,EAAE,OAAe;IAC5D,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC7C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QACjC,CAAC;aAAM,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YACrD,OAAO,CAAC,IAAI,CAAC;gBACX,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iBAAiB,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;aACrE,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAAe,EAAU,EAAE;IAC3D,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IACxB,MAAM,UAAU,GAAG,+BAA+B,CAAC;IACnD,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACvC,UAAU,CAAC,SAAS,GAAG,CAAC,CAAC;IAEzB,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IAEtB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC,CAAC","sourcesContent":["// infra/fs/workspace.ts\r\nimport { Dirent } from \"fs\";\r\nimport fs from \"fs/promises\";\r\nimport path from \"path\";\r\n\r\nexport async function createFolder(path: string) {\r\n await fs.mkdir(path, { recursive: true });\r\n}\r\n\r\nexport async function removeFolder(path: string) {\r\n await fs.rm(path, { recursive: true, force: true });\r\n}\r\n\r\nexport async function createFile(path: string, content: string) {\r\n try {\r\n await fs.writeFile(path, content, \"utf-8\");\r\n } catch (err) {\r\n throw err;\r\n }\r\n}\r\n\r\nexport async function removeFile(path: string) {\r\n await fs.rm(path, { force: true });\r\n}\r\n\r\nexport async function copyFile(from: string, to: string) {\r\n await fs.copyFile(from, to);\r\n}\r\n\r\nexport async function stat(path: string) {\r\n return await fs.stat(path);\r\n}\r\n\r\nexport async function readDir(path: string) {\r\n return await fs.readdir(path, { withFileTypes: true });\r\n}\r\n\r\nconst sortDirents = (a: Dirent, b: Dirent) => {\r\n const aIsDir = a.isDirectory();\r\n const bIsDir = b.isDirectory();\r\n if (aIsDir !== bIsDir) return aIsDir ? -1 : 1;\r\n return a.name.localeCompare(b.name, undefined, { sensitivity: \"base\" });\r\n};\r\n\r\nexport async function safeReadDir(dir: string) {\r\n try {\r\n const entries = await fs.readdir(dir, { withFileTypes: true });\r\n return entries.sort(sortDirents);\r\n } catch {\r\n return [];\r\n }\r\n}\r\n\r\nexport async function readFile(path: string) {\r\n try {\r\n return await fs.readFile(path, \"utf-8\");\r\n } catch (err) {\r\n const code = (err as NodeJS.ErrnoException | null)?.code;\r\n if (code !== \"ENOENT\") {\r\n console.error(\"Error while reading file\", err, { path });\r\n }\r\n return \"\";\r\n }\r\n}\r\n\r\nexport async function readTsFiles(dir: string, results: any[] = []) {\r\n try {\r\n await fs.access(dir); // existence check\r\n } catch {\r\n return results; // directory doesn't exist → skip\r\n }\r\n\r\n const entries = await fs.readdir(dir);\r\n const ALLOWED_EXT = [\".ts\", \".tsx\"];\r\n\r\n for (const entry of entries) {\r\n const fullPath = path.join(dir, entry);\r\n const stat = await fs.stat(fullPath);\r\n\r\n if (stat.isDirectory()) {\r\n readTsFiles(fullPath, results);\r\n } else if (ALLOWED_EXT.includes(path.extname(entry))) {\r\n results.push({\r\n name: entry,\r\n path: fullPath,\r\n description: filterDescription(await fs.readFile(fullPath, \"utf-8\")),\r\n });\r\n }\r\n }\r\n\r\n return results;\r\n}\r\n\r\nexport const filterDescription = (content: string): string => {\r\n if (!content) return \"\";\r\n const DESC_REGEX = /DESC_START([\\s\\S]*?)DESC_END/g;\r\n const match = DESC_REGEX.exec(content);\r\n DESC_REGEX.lastIndex = 0;\r\n\r\n if (!match) return \"\";\r\n\r\n return match[1].trim();\r\n};\r\n"]}
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@vedangiitb/qwintly-core",
3
+ "version": "1.0.2",
4
+ "description": "Qwintly Core",
5
+ "homepage": "https://github.com/vedangiitb/qwintly-core#readme",
6
+ "bugs": {
7
+ "url": "https://github.com/vedangiitb/qwintly-core/issues"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/vedangiitb/qwintly-core.git"
12
+ },
13
+ "license": "ISC",
14
+ "author": "vedangiitb",
15
+ "type": "module",
16
+ "main": "./dist/index.js",
17
+ "module": "./dist/index.js",
18
+ "types": "./dist/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js",
23
+ "default": "./dist/index.js"
24
+ },
25
+ "./package.json": "./package.json"
26
+ },
27
+ "files": [
28
+ "dist"
29
+ ],
30
+ "sideEffects": false,
31
+ "scripts": {
32
+ "clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
33
+ "build": "tsc -p tsconfig.json",
34
+ "prepare": "npm run build",
35
+ "prepack": "npm run clean && npm run build",
36
+ "test": "npm run build && node --test dist"
37
+ },
38
+ "peerDependencies": {
39
+ "@google/genai": "^1.33.0"
40
+ },
41
+ "dependencies": {
42
+ "@supabase/supabase-js": "^2.105.1",
43
+ "@upstash/redis": "^1.37.0",
44
+ "zod": "^4.3.6",
45
+ "zod-to-json-schema": "^3.25.2"
46
+ },
47
+ "devDependencies": {
48
+ "@google/genai": "^1.33.0",
49
+ "@types/node": "^24.10.4",
50
+ "typescript": "^5.9.3"
51
+ },
52
+ "publishConfig": {
53
+ "access": "public"
54
+ },
55
+ "engines": {
56
+ "node": ">=18"
57
+ }
58
+ }